summaryrefslogtreecommitdiff
path: root/distrib/alpha
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
parent27eaf4fbadb2879b52b66f55d0fc43e00931fd50 (diff)
Switch alpha, luna88k and sparc64 ramdisks to makefs.
ok deraadt
Diffstat (limited to 'distrib/alpha')
-rw-r--r--distrib/alpha/Makefile4
-rw-r--r--distrib/alpha/bsd.rd/Makefile56
-rw-r--r--distrib/alpha/common/Makefile.inc36
-rw-r--r--distrib/alpha/inst-common/Makefile.inc13
4 files changed, 30 insertions, 79 deletions
diff --git a/distrib/alpha/Makefile b/distrib/alpha/Makefile
index 86a5b0c41da..3f07ac44732 100644
--- a/distrib/alpha/Makefile
+++ b/distrib/alpha/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.10 2015/08/29 16:48:22 deraadt Exp $
+# $OpenBSD: Makefile,v 1.11 2017/01/27 17:59:09 natano Exp $
SUBDIR= bsd.rd miniroot floppy floppyB floppyC cdfs
@@ -7,11 +7,11 @@ SUBDIR+= iso
.endif
unconfig:
- cd bsd.rd; ${MAKE} unconfig
cd miniroot; ${MAKE} unconfig
cd floppy; ${MAKE} unconfig
cd floppyB; ${MAKE} unconfig
cd floppyC; ${MAKE} unconfig
cd cdfs; ${MAKE} unconfig
+ cd iso; ${MAKE} unconfig
.include <bsd.subdir.mk>
diff --git a/distrib/alpha/bsd.rd/Makefile b/distrib/alpha/bsd.rd/Makefile
index 684c7d41f61..0b1e1dd0eee 100644
--- a/distrib/alpha/bsd.rd/Makefile
+++ b/distrib/alpha/bsd.rd/Makefile
@@ -1,41 +1,24 @@
-# $OpenBSD: Makefile,v 1.22 2016/10/14 18:44:19 deraadt Exp $
+# $OpenBSD: Makefile,v 1.23 2017/01/27 17:59:09 natano Exp $
TOP= ${.CURDIR}/..
.include "${TOP}/Makefile.inc"
IMAGE= ramdisk${REV}.fs
-MOUNT_POINT= /mnt
-
-VND?= vnd0
-VND_DEV= /dev/${VND}a
-VND_RDEV= /dev/r${VND}a
-VND_CRDEV= /dev/r${VND}c
-PID!= echo $$$$
-REALIMAGE!= echo /var/tmp/image.${PID}
-
STRIP?= strip
GZIPCMD?= gzip
GZIPFLAGS?= -9fn
-INSTALLBOOT?= /usr/mdec/installboot -v
RAMDISK= RAMDISKBIG
-BOOT?= /usr/mdec/boot
-BOOTXX?= /usr/mdec/bootxx
.include "${TOP}/inst-common/Makefile.inc"
LISTS+= ${.CURDIR}/list.local
-all: ${CBIN} bsd.rd
-
-DISKTYPE= rdroot
-NBLKS= 5744
+all: bsd.rd
-# 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}
+DISKTYPE= rdroot
+MAKEFSARGS_RD= -o disklabel=${DISKTYPE},minfree=0,density=8192
bsd.rd: bsd.rd_unz
objcopy -Sg -R .comment bsd.rd_unz bsd.strip
@@ -51,34 +34,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}
-
.ifdef RELEASEDIR
beforeinstall:
cp bsd.rd ${RELEASEDIR}
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}
diff --git a/distrib/alpha/inst-common/Makefile.inc b/distrib/alpha/inst-common/Makefile.inc
index dea53b9e2c8..8d40d96fc2e 100644
--- a/distrib/alpha/inst-common/Makefile.inc
+++ b/distrib/alpha/inst-common/Makefile.inc
@@ -1,15 +1,12 @@
#
-# $OpenBSD: Makefile.inc,v 1.12 2015/09/19 10:44:01 miod Exp $
+# $OpenBSD: Makefile.inc,v 1.13 2017/01/27 17:59:09 natano Exp $
#
# TOP is assumed to be defined by Makefile including this one.
CBIN?= instbin
-COMMONDIR= ${TOP}/inst-common
UTILS= ${TOP}/../miniroot
-MOUNT_POINT?= ${TOP}/${BASE}/fs
-
LISTS?= ${.CURDIR}/../common/list
CRUNCHCONF?= ${CBIN}.conf
MTREE= ${UTILS}/mtree.conf
@@ -25,17 +22,11 @@ ${CBIN}: ${CBIN}.mk ${CBIN}.cache ${CBIN}.c
${MAKE} -f ${CBIN}.mk SRCLIBDIR=${.CURDIR}/../../../lib all
${STRIP} -R .eh_frame ${CBIN}
-do_files:
- mtree -def ${MTREE} -p ${MOUNT_POINT}/ -u
- TOPDIR=${TOP} CURDIR=${.CURDIR} OBJDIR=${.OBJDIR} \
- REV=${REV} TARGDIR=${MOUNT_POINT} UTILS=${UTILS}\
- RELEASEDIR=${RELEASEDIR} sh ${UTILS}/runlist.sh ${LISTS}
- rm ${MOUNT_POINT}/${CBIN}
-
clean cleandir:
/bin/rm -f *.core ${IMAGE} ${CBIN} ${CBIN}.mk ${CBIN}.cache \
*.o *.lo *.c \
lib*.a lib*.olist ${CBIN}.map ${CLEANFILES}
+ /bin/rm -rf ${IMAGE}.d
.include <bsd.obj.mk>
.include <bsd.subdir.mk>