diff options
Diffstat (limited to 'distrib/sparc64')
-rw-r--r-- | distrib/sparc64/Makefile | 3 | ||||
-rw-r--r-- | distrib/sparc64/bsd.rd/Makefile | 91 | ||||
-rw-r--r-- | distrib/sparc64/ramdisk/Makefile | 51 | ||||
-rw-r--r-- | distrib/sparc64/ramdiskB/Makefile | 51 |
4 files changed, 43 insertions, 153 deletions
diff --git a/distrib/sparc64/Makefile b/distrib/sparc64/Makefile index 7f47b9c74a4..a8764500282 100644 --- a/distrib/sparc64/Makefile +++ b/distrib/sparc64/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.10 2012/06/22 02:56:42 deraadt Exp $ +# $OpenBSD: Makefile,v 1.11 2017/01/27 17:59:09 natano Exp $ # preserve order: 'miniroot' depends on 'bsd.rd', 'cdfs' depends on 'miniroot' SUBDIR+= ramdisk ramdiskB bsd.rd miniroot cdfs @@ -10,5 +10,6 @@ SUBDIR+= iso unconfig: cd ramdisk; ${MAKE} unconfig cd ramdiskB; ${MAKE} unconfig + cd miniroot; ${MAKE} unconfig .include <bsd.subdir.mk> diff --git a/distrib/sparc64/bsd.rd/Makefile b/distrib/sparc64/bsd.rd/Makefile index a0966ebc941..2a7cf7ab358 100644 --- a/distrib/sparc64/bsd.rd/Makefile +++ b/distrib/sparc64/bsd.rd/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.29 2016/10/14 18:44:20 deraadt Exp $ +# $OpenBSD: Makefile,v 1.30 2017/01/27 17:59:09 natano Exp $ TOP= ${.CURDIR}/.. @@ -8,37 +8,17 @@ CBIN?= instbin LISTS?= ${.CURDIR}/list UTILS?= ${TOP}/../miniroot -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 MTREE= ${UTILS}/mtree.conf RAMDISK= RAMDISK -BOOT?= /usr/mdec/boot -BOOTXX?= /usr/mdec/bootxx - -CLEANFILES+= bsd.rd_unz rdsetroot - -#.include "${TOP}/common/Makefile.inc" -all: ${CBIN} bsd.rd +all: bsd.rd -DISKTYPE= rdroot -NBLKS= 5744 - -# old format, minfree, opt, b/i trks, sects, cpg -NEWFSARGS= -t ffs -m 0 -o space -NEWFSARGS_RD= -i 4096 -c ${NBLKS} -NEWFSARGS_FD= -i 524288 -c 2880 +DISKTYPE= rdroot +MAKEFSARGS_RD= -o disklabel=${DISKTYPE},minfree=0,density=4096 bsd.rd: bsd.rd_unz objcopy -Sg -R .comment bsd.rd_unz bsd.strip @@ -54,56 +34,21 @@ bsd: su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && env COPTS=-Os ${MAKE}' cp -p ${.CURDIR}/../../../sys/arch/sparc64/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} ${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} - -rd_setup: ${CBIN} - dd if=/dev/zero of=${REALIMAGE} bs=512 count=${NBLKS} - vnconfig -v -c ${VND} ${REALIMAGE} - disklabel -w ${VND} ${DISKTYPE} - newfs ${NEWFSARGS} ${VND_RDEV} - fsck ${VND_RDEV} - mount ${VND_DEV} ${MOUNT_POINT} - -rd_teardown: - @df -i ${MOUNT_POINT} - -umount ${MOUNT_POINT} - -vnconfig -u ${VND} - cp ${REALIMAGE} ${IMAGE} - rm ${REALIMAGE} - -unconfig: - -umount -f ${MOUNT_POINT} - -vnconfig -u ${VND} - -/bin/rm -f ${IMAGE} - -.PRECIOUS: ${IMAGE} - .ifdef RELEASEDIR install: .ifndef NOBSDRD @@ -121,17 +66,11 @@ ${CBIN}.mk ${CBIN}.cache ${CBIN}.c: ${CBIN}.conf ${CBIN}: ${CBIN}.mk ${CBIN}.cache ${CBIN}.c ${MAKE} -f ${CBIN}.mk SRCLIBDIR=${.CURDIR}/../../../lib all -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 \ lib*.a lib*.olist ${CBIN}.map \ - *.o *.lo *.c bsd bsd.rd bsd.gz bsd.strip floppy*.fs rdsetroot + *.o *.lo *.c bsd bsd.rd{,_unz} bsd.gz bsd.strip floppy*.fs rdsetroot + /bin/rm -rf ${IMAGE}.d .include <bsd.obj.mk> .include <bsd.subdir.mk> diff --git a/distrib/sparc64/ramdisk/Makefile b/distrib/sparc64/ramdisk/Makefile index 31418601b39..4e06bc50036 100644 --- a/distrib/sparc64/ramdisk/Makefile +++ b/distrib/sparc64/ramdisk/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.31 2016/10/14 18:44:20 deraadt Exp $ +# $OpenBSD: Makefile,v 1.32 2017/01/27 17:59:09 natano Exp $ TOP= ${.CURDIR}/.. @@ -19,29 +19,17 @@ FLOPPYTYPE?= floppy VND?= vnd0 VND_DEV= /dev/${VND}a VND_RDEV= /dev/r${VND}a -VND_CRDEV= /dev/r${VND}c -PID!= echo $$$$ GZIPCMD?= gzip GZIPFLAGS?= -9nv GZIPEXT?= .gz -MOUNT_POINT?= /mnt -DISKTYPE= rdroot PID!= echo $$$$ REALIMAGE!= echo /var/tmp/image.${PID} -IMAGE?= ramdisk${REV}.fs -IMAGESIZE?= 8192 # 4MB in 512 byte blocks -NEWFS_WILL_FAIL?=false -CRUNCHGENOPTS?= KERNEL?= RAMDISKU1 -UTILS?= ${.CURDIR}/../miniroot -STRIP?= strip -DISKTYPE= rdroot -NBLKS= 6144 -# minfree, opt, b/i trks, sects, cpg -NEWFSARGS= -m 0 -o space -i 4096 +DISKTYPE= rdroot +MAKEFSARGS_RD= -o disklabel=${DISKTYPE},minfree=0,density=4096 .ifndef DESTDIR all ${IMAGE}: @@ -76,7 +64,15 @@ ${BSD_RD}: ${CBIN} ${IMAGE} bsd elfrdsetroot cp bsd ${BSD_RD} ${.OBJDIR}/elfrdsetroot ${BSD_RD} < ${IMAGE} -${IMAGE}: rd_setup do_files rd_teardown +${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 .endif @@ -85,19 +81,6 @@ bsd: su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && env COPTS=-Os ${MAKE}' cp -p ${TOP}/../../sys/arch/sparc64/compile/${KERNEL}/obj/bsd bsd -rd_setup: - dd if=/dev/zero of=${IMAGE} bs=512 count=${NBLKS} - vnconfig -v -c ${VND} ${IMAGE} - disklabel -w ${VND} ${DISKTYPE} - newfs ${NEWFSARGS} ${VND_RDEV} - fsck ${VND_RDEV} - mount ${VND_DEV} ${MOUNT_POINT} - -rd_teardown: - @df -i ${MOUNT_POINT} - -umount ${MOUNT_POINT} - -vnconfig -u ${VND} - elfrdsetroot: ${TOP}/../common/elfrdsetroot.c ${HOSTCC} ${HOSTCFLAGS} -o elfrdsetroot \ ${TOP}/../common/elfrdsetroot.c ${TOP}/../common/elf32.c \ @@ -107,8 +90,6 @@ unconfig: -umount -f ${MOUNT_POINT} -vnconfig -u ${VND} -.PRECIOUS: ${IMAGE} - ${CBIN}.conf: ${LISTS} awk -f ${UTILS}/makeconf.awk CBIN=${CBIN} ${LISTS} > ${CBIN}.conf @@ -118,17 +99,11 @@ ${CBIN}.mk ${CBIN}.cache ${CBIN}.c: ${CBIN}.conf ${CBIN}: ${CBIN}.mk ${CBIN}.cache ${CBIN}.c ${MAKE} -f ${CBIN}.mk SRCLIBDIR=${.CURDIR}/../../../lib all -do_files: - mtree -def ${MTREE} -p ${MOUNT_POINT}/ -u - TOPDIR=${TOP} CURDIR=${.CURDIR} OBJDIR=${.OBJDIR} REV=${REV} \ - ARCHDIR=${.CURDIR}/.. 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 \ lib*.a lib*.olist ${CBIN}.map \ *.o *.lo *.c bsd ${BSD_RD} bsd.gz ${FLOPPY} elfrdsetroot + /bin/rm -rf ${IMAGE}.d .ifdef RELEASEDIR install: diff --git a/distrib/sparc64/ramdiskB/Makefile b/distrib/sparc64/ramdiskB/Makefile index b342a482c6c..4dbf05cc6b7 100644 --- a/distrib/sparc64/ramdiskB/Makefile +++ b/distrib/sparc64/ramdiskB/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.25 2016/10/14 23:52:45 deraadt Exp $ +# $OpenBSD: Makefile,v 1.26 2017/01/27 17:59:09 natano Exp $ TOP= ${.CURDIR}/.. @@ -19,29 +19,17 @@ FLOPPYTYPE?= floppy VND?= vnd0 VND_DEV= /dev/${VND}a VND_RDEV= /dev/r${VND}a -VND_CRDEV= /dev/r${VND}c -PID!= echo $$$$ GZIPCMD?= gzip GZIPFLAGS?= -9nv GZIPEXT?= .gz -MOUNT_POINT?= /mnt -DISKTYPE= rdroot PID!= echo $$$$ REALIMAGE!= echo /var/tmp/image.${PID} -IMAGE?= ramdisk${REV}.fs -IMAGESIZE?= 8192 # 4MB in 512 byte blocks -NEWFS_WILL_FAIL?=false -CRUNCHGENOPTS?= KERNEL?= RAMDISKU5 -UTILS?= ${.CURDIR}/../miniroot -STRIP?= strip -DISKTYPE= rdroot -NBLKS= 6144 -# minfree, opt, b/i trks, sects, cpg -NEWFSARGS= -m 0 -o space -i 8192 +DISKTYPE= rdroot +MAKEFSARGS_RD= -o disklabel=${DISKTYPE},minfree=0,density=8192 .ifndef DESTDIR all ${IMAGE}: @@ -76,7 +64,15 @@ ${BSD_RD}: ${CBIN} ${IMAGE} bsd elfrdsetroot cp bsd ${BSD_RD} ${.OBJDIR}/elfrdsetroot ${BSD_RD} < ${IMAGE} -${IMAGE}: rd_setup do_files rd_teardown +${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 .endif @@ -85,19 +81,6 @@ bsd: su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && env COPTS=-Os ${MAKE}' cp -p ${TOP}/../../sys/arch/sparc64/compile/${KERNEL}/obj/bsd bsd -rd_setup: - dd if=/dev/zero of=${IMAGE} bs=512 count=${NBLKS} - vnconfig -v -c ${VND} ${IMAGE} - disklabel -w ${VND} ${DISKTYPE} - newfs ${NEWFSARGS} ${VND_RDEV} - fsck ${VND_RDEV} - mount ${VND_DEV} ${MOUNT_POINT} - -rd_teardown: - @df -i ${MOUNT_POINT} - -umount ${MOUNT_POINT} - -vnconfig -u ${VND} - elfrdsetroot: ${TOP}/../common/elfrdsetroot.c ${HOSTCC} ${HOSTCFLAGS} -o elfrdsetroot \ ${TOP}/../common/elfrdsetroot.c ${TOP}/../common/elf32.c \ @@ -107,8 +90,6 @@ unconfig: -umount -f ${MOUNT_POINT} -vnconfig -u ${VND} -.PRECIOUS: ${IMAGE} - ${CBIN}.conf: ${LISTS} awk -f ${UTILS}/makeconf.awk CBIN=${CBIN} ${LISTS} > ${CBIN}.conf @@ -118,17 +99,11 @@ ${CBIN}.mk ${CBIN}.cache ${CBIN}.c: ${CBIN}.conf ${CBIN}: ${CBIN}.mk ${CBIN}.cache ${CBIN}.c ${MAKE} -f ${CBIN}.mk SRCLIBDIR=${.CURDIR}/../../../lib all -do_files: - mtree -def ${MTREE} -p ${MOUNT_POINT}/ -u - TOPDIR=${TOP} CURDIR=${.CURDIR} OBJDIR=${.OBJDIR} REV=${REV} \ - ARCHDIR=${.CURDIR}/.. 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 \ lib*.a lib*.olist ${CBIN}.map \ *.o *.lo *.c bsd ${BSD_RD} bsd.gz ${FLOPPY} elfrdsetroot + /bin/rm -rf ${IMAGE}.d .ifdef RELEASEDIR install: |