diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2019-04-30 17:46:07 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2019-04-30 17:46:07 +0000 |
commit | d3aa0d760e1ed38557b0c9da42407fc9ad97d828 (patch) | |
tree | 2dec49beadb3ffe5f5334cd98424fbbab5ba000e /distrib/sparc64 | |
parent | 7f1a8bec460a41a172fb21ffab33697ce8395c12 (diff) |
Every Makefile on every architecture had deviated in unique ways.
Eliminate many more differences. When it makes sense, build bsd.rd
and miniroot/ramdisk.fs and cd.iso in the same directory. More steps
coming after this..
Diffstat (limited to 'distrib/sparc64')
-rw-r--r-- | distrib/sparc64/Makefile | 6 | ||||
-rw-r--r-- | distrib/sparc64/bsd.rd/Makefile | 64 | ||||
-rw-r--r-- | distrib/sparc64/cdfs/Makefile | 15 | ||||
-rw-r--r-- | distrib/sparc64/common/Makefile.inc | 88 | ||||
-rw-r--r-- | distrib/sparc64/iso/Makefile | 11 | ||||
-rw-r--r-- | distrib/sparc64/miniroot/Makefile | 89 | ||||
-rw-r--r-- | distrib/sparc64/miniroot/list (renamed from distrib/sparc64/bsd.rd/list) | 2 | ||||
-rw-r--r-- | distrib/sparc64/ramdisk/Makefile | 95 | ||||
-rw-r--r-- | distrib/sparc64/ramdiskB/Makefile | 87 |
9 files changed, 161 insertions, 296 deletions
diff --git a/distrib/sparc64/Makefile b/distrib/sparc64/Makefile index a8764500282..53c53983375 100644 --- a/distrib/sparc64/Makefile +++ b/distrib/sparc64/Makefile @@ -1,7 +1,7 @@ -# $OpenBSD: Makefile,v 1.11 2017/01/27 17:59:09 natano Exp $ +# $OpenBSD: Makefile,v 1.12 2019/04/30 17:46:05 deraadt Exp $ -# preserve order: 'miniroot' depends on 'bsd.rd', 'cdfs' depends on 'miniroot' -SUBDIR+= ramdisk ramdiskB bsd.rd miniroot cdfs +# preserve order: 'cdfs' depends on 'miniroot' +SUBDIR+= ramdisk ramdiskB miniroot cdfs .if make(obj) || make(cleandir) || make(clean) SUBDIR+= iso diff --git a/distrib/sparc64/bsd.rd/Makefile b/distrib/sparc64/bsd.rd/Makefile deleted file mode 100644 index dc273a23f87..00000000000 --- a/distrib/sparc64/bsd.rd/Makefile +++ /dev/null @@ -1,64 +0,0 @@ -# $OpenBSD: Makefile,v 1.42 2019/04/29 15:56:26 deraadt Exp $ - -IMAGE= ramdisk${OSrev}.fs -LISTS?= ${.CURDIR}/list -UTILS?= ${.CURDIR}/../../miniroot - -STRIPOPTS?= -R .SUNW_ctf -MTREE= ${UTILS}/mtree.conf - -all: bsd.rd - -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 - strip ${STRIPOPTS} bsd.strip - gzip -c -9nv bsd.strip > bsd.rd - -bsd.rd_unz: bsd ${IMAGE} - cp bsd bsd.rd_unz - rdsetroot bsd.rd_unz ${IMAGE} - -bsd: - cd ${.CURDIR}/../../../sys/arch/sparc64/compile/RAMDISK && \ - su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && ${MAKE}' - cp -p ${.CURDIR}/../../../sys/arch/sparc64/compile/RAMDISK/obj/bsd bsd - -${IMAGE}: instbin - rm -rf $@.d - install -d -o root -g wheel $@.d - mtree -def ${MTREE} -p $@.d -u - CURDIR=${.CURDIR} OBJDIR=${.OBJDIR} OSrev=${OSrev} \ - TARGDIR=$@.d UTILS=${UTILS} RELEASEDIR=${RELEASEDIR} \ - sh ${UTILS}/runlist.sh ${LISTS} - rm $@.d/instbin - makefs ${MAKEFSARGS_RD} $@ $@.d - -.ifdef RELEASEDIR -install: -.ifndef NOBSDRD - cp bsd.rd ${RELEASEDIR} - chmod a+r ${RELEASEDIR}/bsd.rd -.endif -.endif - -instbin.conf: ${LISTS} - awk -f ${UTILS}/makeconf.awk ${LISTS} > instbin.conf - -instbin.mk instbin.cache instbin.c: instbin.conf - crunchgen -E -D ${BSDSRCDIR} -L ${DESTDIR}/usr/lib \ - -c instbin.c -e instbin -m instbin.mk instbin.conf - -instbin: instbin.mk instbin.cache instbin.c - ${MAKE} -f instbin.mk SRCLIBDIR=${.CURDIR}/../../../lib all - -clean cleandir: - /bin/rm -f *.core ${IMAGE} instbin instbin.mk instbin*.cache \ - lib*.a lib*.olist instbin.map \ - *.o *.lo *.c bsd bsd.rd{,_unz} bsd.gz bsd.strip floppy*.fs - /bin/rm -rf ${IMAGE}.d - -.include <bsd.obj.mk> -.include <bsd.subdir.mk> diff --git a/distrib/sparc64/cdfs/Makefile b/distrib/sparc64/cdfs/Makefile index ce6ed00fb66..0e1b2330b3c 100644 --- a/distrib/sparc64/cdfs/Makefile +++ b/distrib/sparc64/cdfs/Makefile @@ -1,15 +1,15 @@ -# $OpenBSD: Makefile,v 1.19 2019/04/29 15:56:26 deraadt Exp $ +# $OpenBSD: Makefile,v 1.20 2019/04/30 17:46:05 deraadt Exp $ CDROM= cd${OSrev}.iso all: ${CDROM} ${CDROM}: - -rm -rf ${.OBJDIR}/cd-dir - -mkdir -p ${.OBJDIR}/cd-dir/${OSREV}/sparc64 - -cp ${.OBJDIR}/../bsd.rd/bsd.rd ${.OBJDIR}/cd-dir/${OSREV}/sparc64 + rm -rf ${.OBJDIR}/cd-dir + mkdir -p ${.OBJDIR}/cd-dir/${OSREV}/sparc64 + cp ${.OBJDIR}/../miniroot/bsd.rd ${.OBJDIR}/cd-dir/${OSREV}/sparc64 ln ${.OBJDIR}/cd-dir/${OSREV}/sparc64/bsd.rd ${.OBJDIR}/cd-dir/${OSREV}/sparc64/bsd - -cp ${DESTDIR}/usr/mdec/ofwboot ${.OBJDIR}/cd-dir/${OSREV}/sparc64 + cp ${DESTDIR}/usr/mdec/ofwboot ${.OBJDIR}/cd-dir/${OSREV}/sparc64 echo 'm 1 sun4' > ${.OBJDIR}/cd-dir/.slicemapfile echo 'm 2 sun4c' >> ${.OBJDIR}/cd-dir/.slicemapfile @@ -30,6 +30,10 @@ ${CDROM}: rm -f vnd mksuncd f ${CDROM} ${.OBJDIR}/../miniroot/miniroot${OSrev}.fs +unconfig: + -umount -f ${MOUNT_POINT} + -[ -f vnd ] && vnconfig -u `cat vnd` && rm -f vnd + .ifdef RELEASEDIR install: cp ${CDROM} ${RELEASEDIR} @@ -39,4 +43,3 @@ clean cleandir: /bin/rm -rf ${CDROM} ${.OBJDIR}/cd-dir .include <bsd.obj.mk> -.include <bsd.subdir.mk> diff --git a/distrib/sparc64/common/Makefile.inc b/distrib/sparc64/common/Makefile.inc deleted file mode 100644 index 7737793abdc..00000000000 --- a/distrib/sparc64/common/Makefile.inc +++ /dev/null @@ -1,88 +0,0 @@ -# $OpenBSD: Makefile.inc,v 1.23 2019/04/29 15:56:26 deraadt Exp $ - -IMAGE= mr.fs -CRUNCHCONF?= ${.CURDIR}/../common/instbin.conf -LISTS?= ${.CURDIR}/list -UTILS?= ${.CURDIR}/../../miniroot - -MOUNT_POINT= /mnt -MTREE= ${UTILS}/mtree.conf - -XNAME?= floppy -FS?= ${XNAME}${OSrev}.fs -LISTFLOPPY?= ${.CURDIR}/../common/list_floppy -FLOPPYSIZE?= 144 -FLOPPYSECS?= 18 -FLOPPYTYPE?= floppy3 - -all: ${FS} - -${FS}: bsd.rd - dd if=/dev/zero of=${FS} bs=10k count=${FLOPPYSIZE} - vnconfig -v ${FS} > vnd - disklabel -w `cat vnd` ${FLOPPYTYPE} - newfs -m 0 -o space -i 524288 -c ${FLOPPYSIZE} /dev/r`cat vnd`a - mount /dev/`cat vnd`a ${MOUNT_POINT} - CURDIR=${.CURDIR} OBJDIR=${.OBJDIR} \ - TARGDIR=${MOUNT_POINT} UTILS=${UTILS} \ - RELEASEDIR=${RELEASEDIR} sh ${UTILS}/runlist.sh ${LISTFLOPPY} - installboot -v `cat vnd` - df -i ${MOUNT_POINT} - umount ${MOUNT_POINT} - vnconfig -u `cat vnd` - rm -f vnd - -DISKTYPE?= rdroot -NBLKS?= 3510 -# minfree, opt, b/i trks, sects, cpg -NEWFSARGS= -m 0 -o space -i 4096 - -${IMAGE}: instbin rd_setup do_files rd_teardown - -rd_setup: instbin - dd if=/dev/zero of=${IMAGE} bs=512 count=${NBLKS} - vnconfig -v ${IMAGE} > vnd - disklabel -w `cat vnd` ${DISKTYPE} - newfs ${NEWFSARGS} /dev/r`cat vnd`a - mount /dev/`cat vnd`a ${MOUNT_POINT} - -rd_teardown: - df -i ${MOUNT_POINT} - -umount ${MOUNT_POINT} - -vnconfig -u `cat vnd` - -unconfig: - -umount -f ${MOUNT_POINT} - -[ -f vnd ] && vnconfig -u `cat vnd` && rm -f vnd - -.PRECIOUS: ${IMAGE} - -.ifdef RELEASEDIR -install: -.ifndef NOBSDRD - cp bsd.rd ${RELEASEDIR} - chmod a+r ${RELEASEDIR}/bsd.rd -.endif - cp ${FS} ${RELEASEDIR} -.endif - -instbin.mk instbin.cache instbin.c: ${CRUNCHCONF} - crunchgen -E -D ${BSDSRCDIR} -L ${DESTDIR}/usr/lib \ - -c instbin.c -e instbin -m instbin.mk ${CRUNCHCONF} - -instbin: instbin.mk instbin.cache instbin.c - ${MAKE} -f instbin.mk SRCLIBDIR=${.CURDIR}/../../../lib all - -do_files: - mtree -def ${MTREE} -p ${MOUNT_POINT}/ -u - CURDIR=${.CURDIR} OBJDIR=${.OBJDIR} OSrev=${OSrev} \ - TARGDIR=${MOUNT_POINT} UTILS=${UTILS} RELEASEDIR=${RELEASEDIR} \ - sh ${UTILS}/runlist.sh ${LISTS} - rm ${MOUNT_POINT}/instbin - -clean cleandir: - /bin/rm -f *.core ${IMAGE} instbin instbin.mk instbin*.cache \ - lib*.a lib*.olist instbin.map \ - *.o *.lo *.c bsd bsd.rd bsd.gz bsd.strip floppy*.fs - -.include <bsd.subdir.mk> diff --git a/distrib/sparc64/iso/Makefile b/distrib/sparc64/iso/Makefile index 55945ebd099..b418f71dfbd 100644 --- a/distrib/sparc64/iso/Makefile +++ b/distrib/sparc64/iso/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.19 2019/04/29 15:56:26 deraadt Exp $ +# $OpenBSD: Makefile,v 1.20 2019/04/30 17:46:05 deraadt Exp $ CDROM= install${OSrev}.iso RELXDIR?= /home/relx-${MACHINE} @@ -14,8 +14,8 @@ XBASE= ${RELXDIR}/xbase${OSrev}.tgz ${RELXDIR}/xfont${OSrev}.tgz \ all: ${CDROM} ${CDROM}: ${BASE} ${XBASE} - -rm -rf ${.OBJDIR}/cd-dir - -mkdir -p ${.OBJDIR}/cd-dir/${OSREV}/${MACHINE} + rm -rf ${.OBJDIR}/cd-dir/ + mkdir -p ${.OBJDIR}/cd-dir/${OSREV}/${MACHINE} cp -p ${BASE} ${.OBJDIR}/cd-dir/${OSREV}/${MACHINE} cp -p ${XBASE} ${.OBJDIR}/cd-dir/${OSREV}/${MACHINE} @@ -45,6 +45,10 @@ ${CDROM}: ${BASE} ${XBASE} rm -f vnd mksuncd f ${.OBJDIR}/${CDROM} ${.OBJDIR}/../miniroot/miniroot${OSrev}.fs +unconfig: + -umount -f ${MOUNT_POINT} + -[ -f vnd ] && vnconfig -u `cat vnd` && rm -f vnd + install: cp ${CDROM} ${RELDIR}/ @@ -52,4 +56,3 @@ clean cleandir: /bin/rm -rf ${CDROM} ${.OBJDIR}/cd-dir .include <bsd.obj.mk> -.include <bsd.subdir.mk> diff --git a/distrib/sparc64/miniroot/Makefile b/distrib/sparc64/miniroot/Makefile index 047d61d77f4..d7271d203bc 100644 --- a/distrib/sparc64/miniroot/Makefile +++ b/distrib/sparc64/miniroot/Makefile @@ -1,49 +1,70 @@ -# $OpenBSD: Makefile,v 1.12 2019/04/29 15:56:26 deraadt Exp $ +# $OpenBSD: Makefile,v 1.13 2019/04/30 17:46:06 deraadt Exp $ -TARGET= miniroot${OSrev}.fs +FS= miniroot${OSrev}.fs +FSSIZE= 5760 +FSDISKTYPE= fakeramdisk +MTREE= ${UTILS}/mtree.conf MOUNT_POINT= /mnt -.ifndef DESTDIR -all ${TARGET}: - @echo setenv DESTDIR before making a ramdisk! - @false -.else +LISTS= ${.CURDIR}/list +UTILS= ${.CURDIR}/../../miniroot -all: ${TARGET} +STRIPOPTS= -R .SUNW_ctf -${TARGET}: vn_up install_files installboot showit vn_down +MRDISKTYPE= rdroot +MRMAKEFSARGS= -o disklabel=${MRDISKTYPE},minfree=0,density=4096 -vn_up: blank_filesystem - vnconfig -v ${TARGET} > vnd - disklabel -w `cat vnd` fakeramdisk +all: ${FS} + +${FS}: bsd.gz + dd if=/dev/zero of=${FS} bs=512 count=${FSSIZE} + vnconfig -v ${FS} > vnd + disklabel -w `cat vnd` ${FSDISKTYPE} newfs -m 0 /dev/r`cat vnd`a mount /dev/`cat vnd`a ${MOUNT_POINT} - -showit: + install -c -m 555 -o root -g wheel bsd.gz ${MOUNT_POINT}/bsd + install -c -m 555 -o root -g wheel \ + ${DESTDIR}/usr/mdec/ofwbootfd ${MOUNT_POINT}/ofwboot + installboot -v -r ${MOUNT_POINT} `cat vnd` \ + ${DESTDIR}/usr/mdec/bootblk ${MOUNT_POINT}/ofwboot df -i ${MOUNT_POINT} - -vn_down: umount ${MOUNT_POINT} vnconfig -u `cat vnd` rm -f vnd -install_files: bsd.rd ofwboot +bsd.gz: bsd.rd + gzip -c -9nv < bsd.rd > bsd.gz -bsd.rd: - install -c -m 555 -o root -g wheel \ - ${.OBJDIR}/../bsd.rd/bsd.rd ${MOUNT_POINT}/bsd +bsd.rd: bsd mr.fs + cp bsd bsd.rd_unz + rdsetroot bsd.rd_unz mr.fs + objcopy -Sg -R .comment bsd.rd_unz bsd.rd + strip ${STRIPOPTS} bsd.rd -ofwboot: - install -c -m 555 -o root -g wheel \ - ${DESTDIR}/usr/mdec/ofwbootfd ${MOUNT_POINT}/ofwboot +bsd: + cd ${.CURDIR}/../../../sys/arch/sparc64/compile/RAMDISK && \ + su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && exec ${MAKE}' + cp -p ${.CURDIR}/../../../sys/arch/sparc64/compile/RAMDISK/obj/bsd bsd -installboot: - installboot -v `cat vnd` +mr.fs: instbin + rm -rf $@.d + install -d -o root -g wheel $@.d + mtree -def ${MTREE} -p $@.d -u + CURDIR=${.CURDIR} OBJDIR=${.OBJDIR} OSrev=${OSrev} \ + TARGDIR=$@.d UTILS=${UTILS} RELEASEDIR=${RELEASEDIR} \ + sh ${UTILS}/runlist.sh ${LISTS} + rm $@.d/instbin + makefs ${MRMAKEFSARGS} $@ $@.d -blank_filesystem: - dd if=/dev/zero of=${TARGET} bs=512 count=5760 +instbin.conf: ${LISTS} + awk -f ${UTILS}/makeconf.awk ${LISTS} > instbin.conf -.endif +instbin.mk instbin.cache instbin.c: instbin.conf + crunchgen -E -D ${.CURDIR}/../../.. -L ${DESTDIR}/usr/lib \ + -c instbin.c -e instbin -m instbin.mk instbin.conf + +instbin: instbin.mk instbin.cache instbin.c + ${MAKE} -f instbin.mk SRCLIBDIR=${.CURDIR}/../../../lib all unconfig: -umount -f ${MOUNT_POINT} @@ -51,12 +72,14 @@ unconfig: .ifdef RELEASEDIR install: - cp ${TARGET} ${RELEASEDIR} + cp bsd.rd ${FS} ${RELEASEDIR} + chmod a+r ${RELEASEDIR}/bsd.rd .endif -clean: - rm -f ${TARGET} +clean cleandir: + /bin/rm -f *.core mr.fs instbin instbin.mk instbin*.cache \ + lib*.a lib*.olist instbin.map \ + *.o *.lo *.c bsd bsd.rd{,_unz} bsd.gz bsd.strip ${FS} + /bin/rm -rf mr.fs.d -.include <bsd.own.mk> .include <bsd.obj.mk> -.include <bsd.subdir.mk> diff --git a/distrib/sparc64/bsd.rd/list b/distrib/sparc64/miniroot/list index 97494d133bb..c20fb455dab 100644 --- a/distrib/sparc64/bsd.rd/list +++ b/distrib/sparc64/miniroot/list @@ -1,4 +1,4 @@ -# $OpenBSD: list,v 1.64 2019/04/29 01:48:41 deraadt Exp $ +# $OpenBSD: list,v 1.4 2019/04/30 17:46:06 deraadt Exp $ SRCDIRS distrib/special diff --git a/distrib/sparc64/ramdisk/Makefile b/distrib/sparc64/ramdisk/Makefile index 2e8558445dd..fbfaa405c99 100644 --- a/distrib/sparc64/ramdisk/Makefile +++ b/distrib/sparc64/ramdisk/Makefile @@ -1,51 +1,48 @@ -# $OpenBSD: Makefile,v 1.45 2019/04/29 15:56:26 deraadt Exp $ - -IMAGE= mr.fs -LISTS= ${.CURDIR}/list -UTILS?= ${.CURDIR}/../../miniroot +# $OpenBSD: Makefile,v 1.46 2019/04/30 17:46:06 deraadt Exp $ +FS= floppy${OSrev}.fs +FSSIZE= 2880 +FSDISKTYPE= floppy MOUNT_POINT= /mnt MTREE= ${UTILS}/mtree.conf -FLOPPY= floppy${OSrev}.fs -FLOPPYSIZE?= 2880 -FLOPPYTYPE?= floppy - -DISKTYPE= rdroot -MAKEFSARGS_RD= -o disklabel=${DISKTYPE},minfree=0,density=4096 - -.ifndef DESTDIR -all ${IMAGE}: - @echo setenv DESTDIR before making a ramdisk! - @false -.else +LISTS= ${.CURDIR}/list +UTILS= ${.CURDIR}/../../miniroot -# mix config is not needed. -all: ${FLOPPY} bsd.rd +MRDISKTYPE= rdroot +MRMAKEFSARGS= -o disklabel=${MRDISKTYPE},minfree=0,density=4096 -bsd.gz: bsd.rd - gzip -9nv < bsd.rd > bsd.gz +all: ${FS} -${FLOPPY}: bsd.gz ${BOOT} /usr/ - dd if=/dev/zero of=${FLOPPY} count=${FLOPPYSIZE} - vnconfig -v ${FLOPPY} > vnd - disklabel -w `cat vnd` ${FLOPPYTYPE} - newfs -m 0 -o space -i 524288 -c ${FLOPPYSIZE} /dev/r`cat vnd`a +${FS}: bsd.rd + dd if=/dev/zero of=${FS} bs=512 count=${FSSIZE} + vnconfig -v ${FS} > vnd + disklabel -w `cat vnd` ${FSDISKTYPE} + newfs -m 0 -o space -i 524288 -c ${FSSIZE} /dev/r`cat vnd`a mount /dev/`cat vnd`a ${MOUNT_POINT} - cp ${DESTDIR}/usr/mdec/ofwbootfd ${MOUNT_POINT}/ofwboot - cp bsd.gz ${MOUNT_POINT}/bsd - installboot -v `cat vnd` /usr/mdec/bootblk ${MOUNT_POINT}/ofwboot + install -c -m 555 -o root -g wheel bsd.rd ${MOUNT_POINT}/bsd + install -c -m 555 -o root -g wheel \ + ${DESTDIR}/usr/mdec/ofwbootfd ${MOUNT_POINT}/ofwboot + installboot -v -r ${MOUNT_POINT} `cat vnd` \ + ${DESTDIR}/usr/mdec/bootblk ${MOUNT_POINT}/ofwboot df -i ${MOUNT_POINT} umount ${MOUNT_POINT} vnconfig -u `cat vnd` rm -f vnd -bsd.rd: instbin ${IMAGE} bsd - cp bsd bsd.rd - rdsetroot bsd.rd ${IMAGE} - strip -R .SUNW_ctf bsd.rd +bsd.rd: mr.fs bsd + cp bsd bsd.rd_unz + rdsetroot bsd.rd_unz mr.fs + cp bsd.rd_unz bsd.strip + strip -R .SUNW_ctf bsd.strip + gzip -c -9nv < bsd.strip > bsd.rd -${IMAGE}: instbin +bsd: + cd ${.CURDIR}/../../../sys/arch/sparc64/compile/RAMDISKU1 && \ + su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && exec ${MAKE}' + cp -p ${.CURDIR}/../../../sys/arch/sparc64/compile/RAMDISKU1/obj/bsd bsd + +mr.fs: instbin rm -rf $@.d install -d -o root -g wheel $@.d mtree -def ${MTREE} -p $@.d -u @@ -53,38 +50,36 @@ ${IMAGE}: instbin TARGDIR=$@.d UTILS=${UTILS} RELEASEDIR=${RELEASEDIR} \ sh ${UTILS}/runlist.sh ${LISTS} rm $@.d/instbin - makefs ${MAKEFSARGS_RD} $@ $@.d - -.endif + makefs ${MRMAKEFSARGS} $@ $@.d bsd: cd ${.CURDIR}/../../../sys/arch/sparc64/compile/RAMDISKU1 && \ - su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && env ${MAKE}' + su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && exec ${MAKE}' cp -p ${.CURDIR}/../../../sys/arch/sparc64/compile/RAMDISKU1/obj/bsd bsd -unconfig: - -umount -f ${MOUNT_POINT} - -[ -f vnd ] && vnconfig -u `cat vnd` && rm -f vnd - instbin.conf: ${LISTS} awk -f ${UTILS}/makeconf.awk ${LISTS} > instbin.conf instbin.mk instbin.cache instbin.c: instbin.conf - crunchgen -E -D ${.CURDIR}/../../.. -L ${DESTDIR}/usr/lib ${.ALLSRC} + crunchgen -E -D ${.CURDIR}/../../.. -L ${DESTDIR}/usr/lib \ + -c instbin.c -e instbin -m instbin.mk instbin.conf instbin: instbin.mk instbin.cache instbin.c ${MAKE} -f instbin.mk SRCLIBDIR=${.CURDIR}/../../../lib all -clean cleandir: - /bin/rm -f *.core ${IMAGE} instbin instbin.mk instbin.cache \ - lib*.a lib*.olist instbin.map \ - *.o *.lo *.c bsd bsd.rd bsd.gz ${FLOPPY} - /bin/rm -rf ${IMAGE}.d +unconfig: + -umount -f ${MOUNT_POINT} + -[ -f vnd ] && vnconfig -u `cat vnd` && rm -f vnd .ifdef RELEASEDIR install: - cp ${FLOPPY} ${BSD.RD} ${RELEASEDIR} + cp ${FS} ${RELEASEDIR} .endif +clean cleandir: + /bin/rm -f *.core mr.fs instbin instbin.mk instbin.cache \ + lib*.a lib*.olist instbin.map \ + *.o *.lo *.c bsd bsd.rd bsd.gz ${FLOPPY} + /bin/rm -rf mr.fs.d + .include <bsd.obj.mk> -.include <bsd.subdir.mk> diff --git a/distrib/sparc64/ramdiskB/Makefile b/distrib/sparc64/ramdiskB/Makefile index 27bb571f5c3..e0686642967 100644 --- a/distrib/sparc64/ramdiskB/Makefile +++ b/distrib/sparc64/ramdiskB/Makefile @@ -1,51 +1,44 @@ -# $OpenBSD: Makefile,v 1.39 2019/04/29 15:56:26 deraadt Exp $ - -IMAGE= mr.fs -LISTS= ${.CURDIR}/list -UTILS?= ${.CURDIR}/../../miniroot +# $OpenBSD: Makefile,v 1.40 2019/04/30 17:46:06 deraadt Exp $ +FS= floppyB${OSrev}.fs +FSDISKTYPE= floppy +FSSIZE= 2880 MOUNT_POINT= /mnt MTREE= ${UTILS}/mtree.conf -FLOPPY= floppyB${OSrev}.fs -FLOPPYSIZE?= 2880 -FLOPPYTYPE?= floppy - -DISKTYPE= rdroot -MAKEFSARGS_RD= -o disklabel=${DISKTYPE},minfree=0,density=8192 - -.ifndef DESTDIR -all ${IMAGE}: - @echo setenv DESTDIR before making a ramdisk! - @false -.else +LISTS= ${.CURDIR}/list +UTILS= ${.CURDIR}/../../miniroot -# mix config is not needed. -all: ${FLOPPY} bsd.rd +MRDISKTYPE= rdroot +MRMAKEFSARGS= -o disklabel=${MRDISKTYPE},minfree=0,density=8192 -bsd.gz: bsd.rd - gzip -9nv < bsd.rd > bsd.gz +all: ${FS} -${FLOPPY}: bsd.gz ${BOOT} /usr/ - dd if=/dev/zero of=${FLOPPY} count=${FLOPPYSIZE} - vnconfig -v ${FLOPPY} > vnd - disklabel -w `cat vnd` ${FLOPPYTYPE} - newfs -m 0 -o space -i 524288 -c ${FLOPPYSIZE} /dev/r`cat vnd`a +${FS}: bsd.gz + dd if=/dev/zero of=${FS} bs=512 count=${FSSIZE} + vnconfig -v ${FS} > vnd + disklabel -w `cat vnd` ${FSDISKTYPE} + newfs -m 0 -o space -i 524288 -c ${FSSIZE} /dev/r`cat vnd`a mount /dev/`cat vnd`a ${MOUNT_POINT} - cp ${DESTDIR}/usr/mdec/ofwbootfd ${MOUNT_POINT}/ofwboot cp bsd.gz ${MOUNT_POINT}/bsd - installboot -v `cat vnd` /usr/mdec/bootblk ${MOUNT_POINT}/ofwboot + install -c -m 555 -o root -g wheel \ + ${DESTDIR}/usr/mdec/ofwboot ${MOUNT_POINT}/ofwboot + installboot -v -r ${MOUNT_POINT} `cat vnd` \ + /usr/mdec/bootblk ${MOUNT_POINT}/ofwboot df -i ${MOUNT_POINT} umount ${MOUNT_POINT} vnconfig -u `cat vnd` rm -f vnd -bsd.rd: instbin ${IMAGE} bsd +bsd.gz: bsd.rd + gzip -c -9nv < bsd.rd > bsd.gz + +bsd.rd: bsd mr.fs cp bsd bsd.rd - rdsetroot bsd.rd ${IMAGE} + rdsetroot bsd.rd mr.fs strip -R .SUNW_ctf bsd.rd -${IMAGE}: instbin +mr.fs: instbin rm -rf $@.d install -d -o root -g wheel $@.d mtree -def ${MTREE} -p $@.d -u @@ -53,38 +46,38 @@ ${IMAGE}: instbin TARGDIR=$@.d UTILS=${UTILS} RELEASEDIR=${RELEASEDIR} \ sh ${UTILS}/runlist.sh ${LISTS} rm $@.d/instbin - makefs ${MAKEFSARGS_RD} $@ $@.d - -.endif + makefs ${MRMAKEFSARGS} $@ $@.d bsd: cd ${.CURDIR}/../../../sys/arch/sparc64/compile/RAMDISKU5 && \ - su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && ${MAKE}' + su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && exec ${MAKE}' cp -p ${.CURDIR}/../../../sys/arch/sparc64/compile/RAMDISKU5/obj/bsd bsd -unconfig: - -umount -f ${MOUNT_POINT} - -[ -f vnd ] && vnconfig -u `cat vnd` && rm -f vnd - instbin.conf: ${LISTS} awk -f ${UTILS}/makeconf.awk ${LISTS} > instbin.conf instbin.mk instbin.cache instbin.c: instbin.conf - crunchgen -E -D ${.CURDIR}/../../.. -L ${DESTDIR}/usr/lib ${.ALLSRC} + crunchgen -E -D ${.CURDIR}/../../.. -L ${DESTDIR}/usr/lib \ + -c instbin.c -e instbin -m instbin.mk instbin.conf instbin: instbin.mk instbin.cache instbin.c ${MAKE} -f instbin.mk SRCLIBDIR=${.CURDIR}/../../../lib all -clean cleandir: - /bin/rm -f *.core ${IMAGE} instbin instbin.mk instbin.cache \ - lib*.a lib*.olist instbin.map \ - *.o *.lo *.c bsd bsd.rd bsd.gz ${FLOPPY} - /bin/rm -rf ${IMAGE}.d +unconfig: + -umount -f ${MOUNT_POINT} + -[ -f vnd ] && vnconfig -u `cat vnd` && rm -f vnd .ifdef RELEASEDIR install: - cp ${FLOPPY} ${BSD.RD} ${RELEASEDIR} + cp bsd.rd ${RELEASEDIR}/bsd.rd + chmod a+r ${RELEASEDIR}/bsd.rd + cp ${FS} ${RELEASEDIR} .endif +clean cleandir: + /bin/rm -f *.core mr.fs instbin instbin.mk instbin.cache \ + lib*.a lib*.olist instbin.map \ + *.o *.lo *.c bsd bsd.rd bsd.gz ${FS} + /bin/rm -rf mr.fs.d + .include <bsd.obj.mk> -.include <bsd.subdir.mk> |