summaryrefslogtreecommitdiff
path: root/distrib/alpha/common/Makefile.inc
diff options
context:
space:
mode:
authorMartin Natano <natano@cvs.openbsd.org>2017-01-27 17:59:10 +0000
committerMartin Natano <natano@cvs.openbsd.org>2017-01-27 17:59:10 +0000
commitfc80f19489346b5af0fbac80d67559591941eb7e (patch)
treed288ca9570c01789f7c5ea65a8afcb0618a7a54f /distrib/alpha/common/Makefile.inc
parent27eaf4fbadb2879b52b66f55d0fc43e00931fd50 (diff)
Switch alpha, luna88k and sparc64 ramdisks to makefs.
ok deraadt
Diffstat (limited to 'distrib/alpha/common/Makefile.inc')
-rw-r--r--distrib/alpha/common/Makefile.inc36
1 files changed, 13 insertions, 23 deletions
diff --git a/distrib/alpha/common/Makefile.inc b/distrib/alpha/common/Makefile.inc
index f6dbf7a7a32..2433e4fb146 100644
--- a/distrib/alpha/common/Makefile.inc
+++ b/distrib/alpha/common/Makefile.inc
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.inc,v 1.28 2016/10/14 18:44:19 deraadt Exp $
+# $OpenBSD: Makefile.inc,v 1.29 2017/01/27 17:59:09 natano Exp $
TOP= ${.CURDIR}/..
@@ -28,14 +28,13 @@ BOOTXX?= /usr/mdec/bootxx
.include "${TOP}/inst-common/Makefile.inc"
-all: ${CBIN} ${FLOPPY}
+all: ${FLOPPY}
-DISKTYPE= rdroot
-NBLKS= 5744
+DISKTYPE= rdroot
+MAKEFSARGS_RD= -o disklabel=${DISKTYPE},minfree=0,density=8192
# old format, minfree, opt, b/i trks, sects, cpg
NEWFSARGS= -t ffs -m 0 -o space
-NEWFSARGS_RD= -i 8192
NEWFSARGS_FD= -i 524288 -c ${FLOPPYBLKS}
CLEANFILES+= bsd bsd.rd bsd.gz ${FLOPPY}
@@ -77,30 +76,21 @@ bsd:
su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && env COPTS=-Os ${MAKE}'
cp -p ${.CURDIR}/../../../sys/arch/alpha/compile/${RAMDISK}/obj/bsd bsd
-${IMAGE}: do_prep do_mount do_files do_umount
- mv -f ${REALIMAGE} ${IMAGE}
+${IMAGE}: ${CBIN}
+ rm -rf $@.d
+ install -d -o root -g wheel $@.d
+ mtree -def ${MTREE} -p $@.d -u
+ TOPDIR=${TOP} CURDIR=${.CURDIR} OBJDIR=${.OBJDIR} REV=${REV} \
+ TARGDIR=$@.d UTILS=${UTILS} RELEASEDIR=${RELEASEDIR} \
+ sh ${UTILS}/runlist.sh ${LISTS}
+ rm $@.d/${CBIN}
+ makefs ${MAKEFSARGS_RD} $@ $@.d
rdsetroot: ${TOP}/../common/elfrdsetroot.c
${HOSTCC} ${HOSTCFLAGS} -o rdsetroot \
${TOP}/../common/elfrdsetroot.c ${TOP}/../common/elf32.c \
${TOP}/../common/elf64.c
-do_prep:
- dd if=/dev/zero of=${REALIMAGE} count=${NBLKS}
- vnconfig -v -c ${VND} ${REALIMAGE}
- disklabel -w ${VND} ${DISKTYPE}
-
-do_mount:
- newfs ${NEWFSARGS} ${NEWFSARGS_RD} -s ${NBLKS} ${VND_RDEV}
- mount ${VND_DEV} ${MOUNT_POINT}
-
-do_umount:
- @echo ""
- @df -i ${MOUNT_POINT}
- @echo ""
- umount ${MOUNT_POINT}
- vnconfig -u ${VND}
-
unconfig:
-umount ${MOUNT_POINT}
-vnconfig -u ${VND}