diff options
73 files changed, 1163 insertions, 1846 deletions
diff --git a/distrib/alpha/Makefile b/distrib/alpha/Makefile index 0149db1ed34..22efc74cc34 100644 --- a/distrib/alpha/Makefile +++ b/distrib/alpha/Makefile @@ -1,6 +1,6 @@ -# $OpenBSD: Makefile,v 1.13 2017/09/17 16:31:59 deraadt Exp $ +# $OpenBSD: Makefile,v 1.14 2019/04/30 17:46:00 deraadt Exp $ -SUBDIR= bsd.rd miniroot cdfs +SUBDIR= miniroot .if make(obj) || make(cleandir) || make(clean) SUBDIR+= iso @@ -8,10 +8,5 @@ SUBDIR+= iso 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 deleted file mode 100644 index 7c24cf4bf7c..00000000000 --- a/distrib/alpha/bsd.rd/Makefile +++ /dev/null @@ -1,67 +0,0 @@ -# $OpenBSD: Makefile,v 1.37 2019/04/29 15:56:23 deraadt Exp $ - -IMAGE= ramdisk${OSrev}.fs - -STRIPOPTS?= -R .SUNW_ctf -R .shstrtab - -UTILS= ${.CURDIR}/../../miniroot -LISTS?= ${.CURDIR}/../common/list -MTREE= ${UTILS}/mtree.conf -STRIPOPTS?= -R .eh_frame -R .SUNW_ctf -R .shstrtab - -LISTS+= ${.CURDIR}/list.local - -all: bsd.rd - -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 - 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} - strip -R .SUNW_ctf -R .shstrtab bsd.rd_unz - -bsd: - cd ${.CURDIR}/../../../sys/arch/alpha/compile/RAMDISKBIG && \ - su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && ${MAKE}' - cp -p ${.CURDIR}/../../../sys/arch/alpha/compile/RAMDISKBIG/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 - -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 instbin.conf - -instbin: instbin.mk instbin.cache instbin.c - ${MAKE} -f instbin.mk SRCLIBDIR=${.CURDIR}/../../../lib all - strip ${STRIPOPTS} instbin - -clean cleandir: - /bin/rm -f *.core ${IMAGE} instbin instbin.mk instbin.cache \ - *.o *.lo *.c \ - lib*.a lib*.olist instbin.map ${CLEANFILES} - /bin/rm -rf ${IMAGE}.d - -.include <bsd.obj.mk> -.include <bsd.subdir.mk> - -.ifdef RELEASEDIR -beforeinstall: - cp bsd.rd ${RELEASEDIR} - chmod a+r ${RELEASEDIR}/bsd.rd -.endif diff --git a/distrib/alpha/cdfs/Makefile b/distrib/alpha/cdfs/Makefile deleted file mode 100644 index 1707a992a9c..00000000000 --- a/distrib/alpha/cdfs/Makefile +++ /dev/null @@ -1,51 +0,0 @@ -# $OpenBSD: Makefile,v 1.10 2019/04/29 15:56:24 deraadt Exp $ - -CDROM= cd${OSrev}.iso -MOUNT_POINT= /mnt - -all: ${CDROM} - -${CDROM}: - -rm -rf ${.OBJDIR}/cd-dir - mkdir -p ${.OBJDIR}/cd-dir/${OSREV}/${MACHINE} - - cp ${.OBJDIR}/../bsd.rd/bsd.rd ${.OBJDIR}/cd-dir/${OSREV}/${MACHINE} - - # make sure right kernel is in / - ln ${.OBJDIR}/cd-dir/${OSREV}/${MACHINE}/bsd.rd ${.OBJDIR}/cd-dir/bsd.rd - ln ${.OBJDIR}/cd-dir/bsd.rd ${.OBJDIR}/cd-dir/bsd - - cp ${DESTDIR}/usr/mdec/boot ${.OBJDIR}/cd-dir/${OSREV}/${MACHINE} - cp ${DESTDIR}/usr/mdec/bootxx ${.OBJDIR}/cd-dir/${OSREV}/${MACHINE} - - (mkhybrid -a -R -v -v -T -L -d -D -N -o ${.OBJDIR}/${CDROM} \ - -A "OpenBSD ${OSREV} ${MACHINE} bootonly CD" \ - -P "Copyright (c) `date +%Y` Theo de Raadt, The OpenBSD project" \ - -p "Theo de Raadt <deraadt@openbsd.org>" \ - -V "OpenBSD/${MACHINE} ${OSREV} boot-only CD" \ - ${.OBJDIR}/cd-dir 2>&1) | tee log - vnconfig -v ${CDROM} > vnd - mount -t cd9660 /dev/`cat vnd`a ${MOUNT_POINT} - /usr/mdec/installboot -v \ - -s `cat log | grep -v 'Name' | egrep "/cd-dir/${OSREV}/${MACHINE}/boot$$" | cut -d' ' -f1` \ - -e `cat log | grep -v 'Name' | egrep "/cd-dir/${OSREV}/${MACHINE}/boot$$" | cut -d' ' -f2` \ - ${MOUNT_POINT}/${OSREV}/${MACHINE}/boot /usr/mdec/bootxx `cat vnd` - umount ${MOUNT_POINT} - vnconfig -u `cat vnd` - rm -f vnd - -.ifdef RELEASEDIR -install: - cp ${CDROM} ${RELEASEDIR} -.endif - -clean cleandir: - /bin/rm -f ${CDROM} - rm -rf cd-dir log - -unconfig: - -umount -f ${MOUNT_POINT} - -[ -f vnd ] && vnconfig -u `cat vnd` && rm -f vnd - -.include <bsd.obj.mk> -.include <bsd.subdir.mk> diff --git a/distrib/alpha/common/Makefile.inc b/distrib/alpha/common/Makefile.inc deleted file mode 100644 index eb01bb24454..00000000000 --- a/distrib/alpha/common/Makefile.inc +++ /dev/null @@ -1,99 +0,0 @@ -# $OpenBSD: Makefile.inc,v 1.43 2019/04/29 15:56:25 deraadt Exp $ - -IMAGE= ramdisk${OSrev}.fs - -MOUNT_POINT= /mnt - -STRIPOPTS?= -R .SUNW_ctf -R .shstrtab -INSTALLBOOT?= /usr/mdec/installboot -v - -XNAME?= floppy -FLOPPY?= ${XNAME}${OSrev}.fs -FLOPPYBLKS?= 2880 -FLOPPYTYPE?= floppy -BOOT?= /usr/mdec/boot -BOOTXX?= /usr/mdec/bootxx - -UTILS= ${.CURDIR}/../../miniroot - -LISTS?= ${.CURDIR}/../common/list -CRUNCHCONF?= instbin.conf -MTREE= ${UTILS}/mtree.conf -STRIPOPTS?= -R .eh_frame -R .SUNW_ctf -R .shstrtab - -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 instbin.conf - -instbin: instbin.mk instbin.cache instbin.c - ${MAKE} -f instbin.mk SRCLIBDIR=${.CURDIR}/../../../lib all - strip ${STRIPOPTS} instbin - -all: ${FLOPPY} - -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_FD= -i 524288 -c ${FLOPPYBLKS} - -CLEANFILES+= bsd bsd.rd bsd.gz ${FLOPPY} - -${FLOPPY}: bsd.gz - dd if=/dev/zero of=${FLOPPY} count=${FLOPPYBLKS} - vnconfig -v ${FLOPPY} > vnd - disklabel -w `cat vnd` ${FLOPPYTYPE} - newfs ${NEWFSARGS} ${NEWFSARGS_FD} -s ${FLOPPYBLKS} /dev/r`cat vnd`a - mount /dev/`cat vnd`a ${MOUNT_POINT} - dd if=${DESTDIR}/${BOOT} of=${MOUNT_POINT}/boot bs=512 - dd if=bsd.gz of=${MOUNT_POINT}/bsd bs=512 - ${INSTALLBOOT} ${MOUNT_POINT}/boot ${BOOTXX} `cat vnd` - df -i ${MOUNT_POINT} - umount ${MOUNT_POINT} - vnconfig -u `cat vnd` - rm -f vnd - -bsd.gz: bsd.rd - objcopy -Sg -R .comment -R .SUNW_ctf -R .shstrtab -R .shstrtab bsd.rd bsd.strip - strip bsd.strip - gzip -c -9nv bsd.strip > bsd.gz - -bsd.rd: bsd ${IMAGE} - cp bsd bsd.rd - rdsetroot bsd.rd ${IMAGE} - -bsd: - cd ${.CURDIR}/../../../sys/arch/alpha/compile/${RAMDISK} && \ - su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && ${MAKE}' - cp -p ${.CURDIR}/../../../sys/arch/alpha/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 - -unconfig: - -umount -f ${MOUNT_POINT} - -[ -f vnd ] && vnconfig -u `cat vnd` && rm -f vnd - -.ifdef RELEASEDIR -beforeinstall: - cp ${FLOPPY} ${RELEASEDIR} -.endif - -clean cleandir: - /bin/rm -f *.core ${IMAGE} instbin instbin.mk instbin.cache \ - *.o *.lo *.c \ - lib*.a lib*.olist instbin.map ${CLEANFILES} - /bin/rm -rf ${IMAGE}.d - -.include <bsd.obj.mk> -.include <bsd.subdir.mk> diff --git a/distrib/alpha/floppy/Makefile b/distrib/alpha/floppy/Makefile deleted file mode 100644 index 19fd646b1ae..00000000000 --- a/distrib/alpha/floppy/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -# $OpenBSD: Makefile,v 1.2 2015/09/19 10:42:10 miod Exp $ - -RAMDISK=RAMDISK -XNAME=floppy - -.include "${.CURDIR}/../common/Makefile.inc" diff --git a/distrib/alpha/floppyB/Makefile b/distrib/alpha/floppyB/Makefile deleted file mode 100644 index 91d3f641076..00000000000 --- a/distrib/alpha/floppyB/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -# $OpenBSD: Makefile,v 1.2 2015/09/19 10:42:10 miod Exp $ - -RAMDISK=RAMDISKB -XNAME=floppyB - -.include "${.CURDIR}/../common/Makefile.inc" diff --git a/distrib/alpha/floppyC/Makefile b/distrib/alpha/floppyC/Makefile deleted file mode 100644 index 3345d8299d7..00000000000 --- a/distrib/alpha/floppyC/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -# $OpenBSD: Makefile,v 1.3 2015/09/19 10:42:10 miod Exp $ - -RAMDISK=RAMDISKC -XNAME=floppyC - -.include "${.CURDIR}/../common/Makefile.inc" diff --git a/distrib/alpha/iso/Makefile b/distrib/alpha/iso/Makefile index 3e607fd8e1b..727fd6fd0c0 100644 --- a/distrib/alpha/iso/Makefile +++ b/distrib/alpha/iso/Makefile @@ -1,9 +1,10 @@ -# $OpenBSD: Makefile,v 1.17 2019/04/29 15:56:25 deraadt Exp $ +# $OpenBSD: Makefile,v 1.18 2019/04/30 17:46:03 deraadt Exp $ CDROM= install${OSrev}.iso +MOUNT_POINT= /mnt + RELXDIR?= /home/relx-${MACHINE} RELDIR?= /home/rel-${MACHINE} -MOUNT_POINT= /mnt BASE= ${RELDIR}/base${OSrev}.tgz ${RELDIR}/comp${OSrev}.tgz \ ${RELDIR}/game${OSrev}.tgz ${RELDIR}/man${OSrev}.tgz \ @@ -15,7 +16,7 @@ XBASE= ${RELXDIR}/xbase${OSrev}.tgz ${RELXDIR}/xfont${OSrev}.tgz \ all: ${CDROM} ${CDROM}: ${BASE} ${XBASE} - -rm -rf ${.OBJDIR}/cd-dir + rm -rf ${.OBJDIR}/cd-dir mkdir -p ${.OBJDIR}/cd-dir/${OSREV}/${MACHINE} cp -p ${BASE} ${.OBJDIR}/cd-dir/${OSREV}/${MACHINE} @@ -48,6 +49,10 @@ ${CDROM}: ${BASE} ${XBASE} vnconfig -u `cat vnd` rm -f vnd +unconfig: + -umount -f ${MOUNT_POINT} + -[ -f vnd ] && vnconfig -u `cat vnd` && rm -f vnd + install: cp ${CDROM} ${RELDIR}/ @@ -55,9 +60,4 @@ clean cleandir: /bin/rm -f ${CDROM} rm -rf cd-dir log -unconfig: - -umount -f ${MOUNT_POINT} - -[ -f vnd ] && vnconfig -u `cat vnd` && rm -f vnd - .include <bsd.obj.mk> -.include <bsd.subdir.mk> diff --git a/distrib/alpha/miniroot/Makefile b/distrib/alpha/miniroot/Makefile index 97bdcd45087..6f496bd1134 100644 --- a/distrib/alpha/miniroot/Makefile +++ b/distrib/alpha/miniroot/Makefile @@ -1,50 +1,102 @@ -# $OpenBSD: Makefile,v 1.7 2019/04/29 15:56:25 deraadt Exp $ +# $OpenBSD: Makefile,v 1.8 2019/04/30 17:46:03 deraadt Exp $ FS= miniroot${OSrev}.fs +FSSIZE= 5760 +FSDISKTYPE= fakeramdisk +CDROM= cd${OSrev}.iso MOUNT_POINT= /mnt +MTREE= ${UTILS}/mtree.conf -.ifndef DESTDIR -all ${FS}: - @echo setenv DESTDIR before making a ramdisk! - @false -.else +LISTS= ${.CURDIR}/../common/list ${.CURDIR}/list.local +UTILS= ${.CURDIR}/../../miniroot -all: ${FS} +STRIPOPTS= -R .eh_frame -R .SUNW_ctf -R .shstrtab -${FS}: vn_up install_files installboot showit vn_down +MRDISKTYPE= rdroot +MRMAKEFSARGS= -o disklabel=${MRDISKTYPE},minfree=0,density=8192 -vn_up: blank_filesystem +all: ${FS} ${CDROM} + +${FS}: bsd.rd + dd if=/dev/zero of=${FS} bs=512 count=${FSSIZE} vnconfig -v ${FS} > vnd - disklabel -w `cat vnd` fakeramdisk + 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.rd ${MOUNT_POINT}/bsd + install -c -m 555 -o root -g wheel \ + ${DESTDIR}/usr/mdec/boot ${MOUNT_POINT}/boot + /usr/mdec/installboot -v \ + ${MOUNT_POINT}/boot ${DESTDRIR}/usr/mdec/bootxx `cat vnd` df -i ${MOUNT_POINT} - -vn_down: umount ${MOUNT_POINT} vnconfig -u `cat vnd` rm -f vnd -install_files: bsd.rd boot - -bsd.rd: - install -c -m 555 -o root -g wheel \ - ${.OBJDIR}/../bsd.rd/bsd.rd ${MOUNT_POINT}/bsd - -boot: - install -c -m 555 -o root -g wheel \ - ${DESTDIR}/usr/mdec/boot ${MOUNT_POINT}/boot - -installboot: - /usr/mdec/installboot -v ${MOUNT_POINT}/boot \ - ${DESTDRIR}/usr/mdec/bootxx `cat vnd` - -blank_filesystem: - dd if=/dev/zero of=${FS} bs=512 count=5760 +${CDROM}: bsd.rd + rm -rf ${.OBJDIR}/cd-dir + mkdir -p ${.OBJDIR}/cd-dir/${OSREV}/${MACHINE} + + cp bsd.rd ${.OBJDIR}/cd-dir/${OSREV}/${MACHINE} + + # make sure right kernel is in / + ln ${.OBJDIR}/cd-dir/${OSREV}/${MACHINE}/bsd.rd ${.OBJDIR}/cd-dir/bsd.rd + ln ${.OBJDIR}/cd-dir/bsd.rd ${.OBJDIR}/cd-dir/bsd + + cp ${DESTDIR}/usr/mdec/boot ${.OBJDIR}/cd-dir/${OSREV}/${MACHINE} + cp ${DESTDIR}/usr/mdec/bootxx ${.OBJDIR}/cd-dir/${OSREV}/${MACHINE} + + (mkhybrid -a -R -v -v -T -L -d -D -N -o ${.OBJDIR}/${CDROM} \ + -A "OpenBSD ${OSREV} ${MACHINE} bootonly CD" \ + -P "Copyright (c) `date +%Y` Theo de Raadt, The OpenBSD project" \ + -p "Theo de Raadt <deraadt@openbsd.org>" \ + -V "OpenBSD/${MACHINE} ${OSREV} boot-only CD" \ + ${.OBJDIR}/cd-dir 2>&1) | tee log + vnconfig -v ${CDROM} > vnd + mount -t cd9660 /dev/`cat vnd`a ${MOUNT_POINT} + /usr/mdec/installboot -v \ + -s `cat log | grep -v 'Name' | egrep "/cd-dir/${OSREV}/${MACHINE}/boot$$" | cut -d' ' -f1` \ + -e `cat log | grep -v 'Name' | egrep "/cd-dir/${OSREV}/${MACHINE}/boot$$" | cut -d' ' -f2` \ + ${MOUNT_POINT}/${OSREV}/${MACHINE}/boot /usr/mdec/bootxx `cat vnd` + umount ${MOUNT_POINT} + vnconfig -u `cat vnd` + rm -f vnd -.endif +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 mr.fs + cp bsd bsd.rd_unz + rdsetroot bsd.rd_unz mr.fs + strip -R .SUNW_ctf -R .shstrtab bsd.rd_unz + +bsd: + cd ${.CURDIR}/../../../sys/arch/alpha/compile/RAMDISKBIG && \ + su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && exec ${MAKE}' + cp -p ${.CURDIR}/../../../sys/arch/alpha/compile/RAMDISKBIG/obj/bsd bsd + +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 + +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 \ + -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 + strip ${STRIPOPTS} instbin unconfig: -umount -f ${MOUNT_POINT} @@ -52,12 +104,16 @@ unconfig: .ifdef RELEASEDIR install: + cp bsd.rd ${RELEASEDIR} + chmod a+r ${RELEASEDIR}/bsd.rd cp ${FS} ${RELEASEDIR} + cp ${CDROM} ${RELEASEDIR} .endif -clean: - rm -f ${FS} +clean cleandir: + /bin/rm -f *.core mr.fs instbin instbin.mk instbin.cache \ + *.o *.lo *.c \ + lib*.a lib*.olist instbin.map ${CLEANFILES} + /bin/rm -rf mr.fs.d -.include <bsd.own.mk> .include <bsd.obj.mk> -.include <bsd.subdir.mk> diff --git a/distrib/alpha/bsd.rd/list.local b/distrib/alpha/miniroot/list.local index c8d52363fe5..c8d52363fe5 100644 --- a/distrib/alpha/bsd.rd/list.local +++ b/distrib/alpha/miniroot/list.local diff --git a/distrib/amd64/cdfs/Makefile b/distrib/amd64/cdfs/Makefile index 1b93032bccb..ccc235e1647 100644 --- a/distrib/amd64/cdfs/Makefile +++ b/distrib/amd64/cdfs/Makefile @@ -1,11 +1,11 @@ -# $OpenBSD: Makefile,v 1.11 2019/04/29 15:56:25 deraadt Exp $ +# $OpenBSD: Makefile,v 1.12 2019/04/30 17:46:03 deraadt Exp $ CDROM= cd${OSrev}.iso all: ${CDROM} ${CDROM}: - -rm -rf ${.OBJDIR}/cd-dir + rm -rf ${.OBJDIR}/cd-dir mkdir -p ${.OBJDIR}/cd-dir/${OSREV}/amd64 mkdir -p ${.OBJDIR}/cd-dir/etc echo "set image /${OSREV}/amd64/bsd.rd" > ${.OBJDIR}/cd-dir/etc/boot.conf @@ -30,4 +30,3 @@ clean cleandir: rm -rf cd-dir .include <bsd.obj.mk> -.include <bsd.subdir.mk> diff --git a/distrib/amd64/iso/Makefile b/distrib/amd64/iso/Makefile index ea7fe63616a..f75dd614a4c 100644 --- a/distrib/amd64/iso/Makefile +++ b/distrib/amd64/iso/Makefile @@ -1,10 +1,9 @@ -# $OpenBSD: Makefile,v 1.28 2019/04/29 15:56:25 deraadt Exp $ - -CDROM= install${OSrev}.iso +# $OpenBSD: Makefile,v 1.29 2019/04/30 17:46:03 deraadt Exp $ FS= install${OSrev}.fs FSSIZE= 921536 FSTYPE= install360 +CDROM= install${OSrev}.iso MOUNT_POINT= /mnt MTREE= ${UTILS}/mtree.conf @@ -20,7 +19,6 @@ BASE= ${RELDIR}/base${OSrev}.tgz ${RELDIR}/comp${OSrev}.tgz \ XBASE= ${RELXDIR}/xbase${OSrev}.tgz ${RELXDIR}/xfont${OSrev}.tgz \ ${RELXDIR}/xshare${OSrev}.tgz ${RELXDIR}/xserv${OSrev}.tgz -BOOT?= ${DESTDIR}/usr/mdec/boot EFIBOOT?= ${DESTDIR}/usr/mdec/BOOTX64.EFI ${DESTDIR}/usr/mdec/BOOTIA32.EFI MSDOSSIZE= 960 TOTALSIZE!= expr ${FSSIZE} + ${MSDOSSIZE} @@ -44,7 +42,7 @@ ${FS}: ${BASE} ${XBASE} bsd.gz .endif newfs -m 0 -o space -i 524288 -c ${FSSIZE} /dev/r`cat vnd`a mount /dev/`cat vnd`a ${MOUNT_POINT} - cp ${BOOT} ${MOUNT_POINT}/boot + cp ${DESTDIR}/usr/mdec/boot ${MOUNT_POINT}/boot strip ${MOUNT_POINT}/boot strip -R .comment -R .SUNW_ctf ${MOUNT_POINT}/boot dd if=bsd.gz of=${MOUNT_POINT}/bsd bs=512 @@ -66,7 +64,7 @@ ${FS}: ${BASE} ${XBASE} bsd.gz rm -f vnd ${CDROM}: ${BASE} ${XBASE} - -rm -rf ${.OBJDIR}/cd-dir + rm -rf ${.OBJDIR}/cd-dir mkdir -p ${.OBJDIR}/cd-dir/${OSREV}/${MACHINE} mkdir -p ${.OBJDIR}/cd-dir/etc echo "set image /${OSREV}/${MACHINE}/bsd.rd" > ${.OBJDIR}/cd-dir/etc/boot.conf @@ -106,4 +104,3 @@ bsd.rd: ${BSDRD} cp ${BSDRD} bsd.rd .include <bsd.obj.mk> -.include <bsd.subdir.mk> diff --git a/distrib/amd64/ramdiskA/Makefile b/distrib/amd64/ramdiskA/Makefile index a3fbf025342..490673d1ec7 100644 --- a/distrib/amd64/ramdiskA/Makefile +++ b/distrib/amd64/ramdiskA/Makefile @@ -1,10 +1,87 @@ -# $OpenBSD: Makefile,v 1.3 2016/10/19 16:49:58 deraadt Exp $ +# $OpenBSD: Makefile,v 1.4 2019/04/30 17:46:03 deraadt Exp $ -.PATH: ${.CURDIR}/../ramdiskA -BOOT=${DESTDIR}/usr/mdec/fdboot -RAMDISK=RAMDISK -NOBSDRD=1 +FS= floppy${OSrev}.fs +FSSIZE= 2880 +FSDISKTYPE= floppy3 +MOUNT_POINT= /mnt +MTREE= ${UTILS}/mtree.conf -.include "${.CURDIR}/Makefile.inc" +LISTS= ${.CURDIR}/../common/list ${.CURDIR}/list.local +UTILS= ${.CURDIR}/../../miniroot -LISTS+= ${.CURDIR}/list.local +EFIBOOT= ${DESTDIR}/usr/mdec/BOOTX64.EFI ${DESTDIR}/usr/mdec/BOOTIA32.EFI + +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 -o space -i 524288 -c ${FSSIZE} /dev/r`cat vnd`a + mount /dev/`cat vnd`a ${MOUNT_POINT} + cp ${DESTDIR}/usr/mdec/fdboot ${.OBJDIR}/boot + strip ${.OBJDIR}/boot + strip -R .comment -R .SUNW_ctf ${.OBJDIR}/boot + installboot -v -r ${MOUNT_POINT} `cat vnd` \ + ${DESTDIR}/usr/mdec/biosboot ${.OBJDIR}/boot + dd if=bsd.gz of=${MOUNT_POINT}/bsd bs=512 + df -i ${MOUNT_POINT} + umount ${MOUNT_POINT} + vnconfig -u `cat vnd` + rm -f vnd + +MRDISKTYPE= rdroot +MRMAKEFSARGS= -o disklabel=${MRDISKTYPE},minfree=0,density=4096 + +bsd.gz: bsd.rd + cp bsd.rd bsd.strip + strip bsd.strip + strip -R .comment -R .SUNW_ctf bsd.strip + gzip -c9n bsd.strip > bsd.gz + +bsd.rd: mr.fs bsd + cp bsd bsd.rd + rdsetroot bsd.rd mr.fs + +bsd: + cd ${.CURDIR}/../../../sys/arch/amd64/compile/RAMDISK && \ + su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && exec ${MAKE}' + cp -p ${.CURDIR}/../../../sys/arch/amd64/compile/RAMDISK/obj/bsd bsd + +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 + +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 + strip -R .comment -R .SUNW_ctf instbin + +instbin.conf: ${LISTS} + awk -f ${UTILS}/makeconf.awk ${LISTS} > instbin.conf + +unconfig: + -umount -f ${MOUNT_POINT} + -[ -f vnd ] && vnconfig -u `cat vnd` && rm -f vnd + +.ifdef RELEASEDIR +install: + cp ${FS} ${RELEASEDIR}/${FS} +.endif # RELEASEDIR + +clean cleandir: + /bin/rm -f *.core mr.fs instbin instbin.mk instbin*.cache \ + *.o *.lo *.c bsd bsd.rd bsd.gz bsd.strip floppy*.fs \ + lib*.a lib*.olist instbin.map boot instbin.conf ${FS} + /bin/rm -rf mr.fs.d + +.include <bsd.obj.mk> diff --git a/distrib/amd64/ramdiskA/Makefile.inc b/distrib/amd64/ramdiskA/Makefile.inc deleted file mode 100644 index 585ec450a8e..00000000000 --- a/distrib/amd64/ramdiskA/Makefile.inc +++ /dev/null @@ -1,104 +0,0 @@ -# $OpenBSD: Makefile.inc,v 1.14 2019/04/29 15:56:25 deraadt Exp $ - -LISTS?= ${.CURDIR}/../common/list -UTILS?= ${.CURDIR}/../../miniroot - -MOUNT_POINT= /mnt -MTREE= ${UTILS}/mtree.conf - -FS?= floppy${OSrev}.fs -BOOT?= ${DESTDIR}/usr/mdec/boot -EFIBOOT?= ${DESTDIR}/usr/mdec/BOOTX64.EFI ${DESTDIR}/usr/mdec/BOOTIA32.EFI -FLOPPYSIZE?= 2880 -FLOPPYTYPE?= floppy3 - -all: ${FS} - -${FS}: bsd.gz - dd if=/dev/zero of=${FS} bs=512 count=${FLOPPYSIZE} - vnconfig -v ${FS} > vnd -.ifdef TEMPLATE - disklabel -wAT ${TEMPLATE} `cat vnd` - newfs -t msdos /dev/r`cat vnd`i - mount /dev/`cat vnd`i ${MOUNT_POINT} - mkdir -p ${MOUNT_POINT}/efi/boot - cp ${EFIBOOT} ${MOUNT_POINT}/efi/boot - umount ${MOUNT_POINT} -.else - disklabel -w `cat vnd` ${FLOPPYTYPE} -.endif - newfs -m 0 -o space -i 524288 -c ${FLOPPYSIZE} /dev/r`cat vnd`a - mount /dev/`cat vnd`a ${MOUNT_POINT} - cp ${BOOT} ${.OBJDIR}/boot - strip ${.OBJDIR}/boot - strip -R .comment -R .SUNW_ctf ${.OBJDIR}/boot - installboot -v -r ${MOUNT_POINT} `cat vnd` \ - ${DESTDIR}/usr/mdec/biosboot ${.OBJDIR}/boot - dd if=bsd.gz of=${MOUNT_POINT}/bsd bs=512 - df -i ${MOUNT_POINT} - umount ${MOUNT_POINT} - vnconfig -u `cat vnd` - rm -f vnd - -unconfig: - -umount -f ${MOUNT_POINT} - -[ -f vnd ] && vnconfig -u `cat vnd` && rm -f vnd - -DISKTYPE= rdroot -MAKEFSARGS_RD= -o disklabel=${DISKTYPE},minfree=0,density=4096 - -bsd.gz: bsd.rd - cp bsd.rd bsd.strip - strip bsd.strip - strip -R .comment -R .SUNW_ctf bsd.strip - gzip -c9n bsd.strip > bsd.gz - -bsd.rd: mr.fs bsd - cp bsd bsd.rd - rdsetroot bsd.rd mr.fs - -bsd: - cd ${.CURDIR}/../../../sys/arch/amd64/compile/${RAMDISK} && \ - su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && ${MAKE}' - cp -p ${.CURDIR}/../../../sys/arch/amd64/compile/${RAMDISK}/obj/bsd bsd - -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 ${MAKEFSARGS_RD} $@ $@.d - -.ifdef RELEASEDIR -install: -.ifndef NOBSDRD - cp bsd.rd ${RELEASEDIR}/bsd.rd - chmod a+r ${RELEASEDIR}/bsd.rd -.endif -.ifndef NOFS - cp ${FS} ${RELEASEDIR}/${FS} -.endif -.endif # RELEASEDIR - -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 - strip -R .comment -R .SUNW_ctf instbin - -instbin.conf: ${LISTS} - awk -f ${UTILS}/makeconf.awk ${LISTS} > instbin.conf - -clean cleandir: - /bin/rm -f *.core mr.fs instbin instbin.mk instbin*.cache \ - *.o *.lo *.c bsd bsd.rd bsd.gz bsd.strip floppy*.fs \ - lib*.a lib*.olist instbin.map boot instbin.conf ${FS} - /bin/rm -rf mr.fs.d - -.include <bsd.obj.mk> -.include <bsd.subdir.mk> diff --git a/distrib/amd64/ramdisk_cd/Makefile b/distrib/amd64/ramdisk_cd/Makefile index 9a83e935de3..de824f66901 100644 --- a/distrib/amd64/ramdisk_cd/Makefile +++ b/distrib/amd64/ramdisk_cd/Makefile @@ -1,13 +1,95 @@ -# $OpenBSD: Makefile,v 1.12 2017/07/08 15:39:11 florian Exp $ +# $OpenBSD: Makefile,v 1.13 2019/04/30 17:46:03 deraadt Exp $ -.PATH: ${.CURDIR}/../ramdisk -RAMDISK=RAMDISK_CD -DISKTYPE=rdrootb -FLOPPYSIZE=9600 -FLOPPYTYPE=mini34 -LBA=1 -TEMPLATE=${.CURDIR}/template +FS= miniroot${OSrev}.fs +FSSIZE= 9600 +FSDISKTYPE= mini34 +MOUNT_POINT= /mnt +MTREE= ${UTILS}/mtree.conf -.include "${.CURDIR}/Makefile.inc" +LISTS= ${.CURDIR}/../common/list ${.CURDIR}/list.local +UTILS= ${.CURDIR}/../../miniroot -LISTS+= ${.CURDIR}/list.local +EFIBOOT= ${DESTDIR}/usr/mdec/BOOTX64.EFI ${DESTDIR}/usr/mdec/BOOTIA32.EFI + +all: ${FS} + +${FS}: bsd.gz + dd if=/dev/zero of=${FS} bs=512 count=${FSSIZE} + vnconfig -v ${FS} > vnd + fdisk -yi -l ${FSSIZE} -b 960 -f ${DESTDIR}/usr/mdec/mbr `cat vnd` + disklabel -wAT ${.CURDIR}/template `cat vnd` + newfs -t msdos /dev/r`cat vnd`i + mount /dev/`cat vnd`i ${MOUNT_POINT} + mkdir -p ${MOUNT_POINT}/efi/boot + cp ${EFIBOOT} ${MOUNT_POINT}/efi/boot + umount ${MOUNT_POINT} + 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/boot ${.OBJDIR}/boot + strip ${.OBJDIR}/boot + strip -R .comment -R .SUNW_ctf ${.OBJDIR}/boot + installboot -v -r ${MOUNT_POINT} `cat vnd` \ + ${DESTDIR}/usr/mdec/biosboot ${.OBJDIR}/boot + dd if=bsd.gz of=${MOUNT_POINT}/bsd bs=512 + df -i ${MOUNT_POINT} + umount ${MOUNT_POINT} + vnconfig -u `cat vnd` + rm -f vnd + +MRDISKTYPE= rdrootb +MRMAKEFSARGS= -o disklabel=${MRDISKTYPE},minfree=0,density=4096 + +bsd.gz: bsd.rd + cp bsd.rd bsd.strip + strip bsd.strip + strip -R .comment -R .SUNW_ctf bsd.strip + gzip -c9n bsd.strip > bsd.gz + +bsd.rd: mr.fs bsd + cp bsd bsd.rd + rdsetroot bsd.rd mr.fs + +bsd: + cd ${.CURDIR}/../../../sys/arch/amd64/compile/RAMDISK_CD && \ + su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && exec ${MAKE}' + cp -p ${.CURDIR}/../../../sys/arch/amd64/compile/RAMDISK_CD/obj/bsd bsd + +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 + +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 + strip -R .comment -R .SUNW_ctf instbin + +instbin.conf: ${LISTS} + awk -f ${UTILS}/makeconf.awk ${LISTS} > instbin.conf + +unconfig: + -umount -f ${MOUNT_POINT} + -[ -f vnd ] && vnconfig -u `cat vnd` && rm -f vnd + +.ifdef RELEASEDIR +install: + cp bsd.rd ${RELEASEDIR}/bsd.rd + chmod a+r ${RELEASEDIR}/bsd.rd + cp ${FS} ${RELEASEDIR}/${FS} +.endif # RELEASEDIR + +clean cleandir: + /bin/rm -f *.core mr.fs instbin instbin.mk instbin*.cache \ + *.o *.lo *.c bsd bsd.rd bsd.gz bsd.strip floppy*.fs \ + lib*.a lib*.olist instbin.map boot instbin.conf ${FS} + /bin/rm -rf mr.fs.d + +.include <bsd.obj.mk> diff --git a/distrib/amd64/ramdisk_cd/Makefile.inc b/distrib/amd64/ramdisk_cd/Makefile.inc deleted file mode 100644 index 271212e5fa5..00000000000 --- a/distrib/amd64/ramdisk_cd/Makefile.inc +++ /dev/null @@ -1,111 +0,0 @@ -# $OpenBSD: Makefile.inc,v 1.14 2019/04/29 15:56:25 deraadt Exp $ - -LISTS?= ${.CURDIR}/../common/list -UTILS?= ${.CURDIR}/../../miniroot - -MOUNT_POINT= /mnt -MTREE= ${UTILS}/mtree.conf - -FS?= miniroot${OSrev}.fs -BOOT?= ${DESTDIR}/usr/mdec/boot -EFIBOOT?= ${DESTDIR}/usr/mdec/BOOTX64.EFI ${DESTDIR}/usr/mdec/BOOTIA32.EFI -FLOPPYSIZE?= 2880 -FLOPPYTYPE?= floppy3 - -all: ${FS} - -${FS}: bsd.gz - dd if=/dev/zero of=${FS} bs=512 count=${FLOPPYSIZE} - vnconfig -v ${FS} > vnd -.ifdef LBA - fdisk -yi -l ${FLOPPYSIZE} -b 960 -f ${DESTDIR}/usr/mdec/mbr `cat vnd` -.endif -.ifdef TEMPLATE - disklabel -wAT ${TEMPLATE} `cat vnd` - newfs -t msdos /dev/r`cat vnd`i - mount /dev/`cat vnd`i ${MOUNT_POINT} - mkdir -p ${MOUNT_POINT}/efi/boot - cp ${EFIBOOT} ${MOUNT_POINT}/efi/boot - umount ${MOUNT_POINT} -.else - disklabel -w `cat vnd` ${FLOPPYTYPE} -.endif - newfs -m 0 -o space -i 524288 -c ${FLOPPYSIZE} /dev/r`cat vnd`a - mount /dev/`cat vnd`a ${MOUNT_POINT} - cp ${BOOT} ${.OBJDIR}/boot - strip ${.OBJDIR}/boot - strip -R .comment -R .SUNW_ctf ${.OBJDIR}/boot - installboot -v -r ${MOUNT_POINT} `cat vnd` \ - ${DESTDIR}/usr/mdec/biosboot ${.OBJDIR}/boot - dd if=bsd.gz of=${MOUNT_POINT}/bsd bs=512 - df -i ${MOUNT_POINT} - umount ${MOUNT_POINT} - vnconfig -u `cat vnd` - rm -f vnd - -unconfig: - -umount -f ${MOUNT_POINT} - -[ -f vnd ] && vnconfig -u `cat vnd` && rm -f vnd - -DISKTYPE?= rdroot -MAKEFSARGS_RD= -o disklabel=${DISKTYPE},minfree=0,density=4096 - -bsd.gz: bsd.rd - cp bsd.rd bsd.strip - strip bsd.strip - strip -R .comment -R .SUNW_ctf bsd.strip - gzip -c9n bsd.strip > bsd.gz - -bsd.rd: mr.fs bsd - cp bsd bsd.rd - rdsetroot bsd.rd mr.fs - -bsd: - cd ${.CURDIR}/../../../sys/arch/amd64/compile/${RAMDISK} && \ - su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && ${MAKE}' - cp -p ${.CURDIR}/../../../sys/arch/amd64/compile/${RAMDISK}/obj/bsd bsd - -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 ${MAKEFSARGS_RD} $@ $@.d - vnconfig -v mr.fs > vnd - df -i /dev/`cat vnd`a - vnconfig -u `cat vnd` - rm -f vnd - -.ifdef RELEASEDIR -install: -.ifndef NOBSDRD - cp bsd.rd ${RELEASEDIR}/bsd.rd - chmod a+r ${RELEASEDIR}/bsd.rd -.endif -.ifndef NOFS - cp ${FS} ${RELEASEDIR}/${FS} -.endif -.endif # RELEASEDIR - -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 - strip -R .comment -R .SUNW_ctf instbin - -instbin.conf: ${LISTS} - awk -f ${UTILS}/makeconf.awk ${LISTS} > instbin.conf - -clean cleandir: - /bin/rm -f *.core mr.fs instbin instbin.mk instbin*.cache \ - *.o *.lo *.c bsd bsd.rd bsd.gz bsd.strip floppy*.fs \ - lib*.a lib*.olist instbin.map boot instbin.conf ${FS} - /bin/rm -rf mr.fs.d - -.include <bsd.obj.mk> -.include <bsd.subdir.mk> diff --git a/distrib/arm64/Makefile b/distrib/arm64/Makefile index 3f4adfcf7e1..7a7628cb282 100644 --- a/distrib/arm64/Makefile +++ b/distrib/arm64/Makefile @@ -1,5 +1,8 @@ -# $OpenBSD: Makefile,v 1.2 2017/02/11 06:36:03 jsg Exp $ +# $OpenBSD: Makefile,v 1.3 2019/04/30 17:46:03 deraadt Exp $ -SUBDIR= ramdisk miniroot +SUBDIR= ramdisk + +unconfig: + cd ramdisk; ${MAKE} unconfig .include <bsd.subdir.mk> diff --git a/distrib/arm64/miniroot/Makefile b/distrib/arm64/miniroot/Makefile deleted file mode 100644 index 6175dea95ea..00000000000 --- a/distrib/arm64/miniroot/Makefile +++ /dev/null @@ -1,90 +0,0 @@ - -IMAGE= miniroot${OSrev}.fs - -MOUNT_POINT= /mnt - -DISKTYPE= miniroot -NBLKS= 43008 -MSDOSSTART= 8192 -MSDOSSIZE= 8192 -FFSSTART!= expr ${MSDOSSTART} + ${MSDOSSIZE} - -FS?= msdos -PART_ID?=C - -NEWFS_ARGS_msdos=-L boot -c1 -F16 -MOUNT_ARGS_msdos=-o-l - -PDTB= /usr/local/share/dtb/arm64 -PUBOOT= /usr/local/share/u-boot -PRPI= /usr/local/share/raspberrypi-firmware/boot - -PIFILES=\ - bootcode.bin \ - start.elf \ - fixup.dat \ - bcm2710-rpi-3-b.dtb \ - bcm2710-rpi-3-b-plus.dtb \ - bcm2710-rpi-cm3.dtb - -cleandir: clean -clean: - rm -f ${IMAGE} - -.ifndef DESTDIR -all ${IMAGE}: - @echo setenv DESTDIR before making a ramdisk! - @false -.else -all: ${IMAGE} - -${IMAGE}: rd_setup do_files rd_teardown - -.endif - -do_files: - cp ${.OBJDIR}/../ramdisk/bsd.rd ${MOUNT_POINT}/bsd.rd - ln ${MOUNT_POINT}/bsd.rd ${MOUNT_POINT}/bsd - -umount ${MOUNT_POINT} - mount ${MOUNT_ARGS_msdos} /dev/`cat vnd`i ${MOUNT_POINT} -.for FILE in ${PIFILES} - cp ${PRPI}/${FILE} ${MOUNT_POINT}/ -.endfor - cp ${PUBOOT}/rpi_3/u-boot.bin ${MOUNT_POINT}/ - mkdir -p ${MOUNT_POINT}/efi/boot - cp /usr/mdec/BOOTAA64.EFI ${MOUNT_POINT}/efi/boot/bootaa64.efi - echo bootaa64.efi > ${MOUNT_POINT}/efi/boot/startup.nsh - echo 'arm_64bit=1\nenable_uart=1\ndevice_tree_address=0x02600000\nkernel=u-boot.bin' > ${MOUNT_POINT}/config.txt - dd if=${PUBOOT}/pine64_plus/u-boot-sunxi-with-spl.bin \ - of=/dev/r`cat vnd`c bs=1024 seek=8 - -rd_setup: - dd if=/dev/zero of=${IMAGE} bs=512 count=${NBLKS} - vnconfig -v -t ${DISKTYPE} ${IMAGE} > vnd - echo 'u\ne 0\n${PART_ID}\nn\n${MSDOSSTART}\n${MSDOSSIZE}\ne 3\nA6\nn\n${FFSSTART}\n*\nf 0\nw\nq\n' \ - | fdisk -e `cat vnd` >/dev/null - echo 'a a\n\n\n\nw\nq\n' | disklabel -E `cat vnd` >/dev/null - newfs -t msdos ${NEWFS_ARGS_msdos} /dev/r`cat vnd`i - newfs -m 0 -o space -i 4096 /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` - rm -f vnd - -unconfig: - -umount -f ${MOUNT_POINT} - -[ -f vnd ] && vnconfig -u `cat vnd` && rm -f vnd - -.PRECIOUS: ${IMAGE} - -.ifdef RELEASEDIR -install: - cp ${IMAGE} ${RELEASEDIR} -.endif - -.include <bsd.obj.mk> -.include <bsd.subdir.mk> -.include <bsd.own.mk> diff --git a/distrib/arm64/ramdisk/Makefile b/distrib/arm64/ramdisk/Makefile index 871187e4a97..91c37ac8301 100644 --- a/distrib/arm64/ramdisk/Makefile +++ b/distrib/arm64/ramdisk/Makefile @@ -1,38 +1,82 @@ -# $OpenBSD: Makefile,v 1.10 2019/04/29 15:56:25 deraadt Exp $ - -IMAGE= mr.fs -CRUNCHCONF?= instbin.conf -CRUNCHCONFS?= ${.CURDIR}/../common/crunch.conf -LISTS= ${.CURDIR}/list -UTILS?= ${.CURDIR}/../../miniroot +# $OpenBSD: Makefile,v 1.11 2019/04/30 17:46:03 deraadt Exp $ +FS= miniroot${OSrev}.fs +FSSIZE= 43008 +FSDISKTYPE= miniroot +MOUNT_POINT= /mnt MTREE= ${UTILS}/mtree.conf -DISKTYPE= rdroot -MAKEFSARGS_RD= -o disklabel=${DISKTYPE},minfree=0,density=4096 +MSDOSSTART= 8192 +MSDOSSIZE= 8192 +FFSSTART!= expr ${MSDOSSTART} + ${MSDOSSIZE} + +NEWFS_ARGS_msdos=-L boot -c1 -F16 +MOUNT_ARGS_msdos=-o-l + +PDTB= /usr/local/share/dtb/arm64 +PUBOOT= /usr/local/share/u-boot +PRPI= /usr/local/share/raspberrypi-firmware/boot + +LISTS= ${.CURDIR}/list +UTILS= ${.CURDIR}/../../miniroot + +MRFSDISKTYPE= rdroot +MRMAKEFSARGS= -o disklabel=${MRFSDISKTYPE},minfree=0,density=4096 DIRS=\ pine64 \ rpi -.ifndef DESTDIR -all ${IMAGE}: - @echo setenv DESTDIR before making a ramdisk! - @false -.else +PIFILES=\ + bootcode.bin \ + start.elf \ + fixup.dat \ + bcm2710-rpi-3-b.dtb \ + bcm2710-rpi-3-b-plus.dtb \ + bcm2710-rpi-cm3.dtb + +all: ${FS} + +${FS}: bsd.rd + dd if=/dev/zero of=${FS} bs=512 count=${FSSIZE} + vnconfig -v -t ${FSDISKTYPE} ${FS} > vnd + echo 'u\ne 0\nc\nn\n${MSDOSSTART}\n${MSDOSSIZE}\ne 3\nA6\nn\n${FFSSTART}\n*\nf 0\nw\nq\n' \ + | fdisk -e `cat vnd` >/dev/null + echo 'a a\n\n\n\nw\nq\n' | disklabel -E `cat vnd` >/dev/null + newfs -t msdos ${NEWFS_ARGS_msdos} /dev/r`cat vnd`i + newfs -m 0 -o space -i 4096 /dev/r`cat vnd`a + mount /dev/`cat vnd`a ${MOUNT_POINT} + cp bsd.rd ${MOUNT_POINT}/bsd.rd + ln ${MOUNT_POINT}/bsd.rd ${MOUNT_POINT}/bsd + umount ${MOUNT_POINT} + mount ${MOUNT_ARGS_msdos} /dev/`cat vnd`i ${MOUNT_POINT} +.for FILE in ${PIFILES} + cp ${PRPI}/${FILE} ${MOUNT_POINT}/ +.endfor + cp ${PUBOOT}/rpi_3/u-boot.bin ${MOUNT_POINT}/ + mkdir -p ${MOUNT_POINT}/efi/boot + cp /usr/mdec/BOOTAA64.EFI ${MOUNT_POINT}/efi/boot/bootaa64.efi + echo bootaa64.efi > ${MOUNT_POINT}/efi/boot/startup.nsh + echo 'arm_64bit=1\nenable_uart=1\ndevice_tree_address=0x02600000\nkernel=u-boot.bin' > ${MOUNT_POINT}/config.txt + dd if=${PUBOOT}/pine64_plus/u-boot-sunxi-with-spl.bin \ + of=/dev/r`cat vnd`c bs=1024 seek=8 + df -i ${MOUNT_POINT} + umount ${MOUNT_POINT} + vnconfig -u `cat vnd` + rm -f vnd all: bsd.rd +bsd.rd: mr.fs bsd + cp bsd bsd.rd + rdsetroot bsd.rd mr.fs + bsd: cd ${.CURDIR}/../../../sys/arch/arm64/compile/RAMDISK && \ su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && exec ${MAKE}' cp -p ${.CURDIR}/../../../sys/arch/arm64/compile/RAMDISK/obj/bsd bsd -bsd.rd: ${IMAGE} bsd - cp bsd bsd.rd - rdsetroot bsd.rd ${IMAGE} - -${IMAGE}: instbin +mr.fs: instbin rm -rf $@.d install -d -o root -g wheel $@.d .for DIR in ${DIRS} @@ -43,30 +87,33 @@ ${IMAGE}: instbin TARGDIR=$@.d UTILS=${UTILS} RELEASEDIR=${RELEASEDIR} \ sh ${UTILS}/runlist.sh ${LISTS} rm $@.d/instbin - makefs ${MAKEFSARGS_RD} $@ $@.d - -.endif + makefs ${MRMAKEFSARGS} $@ $@.d -instbin.mk instbin.cache instbin.c: ${CRUNCHCONF} - crunchgen -E -D ${.CURDIR}/../../.. -L ${DESTDIR}/usr/lib ${.ALLSRC} +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 -${CRUNCHCONF}: ${LISTS} +instbin.conf: ${LISTS} awk -f ${UTILS}/makeconf.awk ${LISTS} > instbin.conf -clean cleandir: - /bin/rm -f *.core ${IMAGE} instbin instbin.mk instbin.cache \ - lib*.a lib*.olist instbin.map *.o *.lo *.c bsd.rd - rm -f instbin.conf - rm -rf cd-dir ${IMAGE}.d +unconfig: + -umount -f ${MOUNT_POINT} + -[ -f vnd ] && vnconfig -u `cat vnd` && rm -f vnd .ifdef RELEASEDIR install: - cp bsd.rd ${RELEASEDIR} - cd ${RELEASEDIR} && chmod a+r bsd.rd + cp bsd.rd ${RELEASEDIR}/bsd.rd + chmod a+r ${RELEASEDIR}/bsd.rd + cp ${FS} ${RELEASEDIR} .endif # RELEASEDIR +clean cleandir: + /bin/rm -f *.core mr.fs instbin instbin.mk instbin.cache \ + lib*.a lib*.olist instbin.map *.o *.lo *.c bsd.rd + rm -f instbin.conf + rm -rf cd-dir mr.fs.d + .include <bsd.obj.mk> -.include <bsd.subdir.mk> diff --git a/distrib/arm64/ramdisk/Makefile.inc b/distrib/arm64/ramdisk/Makefile.inc deleted file mode 100644 index c051a3f65ba..00000000000 --- a/distrib/arm64/ramdisk/Makefile.inc +++ /dev/null @@ -1,4 +0,0 @@ -# $OpenBSD: Makefile.inc,v 1.1 2017/01/23 02:24:00 patrick Exp $ - -CRUNCHGENOPTS= -E - diff --git a/distrib/armv7/miniroot/Makefile.inc b/distrib/armv7/miniroot/Makefile.inc index 1f211a40696..efb49489804 100644 --- a/distrib/armv7/miniroot/Makefile.inc +++ b/distrib/armv7/miniroot/Makefile.inc @@ -88,5 +88,3 @@ install: .endif .include <bsd.obj.mk> -.include <bsd.subdir.mk> -.include <bsd.own.mk> diff --git a/distrib/armv7/ramdisk/Makefile b/distrib/armv7/ramdisk/Makefile index 9a20809c130..bb1dd938225 100644 --- a/distrib/armv7/ramdisk/Makefile +++ b/distrib/armv7/ramdisk/Makefile @@ -1,78 +1,55 @@ -# $OpenBSD: Makefile,v 1.23 2019/04/29 15:56:25 deraadt Exp $ - -IMAGE= mr.fs -CRUNCHCONF?= instbin.conf -CRUNCHCONFS?= ${.CURDIR}/../common/crunch.conf -LISTS= ${.CURDIR}/list -UTILS?= ${.CURDIR}/../../miniroot +# $OpenBSD: Makefile,v 1.24 2019/04/30 17:46:03 deraadt Exp $ MTREE= ${UTILS}/mtree.conf -DISKTYPE= rdroot -MAKEFSARGS_RD= -o disklabel=${DISKTYPE},minfree=0,density=4096 +LISTS= ${.CURDIR}/list +UTILS= ${.CURDIR}/../../miniroot -DIRS=\ - am335x \ - cubie \ - cubox \ - nitrogen \ - panda \ - wandboard +MRDISKTYPE= rdroot +MRMAKEFSARGS= -o disklabel=${MRDISKTYPE},minfree=0,density=4096 -.ifndef DESTDIR -all ${IMAGE}: - @echo setenv DESTDIR before making a ramdisk! - @false -.else +all: bsd.rd -ALLBSD= bsd -ALLBSDRD= bsd.rd -all: ${ALLBSDRD} +bsd.rd: mr.fs bsd + cp bsd bsd.rd + rdsetroot bsd.rd mr.fs bsd: cd ${.CURDIR}/../../../sys/arch/armv7/compile/RAMDISK && \ su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && exec ${MAKE}' cp -p ${.CURDIR}/../../../sys/arch/armv7/compile/RAMDISK/obj/bsd bsd -bsd.rd: ${IMAGE} bsd - cp bsd bsd.rd - rdsetroot bsd.rd ${IMAGE} -${IMAGE}: instbin +mr.fs: instbin rm -rf $@.d install -d -o root -g wheel $@.d -.for DIR in ${DIRS} - mkdir -p $@.d/usr/mdec/${DIR} -.endfor 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 - -.endif + makefs ${MRMAKEFSARGS} $@ $@.d -instbin.mk instbin.cache instbin.c: ${CRUNCHCONF} - crunchgen -E -D ${.CURDIR}/../../.. -L ${DESTDIR}/usr/lib ${.ALLSRC} +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 -${CRUNCHCONF}: ${LISTS} +instbin.conf: ${LISTS} awk -f ${UTILS}/makeconf.awk ${LISTS} > instbin.conf -clean cleandir: - /bin/rm -f *.core ${IMAGE} instbin instbin.mk instbin.cache \ - lib*.a lib*.olist instbin.map *.o *.lo *.c ${ALLBSD} ${ALLBSDRD} - rm -f instbin.conf - rm -rf cd-dir ${IMAGE}.d - .ifdef RELEASEDIR install: - cp ${ALLBSDRD} ${RELEASEDIR} - cd ${RELEASEDIR} && chmod a+r ${ALLBSDRD} + cp bsd.rd ${RELEASEDIR}/bsd.rd + chmod a+r ${RELEASEDIR}/bsd.rd .endif # RELEASEDIR +clean cleandir: + /bin/rm -f *.core mr.fs instbin instbin.mk instbin.cache \ + lib*.a lib*.olist instbin.map *.o *.lo *.c + rm -f instbin.conf + rm -rf cd-dir mr.fs.d + .include <bsd.obj.mk> -.include <bsd.subdir.mk> diff --git a/distrib/armv7/ramdisk/Makefile.inc b/distrib/armv7/ramdisk/Makefile.inc deleted file mode 100644 index 4b23e5f9958..00000000000 --- a/distrib/armv7/ramdisk/Makefile.inc +++ /dev/null @@ -1,4 +0,0 @@ -# $OpenBSD: Makefile.inc,v 1.1 2013/09/04 20:00:23 patrick Exp $ - -CRUNCHGENOPTS= -E - diff --git a/distrib/armv7/ramdisk/list b/distrib/armv7/ramdisk/list index cc266188df9..a1545cba5c7 100644 --- a/distrib/armv7/ramdisk/list +++ b/distrib/armv7/ramdisk/list @@ -1,4 +1,4 @@ -# $OpenBSD: list,v 1.39 2019/04/29 01:48:39 deraadt Exp $ +# $OpenBSD: list,v 1.40 2019/04/30 17:46:03 deraadt Exp $ SRCDIRS distrib/special @@ -120,6 +120,7 @@ SYMLINK install.sub install SYMLINK install.sub upgrade # u-boot and dtbs +MKDIR usr/mdec/am335x COPY /usr/local/share/u-boot/am335x_evm/MLO usr/mdec/am335x/MLO COPY /usr/local/share/u-boot/am335x_evm/u-boot.img usr/mdec/am335x/u-boot.img COPY /usr/local/share/dtb/arm/am335x-bone.dtb usr/mdec/am335x/am335x-bone.dtb @@ -133,9 +134,11 @@ COPY /usr/local/share/dtb/arm/am335x-evm.dtb usr/mdec/am335x/am335x-evm.dtb COPY /usr/local/share/dtb/arm/am335x-evmsk.dtb usr/mdec/am335x/am335x-evmsk.dtb COPY /usr/local/share/dtb/arm/am335x-icev2.dtb usr/mdec/am335x/am335x-icev2.dtb +MKDIR usr/mdec/cubie COPY /usr/local/share/u-boot/Cubieboard2/u-boot-sunxi-with-spl.bin usr/mdec/cubie/u-boot-sunxi-with-spl.bin COPY /usr/local/share/dtb/arm/sun7i-a20-cubieboard2.dtb usr/mdec/cubie/sun7i-a20-cubieboard2.dtb +MKDIR usr/mdec/panda COPY /usr/local/share/u-boot/omap4_panda/MLO usr/mdec/panda/MLO COPY /usr/local/share/u-boot/omap4_panda/u-boot.img usr/mdec/panda/u-boot.img COPY /usr/local/share/dtb/arm/omap4-duovero-parlor.dtb usr/mdec/panda/omap4-duovero-parlor.dtb @@ -144,6 +147,7 @@ COPY /usr/local/share/dtb/arm/omap4-panda-es.dtb usr/mdec/panda/omap4-panda-es.d COPY /usr/local/share/dtb/arm/omap4-panda.dtb usr/mdec/panda/omap4-panda.dtb COPY /usr/local/share/dtb/arm/omap4-sdp.dtb usr/mdec/panda/omap4-sdp.dtb +MKDIR usr/mdec/cubox COPY /usr/local/share/u-boot/mx6cuboxi/SPL usr/mdec/cubox/SPL COPY /usr/local/share/u-boot/mx6cuboxi/u-boot.img usr/mdec/cubox/u-boot.img COPY /usr/local/share/dtb/arm/imx6dl-cubox-i.dtb usr/mdec/cubox/imx6dl-cubox-i.dtb @@ -165,12 +169,14 @@ COPY /usr/local/share/dtb/arm/imx6q-hummingboard2.dtb usr/mdec/cubox/imx6q-hummi COPY /usr/local/share/dtb/arm/imx6q-hummingboard2-emmc-som-v15.dtb usr/mdec/cubox/imx6q-hummingboard2-emmc-som-v15.dtb COPY /usr/local/share/dtb/arm/imx6q-hummingboard2-som-v15.dtb usr/mdec/cubox/imx6q-hummingboard2-som-v15.dtb +MKDIR usr/mdec/nitrogen COPY /usr/local/share/dtb/arm/imx6dl-nitrogen6x.dtb usr/mdec/nitrogen/imx6dl-nitrogen6x.dtb COPY /usr/local/share/dtb/arm/imx6dl-sabrelite.dtb usr/mdec/nitrogen/imx6dl-sabrelite.dtb COPY /usr/local/share/dtb/arm/imx6q-nitrogen6_max.dtb usr/mdec/nitrogen/imx6q-nitrogen6_max.dtb COPY /usr/local/share/dtb/arm/imx6q-nitrogen6x.dtb usr/mdec/nitrogen/imx6q-nitrogen6x.dtb COPY /usr/local/share/dtb/arm/imx6q-sabrelite.dtb usr/mdec/nitrogen/imx6q-sabrelite.dtb +MKDIR usr/mdec/wandboard COPY /usr/local/share/u-boot/wandboard/SPL usr/mdec/wandboard/SPL COPY /usr/local/share/u-boot/wandboard/u-boot.img usr/mdec/wandboard/u-boot.img COPY /usr/local/share/dtb/arm/imx6dl-wandboard.dtb usr/mdec/wandboard/imx6dl-wandboard.dtb diff --git a/distrib/hppa/iso/Makefile b/distrib/hppa/iso/Makefile index ab79cdf4f68..ca259892f34 100644 --- a/distrib/hppa/iso/Makefile +++ b/distrib/hppa/iso/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.17 2019/04/29 15:56:25 deraadt Exp $ +# $OpenBSD: Makefile,v 1.18 2019/04/30 17:46:03 deraadt Exp $ CDROM= install${OSrev}.iso RELXDIR?= /home/relx-${MACHINE} @@ -14,7 +14,7 @@ XBASE= ${RELXDIR}/xbase${OSrev}.tgz ${RELXDIR}/xfont${OSrev}.tgz \ all: ${CDROM} ${CDROM}: ${BASE} ${XBASE} - -rm -rf ${.OBJDIR}/cd-dir + rm -rf ${.OBJDIR}/cd-dir mkdir -p ${.OBJDIR}/cd-dir/${OSREV}/${MACHINE} cp -p ${BASE} ${.OBJDIR}/cd-dir/${OSREV}/${MACHINE} @@ -44,4 +44,3 @@ clean cleandir: /bin/rm -rf cd-dir ${CDROM} .include <bsd.obj.mk> -.include <bsd.subdir.mk> diff --git a/distrib/hppa/ramdisk/Makefile b/distrib/hppa/ramdisk/Makefile index 8b70ac71c78..91b62add9ef 100644 --- a/distrib/hppa/ramdisk/Makefile +++ b/distrib/hppa/ramdisk/Makefile @@ -1,98 +1,77 @@ -# $OpenBSD: Makefile,v 1.40 2019/04/29 01:48:40 deraadt Exp $ +# $OpenBSD: Makefile,v 1.41 2019/04/30 17:46:03 deraadt Exp $ -ARCHDIR= ${.CURDIR}/.. -SRCDIR= ${.CURDIR}/../../.. - -.include <bsd.own.mk> - -.if exists(${ARCHDIR}/Makefile.inc) -.include "${ARCHDIR}/Makefile.inc" -.endif - -IMAGE?= ramdisk${OSrev}.fs -CRUNCHGENOPTS?=-E -RAMDISK?= RAMDISK -UTILS?= ${.CURDIR}/../../miniroot - -LISTS= ${ARCHDIR}/list ${.CURDIR}/list.local +CDROM= cd${OSrev}.iso +LIF= lif${OSrev}.fs MTREE= ${UTILS}/mtree.conf -LIF?= lif${OSrev}.fs -CDROM?= cd${OSrev}.iso -MKBOOT?= /usr/mdec/mkboot -BOOT?= ${DESTDIR}/usr/mdec/boot -CDBOOT?= ${DESTDIR}/usr/mdec/cdboot +LISTS= ${.CURDIR}/../list ${.CURDIR}/list.local +UTILS= ${.CURDIR}/../../miniroot -STRIPOPTS?= -R .SUNW_ctf +MRDISKTYPE= rdroot +MRMAKEFSARGS= -o disklabel=${MRDISKTYPE},minfree=0,density=4096 -DISKTYPE= rdroot -MAKEFSARGS_RD= -o disklabel=${DISKTYPE},minfree=0,density=4096 +all: ${LIF} ${CDROM} -all: bsd.rd ${LIF} ${CDROM} +${LIF}: bsd.lif + /usr/mdec/mkboot -v ${DESTDIR}/usr/mdec/boot bsd.lif ${LIF} -${LIF}: bsd ${BOOT} - ${MKBOOT} -v ${BOOT} bsd ${LIF} - -${CDROM}: bsd ${CDBOOT} - -rm -rf ${.OBJDIR}/cd-dir - mkdir ${.OBJDIR}/cd-dir +${CDROM}: bsd.rd + rm -rf ${.OBJDIR}/cd-dir/ + mkdir -p ${.OBJDIR}/cd-dir/ cp bsd.rd ${.OBJDIR}/cd-dir/bsd.rd mkhybrid -A "OpenBSD ${OSREV} hppa bootonly CD" \ -P "Copyright (c) `date +%Y` Theo de Raadt, The OpenBSD project" \ -p "Theo de Raadt <deraadt@openbsd.org>" \ -V "OpenBSD/hppa ${OSREV} boot-only CD" \ -o ${.OBJDIR}/${CDROM} ${.OBJDIR}/cd-dir - dd if=${CDBOOT} of=${.OBJDIR}/${CDROM} bs=32k count=1 conv=notrunc + dd if=${DESTDIR}/usr/mdec/cdboot of=${.OBJDIR}/${CDROM} \ + bs=32k count=1 conv=notrunc dd if=/dev/zero bs=64k count=1 >> ${.OBJDIR}/${CDROM} -obsd: - cd ${SRCDIR}/sys/arch/${MACHINE}/compile/${RAMDISK} && \ - su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && exec ${MAKE}' - cp -p ${SRCDIR}/sys/arch/${MACHINE}/compile/${RAMDISK}/obj/bsd obsd +bsd.rd: mr.fs bsd + cp bsd bsd.rd + rdsetroot bsd.rd mr.fs + strip -R .SUNW_ctf bsd.rd -bsd.rd: obsd ${IMAGE} - cp obsd bsd.rd - rdsetroot bsd.rd ${IMAGE} - strip ${STRIPOPTS} bsd.rd +bsd.lif: bsd.rd + (cat bsd.rd ; dd if=/dev/zero count=1) | gzip -9nv > bsd.lif -bsd: bsd.rd - (cat bsd.rd ; dd if=/dev/zero count=1) | gzip -9nv > bsd +bsd: + cd ${.CURDIR}/../../../sys/arch/hppa/compile/RAMDISK && \ + su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && exec ${MAKE}' + cp -p ${.CURDIR}/../../../sys/arch/hppa/compile/RAMDISK/obj/bsd bsd -${IMAGE}: instbin +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} ARCHDIR=${ARCHDIR} \ + CURDIR=${.CURDIR} OBJDIR=${.OBJDIR} OSrev=${OSrev} \ TARGDIR=$@.d UTILS=${UTILS} RELEASEDIR=${RELEASEDIR} \ sh ${UTILS}/runlist.sh ${LISTS} rm $@.d/instbin - makefs ${MAKEFSARGS_RD} $@ $@.d - vnconfig -v ${IMAGE} > vnd - df -i /dev/`cat vnd`a - vnconfig -u `cat vnd` - rm -f vnd - -instbin.conf: ${LISTS} - awk -f ${UTILS}/makeconf.awk ${LISTS} > instbin.conf + makefs ${MRMAKEFSARGS} $@ $@.d instbin.mk instbin.cache instbin.c: instbin.conf - crunchgen ${CRUNCHGENOPTS} -D ${SRCDIR} -L ${DESTDIR}/usr/lib \ - 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 -clean cleandir: - /bin/rm -f *.core ${IMAGE} instbin instbin.mk instbin.cache \ - lib*.a lib*.olist instbin.map \ - instbin.conf *.o *.lo *.c obsd bsd bsd.* ${LIF} ${CDROM} - /bin/rm -rf ${IMAGE}.d +instbin.conf: ${LISTS} + awk -f ${UTILS}/makeconf.awk ${LISTS} > instbin.conf .ifdef RELEASEDIR -beforeinstall: - cp bsd.rd ${LIF} ${CDROM} ${RELEASEDIR} +install: + cp bsd.rd ${RELEASEDIR}/bsd.rd chmod a+r ${RELEASEDIR}/bsd.rd + cp ${LIF} ${CDROM} ${RELEASEDIR} .endif +clean cleandir: + /bin/rm -f *.core mr.fs instbin instbin.mk instbin.cache \ + lib*.a lib*.olist instbin.map \ + instbin.conf *.o *.lo *.c bsd bsd.* ${LIF} ${CDROM} + /bin/rm -rf mr.fs.d + .include <bsd.obj.mk> -.include <bsd.subdir.mk> diff --git a/distrib/hppa/ramdisk/list.local b/distrib/hppa/ramdisk/list.local index 2d76427beb8..7c4f54bce6b 100644 --- a/distrib/hppa/ramdisk/list.local +++ b/distrib/hppa/ramdisk/list.local @@ -1,4 +1,4 @@ -# $OpenBSD: list.local,v 1.6 2017/11/19 12:11:53 job Exp $ +# $OpenBSD: list.local,v 1.7 2019/04/30 17:46:03 deraadt Exp $ # hppa extra's LINK instbin sbin/disklabel @@ -19,5 +19,5 @@ SYMLINK /tmp/i/hosts etc/hosts TERMCAP vt100,vt220,dumb,hp2392,hpansi,hpsub,hpex,hp700-wy,hp70092 usr/share/misc/termcap # and the installation tools (no upgrade from to 3.3) -SCRIPT ${ARCHDIR}/install.md install.md +SCRIPT ${CURDIR}/../install.md install.md TZ diff --git a/distrib/i386/cdfs/Makefile b/distrib/i386/cdfs/Makefile index 0b67607c5af..d1b61e67aa3 100644 --- a/distrib/i386/cdfs/Makefile +++ b/distrib/i386/cdfs/Makefile @@ -1,11 +1,11 @@ -# $OpenBSD: Makefile,v 1.12 2019/04/29 15:56:25 deraadt Exp $ +# $OpenBSD: Makefile,v 1.13 2019/04/30 17:46:03 deraadt Exp $ CDROM= cd${OSrev}.iso all: ${CDROM} ${CDROM}: - -rm -rf ${.OBJDIR}/cd-dir + rm -rf ${.OBJDIR}/cd-dir mkdir -p ${.OBJDIR}/cd-dir/${OSREV}/i386 mkdir -p ${.OBJDIR}/cd-dir/etc echo "set image /${OSREV}/i386/bsd.rd" > ${.OBJDIR}/cd-dir/etc/boot.conf @@ -30,4 +30,3 @@ clean cleandir: rm -rf cd-dir .include <bsd.obj.mk> -.include <bsd.subdir.mk> diff --git a/distrib/i386/common/Makefile.inc b/distrib/i386/common/Makefile.inc deleted file mode 100644 index 1db3ed2d51d..00000000000 --- a/distrib/i386/common/Makefile.inc +++ /dev/null @@ -1,105 +0,0 @@ -# $OpenBSD: Makefile.inc,v 1.51 2019/04/29 15:56:25 deraadt Exp $ - -IMAGE= mr.fs -CRUNCHCONF?= instbin.conf -LISTS?= ${.CURDIR}/../common/list -UTILS?= ${.CURDIR}/../../miniroot - -MOUNT_POINT= /mnt -MTREE= ${UTILS}/mtree.conf - -XNAME?= floppy -FS?= ${XNAME}${OSrev}.fs -BOOT?= ${DESTDIR}/usr/mdec/boot -FLOPPYSIZE?= 2880 -FLOPPYTYPE?= floppy3 - -all: ${FS} - -${FS}: bsd.gz - dd if=/dev/zero of=${FS} bs=512 count=${FLOPPYSIZE} - vnconfig -v ${FS} > vnd -.ifdef LBA - fdisk -yi -l ${FLOPPYSIZE} -f ${DESTDIR}/usr/mdec/mbr `cat vnd` -.endif - 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} - cp ${BOOT} ${.OBJDIR}/boot - strip ${.OBJDIR}/boot - strip -R .comment -R .SUNW_ctf ${.OBJDIR}/boot - installboot -v -r ${MOUNT_POINT} `cat vnd` \ - ${DESTDIR}/usr/mdec/biosboot ${.OBJDIR}/boot - dd if=bsd.gz of=${MOUNT_POINT}/bsd bs=512 - df -i ${MOUNT_POINT} - umount ${MOUNT_POINT} - vnconfig -u `cat vnd` - rm -f vnd - -unconfig: - -umount -f ${MOUNT_POINT} - -[ -f vnd ] && vnconfig -u `cat vnd` && rm -f vnd - - -DISKTYPE?= rdroot -MAKEFSARGS_RD= -o disklabel=${DISKTYPE},minfree=0,density=4096 - -bsd.gz: bsd.rd - cp bsd.rd bsd.strip - strip bsd.strip - strip -R .comment -R .SUNW_ctf bsd.strip - gzip -c9n bsd.strip > bsd.gz - -bsd.rd: ${IMAGE} bsd - cp bsd bsd.rd - rdsetroot bsd.rd ${IMAGE} - -bsd: - cd ${.CURDIR}/../../../sys/arch/i386/compile/${RAMDISK} && \ - su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && ${MAKE}' - cp -p ${.CURDIR}/../../../sys/arch/i386/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 - vnconfig -v mr.fs > vnd - df -i /dev/`cat vnd`a - vnconfig -u `cat vnd` - -rm -f vnd - -.ifdef RELEASEDIR -install: -.ifndef NOBSDRD - cp bsd.rd ${RELEASEDIR}/bsd.rd - chmod a+r ${RELEASEDIR}/bsd.rd -.endif -.ifndef NOFS - cp ${FS} ${RELEASEDIR}/${FS} -.endif -.endif # RELEASEDIR - -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 - strip -R .comment -R .SUNW_ctf instbin - -${CRUNCHCONF}: ${LISTS} - awk -f ${UTILS}/makeconf.awk ${LISTS} > ${CRUNCHCONF} - -clean cleandir: - /bin/rm -f *.core ${IMAGE} instbin instbin.mk instbin*.cache \ - *.o *.lo *.c bsd bsd.rd bsd.gz bsd.strip floppy*.fs \ - lib*.a lib*.olist instbin.map boot ${CRUNCHCONF} ${FS} - /bin/rm -rf ${IMAGE}.d - -.include <bsd.obj.mk> -.include <bsd.subdir.mk> diff --git a/distrib/i386/iso/Makefile b/distrib/i386/iso/Makefile index 88927786765..a8fe4613b3c 100644 --- a/distrib/i386/iso/Makefile +++ b/distrib/i386/iso/Makefile @@ -1,11 +1,9 @@ -# $OpenBSD: Makefile,v 1.21 2019/04/29 15:56:25 deraadt Exp $ - -CDROM= install${OSrev}.iso +# $OpenBSD: Makefile,v 1.22 2019/04/30 17:46:03 deraadt Exp $ FS= install${OSrev}.fs FSSIZE= 921600 -FSTYPE= install360 - +FSDISKTYPE= install360 +CDROM= install${OSrev}.iso MOUNT_POINT= /mnt MTREE= ${UTILS}/mtree.conf @@ -20,18 +18,16 @@ BASE= ${RELDIR}/base${OSrev}.tgz ${RELDIR}/comp${OSrev}.tgz \ XBASE= ${RELXDIR}/xbase${OSrev}.tgz ${RELXDIR}/xfont${OSrev}.tgz \ ${RELXDIR}/xshare${OSrev}.tgz ${RELXDIR}/xserv${OSrev}.tgz -BOOT?= ${DESTDIR}/usr/mdec/boot - all: ${CDROM} ${FS} ${FS}: ${BASE} ${XBASE} bsd.gz dd if=/dev/zero of=${FS} bs=512 count=${FSSIZE} vnconfig -v ${FS} > vnd fdisk -yi -l ${FSSIZE} -f ${DESTDIR}/usr/mdec/mbr `cat vnd` - disklabel -w `cat vnd` ${FSTYPE} + 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 ${BOOT} ${MOUNT_POINT}/boot + cp ${DESTDIR}/usr/mdec/boot ${MOUNT_POINT}/boot strip -R .comment -R .SUNW_ctf ${MOUNT_POINT}/boot dd if=bsd.gz of=${MOUNT_POINT}/bsd bs=512 installboot -v -r ${MOUNT_POINT} `cat vnd` \ @@ -53,7 +49,7 @@ ${FS}: ${BASE} ${XBASE} bsd.gz rm -f vnd ${CDROM}: ${BASE} ${XBASE} - -rm -rf ${.OBJDIR}/cd-dir + rm -rf ${.OBJDIR}/cd-dir mkdir -p ${.OBJDIR}/cd-dir/${OSREV}/${MACHINE} mkdir -p ${.OBJDIR}/cd-dir/etc echo "set image /${OSREV}/${MACHINE}/bsd.rd" > ${.OBJDIR}/cd-dir/etc/boot.conf @@ -76,13 +72,6 @@ ${CDROM}: ${BASE} ${XBASE} -b ${OSREV}/${MACHINE}/cdbr -c ${OSREV}/${MACHINE}/boot.catalog \ ${.OBJDIR}/cd-dir -install: - cp ${CDROM} ${FS} ${RELDIR}/ - -clean cleandir: - /bin/rm -f ${CDROM} ${FS} - rm -rf cd-dir - bsd.gz: bsd.rd cp bsd.rd bsd.strip strip bsd.strip @@ -92,5 +81,15 @@ bsd.gz: bsd.rd bsd.rd: ${BSDRD} cp ${BSDRD} bsd.rd +unconfig: + -umount -f ${MOUNT_POINT} + -[ -f vnd ] && vnconfig -u `cat vnd` && rm -f vnd + +install: + cp ${CDROM} ${FS} ${RELDIR}/ + +clean cleandir: + /bin/rm -f ${CDROM} ${FS} + rm -rf cd-dir + .include <bsd.obj.mk> -.include <bsd.subdir.mk> diff --git a/distrib/i386/ramdisk/Makefile b/distrib/i386/ramdisk/Makefile index 6ff26e62f05..8f7221fdd40 100644 --- a/distrib/i386/ramdisk/Makefile +++ b/distrib/i386/ramdisk/Makefile @@ -1,10 +1,88 @@ -# $OpenBSD: Makefile,v 1.2 2016/09/18 15:23:42 jsing Exp $ +# $OpenBSD: Makefile,v 1.3 2019/04/30 17:46:04 deraadt Exp $ -.PATH: ${.CURDIR}/../ramdiskA -BOOT= ${DESTDIR}/usr/mdec/fdboot -RAMDISK=RAMDISK -NOBSDRD=1 +FS= floppy${OSrev}.fs +FSSIZE= 2880 +FSDISKTYPE= floppy3 +MOUNT_POINT= /mnt +MTREE= ${UTILS}/mtree.conf -.include "${.CURDIR}/../common/Makefile.inc" +LISTS= ${.CURDIR}/../common/list ${.CURDIR}/list.local +UTILS= ${.CURDIR}/../../miniroot -LISTS+= ${.CURDIR}/list.local +all: ${FS} + +${FS}: bsd.gz + dd if=/dev/zero of=${FS} bs=512 count=${FSSIZE} + vnconfig -v ${FS} > vnd +.ifdef LBA + fdisk -yi -l ${FSSIZE} -f ${DESTDIR}/usr/mdec/mbr `cat vnd` +.endif + 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/fdboot ${.OBJDIR}/boot + strip ${.OBJDIR}/boot + strip -R .comment -R .SUNW_ctf ${.OBJDIR}/boot + installboot -v -r ${MOUNT_POINT} `cat vnd` \ + ${DESTDIR}/usr/mdec/biosboot ${.OBJDIR}/boot + dd if=bsd.gz of=${MOUNT_POINT}/bsd bs=512 + df -i ${MOUNT_POINT} + umount ${MOUNT_POINT} + vnconfig -u `cat vnd` + rm -f vnd + +MRDISKTYPE= rdroot +MRMAKEFSARGS= -o disklabel=${MRDISKTYPE},minfree=0,density=4096 + +bsd.gz: bsd.rd + cp bsd.rd bsd.strip + strip bsd.strip + strip -R .comment -R .SUNW_ctf bsd.strip + gzip -c9n bsd.strip > bsd.gz + +bsd.rd: mr.fs bsd + cp bsd bsd.rd + rdsetroot bsd.rd mr.fs + +bsd: + cd ${.CURDIR}/../../../sys/arch/i386/compile/RAMDISK && \ + su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && exec ${MAKE}' + cp -p ${.CURDIR}/../../../sys/arch/i386/compile/RAMDISK/obj/bsd bsd + +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 + +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 + strip -R .comment -R .SUNW_ctf instbin + +instbin.conf: ${LISTS} + awk -f ${UTILS}/makeconf.awk ${LISTS} > instbin.conf + +unconfig: + -umount -f ${MOUNT_POINT} + -[ -f vnd ] && vnconfig -u `cat vnd` && rm -f vnd + +.ifdef RELEASEDIR +install: + cp ${FS} ${RELEASEDIR}/${FS} +.endif # RELEASEDIR + +clean cleandir: + /bin/rm -f *.core mr.fs instbin instbin.mk instbin*.cache \ + *.o *.lo *.c bsd bsd.rd bsd.gz bsd.strip floppy*.fs \ + lib*.a lib*.olist instbin.map boot instbin.conf ${FS} + /bin/rm -rf mr.fs.d + +.include <bsd.obj.mk> diff --git a/distrib/i386/ramdisk/list.local b/distrib/i386/ramdisk/list.local index 9946542e122..2c5f988b338 100644 --- a/distrib/i386/ramdisk/list.local +++ b/distrib/i386/ramdisk/list.local @@ -1,8 +1,8 @@ -# $OpenBSD: list.local,v 1.2 2016/12/30 22:32:25 deraadt Exp $ +# $OpenBSD: list.local,v 1.3 2019/04/30 17:46:04 deraadt Exp $ LINK instbin sbin/fsck_msdos LINK instbin sbin/mount_msdos LINK instbin usr/bin/ftp -#TZ +#TZ # this does not fit on the floppy diff --git a/distrib/i386/ramdisk_cd/Makefile b/distrib/i386/ramdisk_cd/Makefile index f20f475c9df..a7e48792f31 100644 --- a/distrib/i386/ramdisk_cd/Makefile +++ b/distrib/i386/ramdisk_cd/Makefile @@ -1,13 +1,93 @@ -# $OpenBSD: Makefile,v 1.7 2016/12/30 22:32:25 deraadt Exp $ +# $OpenBSD: Makefile,v 1.8 2019/04/30 17:46:04 deraadt Exp $ + +FS= miniroot${OSrev}.fs +FSSIZE= 7936 +FSDISKTYPE= mini34 +MOUNT_POINT= /mnt +MTREE= ${UTILS}/mtree.conf + +LISTS= ${.CURDIR}/../common/list ${.CURDIR}/list.local +UTILS= ${.CURDIR}/../../miniroot -.PATH: ${.CURDIR}/../ramdisk RAMDISK=RAMDISK_CD -DISKTYPE=rdrootb -FLOPPYSIZE=7936 -FLOPPYTYPE=mini34 -XNAME=miniroot LBA=1 -.include "${.CURDIR}/../common/Makefile.inc" +all: ${FS} + +${FS}: bsd.gz + dd if=/dev/zero of=${FS} bs=512 count=${FSSIZE} + vnconfig -v ${FS} > vnd +.ifdef LBA + fdisk -yi -l ${FSSIZE} -f ${DESTDIR}/usr/mdec/mbr `cat vnd` +.endif + 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/boot ${.OBJDIR}/boot + strip ${.OBJDIR}/boot + strip -R .comment -R .SUNW_ctf ${.OBJDIR}/boot + installboot -v -r ${MOUNT_POINT} `cat vnd` \ + ${DESTDIR}/usr/mdec/biosboot ${.OBJDIR}/boot + dd if=bsd.gz of=${MOUNT_POINT}/bsd bs=512 + df -i ${MOUNT_POINT} + umount ${MOUNT_POINT} + vnconfig -u `cat vnd` + rm -f vnd + +MRDISKTYPE= rdrootb +MRMAKEFSARGS= -o disklabel=${MRDISKTYPE},minfree=0,density=4096 + +bsd.gz: bsd.rd + cp bsd.rd bsd.strip + strip bsd.strip + strip -R .comment -R .SUNW_ctf bsd.strip + gzip -c9n bsd.strip > bsd.gz + +bsd.rd: mr.fs bsd + cp bsd bsd.rd + rdsetroot bsd.rd mr.fs + +bsd: + cd ${.CURDIR}/../../../sys/arch/i386/compile/${RAMDISK} && \ + su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && exec ${MAKE}' + cp -p ${.CURDIR}/../../../sys/arch/i386/compile/${RAMDISK}/obj/bsd bsd + +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 + +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 + strip -R .comment -R .SUNW_ctf instbin + +instbin.conf: ${LISTS} + awk -f ${UTILS}/makeconf.awk ${LISTS} > instbin.conf + +unconfig: + -umount -f ${MOUNT_POINT} + -[ -f vnd ] && vnconfig -u `cat vnd` && rm -f vnd + +.ifdef RELEASEDIR +install: + cp bsd.rd ${RELEASEDIR}/bsd.rd + chmod a+r ${RELEASEDIR}/bsd.rd + cp ${FS} ${RELEASEDIR}/${FS} +.endif # RELEASEDIR + +clean cleandir: + /bin/rm -f *.core mr.fs instbin instbin.mk instbin*.cache \ + *.o *.lo *.c bsd bsd.rd bsd.gz bsd.strip floppy*.fs \ + lib*.a lib*.olist instbin.map boot instbin.conf ${FS} + /bin/rm -rf mr.fs.d -LISTS+= ${.CURDIR}/list.local +.include <bsd.obj.mk> diff --git a/distrib/landisk/Makefile b/distrib/landisk/Makefile index f8dda62d31a..ecdf2421b03 100644 --- a/distrib/landisk/Makefile +++ b/distrib/landisk/Makefile @@ -1,7 +1,8 @@ -# $OpenBSD: Makefile,v 1.2 2006/11/08 23:09:34 drahn Exp $ +# $OpenBSD: Makefile,v 1.3 2019/04/30 17:46:04 deraadt Exp $ -# miniroot must build after ramdisk, it reaches over and uses bsd.rd +SUBDIR= ramdisk -SUBDIR= ramdisk miniroot +unconfig: + cd ramdisk; ${MAKE} unconfig .include <bsd.subdir.mk> diff --git a/distrib/landisk/miniroot/Makefile b/distrib/landisk/miniroot/Makefile deleted file mode 100644 index eef34de6dc3..00000000000 --- a/distrib/landisk/miniroot/Makefile +++ /dev/null @@ -1,57 +0,0 @@ - -IMAGE= miniroot${OSrev}.fs - -MOUNT_POINT= /mnt - -DISKTYPE= miniroot2.5M -#NBLKS= 8192 -NBLKS= 5120 -# minfree, opt, b/i trks, sects, cpg -NEWFSARGS= -m 0 -o space -i 4096 - - -.ifndef DESTDIR -all ${IMAGE}: - @echo setenv DESTDIR before making a ramdisk! - @false -.else -all: ${IMAGE} - -${IMAGE}: rd_setup do_files rd_teardown - -.endif - -do_files: - installboot -vr ${MOUNT_POINT} `cat vnd` \ - ${DESTDIR}/usr/mdec/xxboot ${DESTDIR}/usr/mdec/boot - gzip -c < ${.OBJDIR}/../ramdisk/bsd.rd > ${MOUNT_POINT}/bsd.rd - ln ${MOUNT_POINT}/bsd.rd ${MOUNT_POINT}/bsd - -rd_setup: - dd if=/dev/zero of=${IMAGE} bs=512 count=${NBLKS} - vnconfig -v -t ${DISKTYPE} ${IMAGE} > vnd - fdisk -i -y `cat vnd` - fdisk -u -y -f ${DESTDIR}/usr/mdec/mbr `cat 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` - rm -f vnd - -unconfig: - -umount -f ${MOUNT_POINT} - -[ -f vnd ] && vnconfig -u `cat vnd` && rm -f vnd - -.PRECIOUS: ${IMAGE} - -.ifdef RELEASEDIR -install: - cp ${IMAGE} ${RELEASEDIR} -.endif - -.include <bsd.obj.mk> -.include <bsd.subdir.mk> diff --git a/distrib/landisk/ramdisk/Makefile b/distrib/landisk/ramdisk/Makefile index 901978cb147..19f557c425f 100644 --- a/distrib/landisk/ramdisk/Makefile +++ b/distrib/landisk/ramdisk/Makefile @@ -1,30 +1,44 @@ -# $OpenBSD: Makefile,v 1.25 2019/04/29 15:56:25 deraadt Exp $ +# $OpenBSD: Makefile,v 1.26 2019/04/30 17:46:04 deraadt Exp $ + +FS= miniroot${OSrev}.fs +FSSIZE= 5120 +FSDISKTYPE= miniroot2.5M +MOUNT_POINT= /mnt +MTREE= ${UTILS}/mtree.conf -IMAGE= mr.fs -CRUNCHCONF?= instbin.conf -CRUNCHCONFS?= ${.CURDIR}/../common/crunch.conf LISTS= ${.CURDIR}/list -UTILS?= ${.CURDIR}/../../miniroot +UTILS= ${.CURDIR}/../../miniroot -MTREE= ${UTILS}/mtree.conf +MRDISKTYPE= rdroot2.5M +MRMAKEFSARGS= -o disklabel=${MRDISKTYPE},minfree=0,density=4096 -DISKTYPE= rdroot2.5M -MAKEFSARGS_RD= -o disklabel=${DISKTYPE},minfree=0,density=4096 +# minfree, opt, b/i trks, sects, cpg +NEWFSARGS= -m 0 -o space -i 4096 -.ifndef DESTDIR -all ${IMAGE}: - @echo setenv DESTDIR before making a ramdisk! - @false -.else +all: ${FS} -# mix config is not needed. -all: bsd.rd +${FS}: bsd.rd + dd if=/dev/zero of=${FS} bs=512 count=${FSSIZE} + vnconfig -v -t ${FSDISKTYPE} ${FS} > vnd + fdisk -i -y `cat vnd` + fdisk -u -y -f ${DESTDIR}/usr/mdec/mbr `cat vnd` + disklabel -w `cat vnd` ${FSDISKTYPE} + newfs ${NEWFSARGS} /dev/r`cat vnd`a + mount /dev/`cat vnd`a ${MOUNT_POINT} + installboot -vr ${MOUNT_POINT} `cat vnd` \ + ${DESTDIR}/usr/mdec/xxboot ${DESTDIR}/usr/mdec/boot + gzip -c < ${.OBJDIR}/../ramdisk/bsd.rd > ${MOUNT_POINT}/bsd.rd + ln ${MOUNT_POINT}/bsd.rd ${MOUNT_POINT}/bsd + df -i ${MOUNT_POINT} + umount ${MOUNT_POINT} + vnconfig -u `cat vnd` + rm -f vnd -bsd.rd: ${IMAGE} bsd +bsd.rd: mr.fs bsd cp bsd bsd.rd - rdsetroot bsd.rd ${IMAGE} + rdsetroot bsd.rd mr.fs -${IMAGE}: instbin +mr.fs: instbin rm -rf $@.d install -d -o root -g wheel $@.d mtree -def ${MTREE} -p $@.d -u @@ -32,34 +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/landisk/compile/RAMDISK && \ su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && exec ${MAKE}' cp -p ${.CURDIR}/../../../sys/arch/landisk/compile/RAMDISK/obj/bsd bsd -.ifdef RELEASEDIR -install: - cp bsd.rd ${RELEASEDIR} -.endif - -instbin.mk instbin.cache instbin.c: ${CRUNCHCONF} - crunchgen -E -D ${.CURDIR}/../../.. -L ${DESTDIR}/usr/lib ${.ALLSRC} +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 -${CRUNCHCONF}: ${LISTS} +instbin.conf: ${LISTS} awk -f ${UTILS}/makeconf.awk ${LISTS} > instbin.conf +unconfig: + -umount -f ${MOUNT_POINT} + -[ -f vnd ] && vnconfig -u `cat vnd` && rm -f vnd + +.ifdef RELEASEDIR +install: + cp bsd.rd ${RELEASEDIR}/bsd.rd + chmod a+r ${RELEASEDIR}/bsd.rd + cp ${FS} ${RELEASEDIR} +.endif + clean cleandir: - /bin/rm -f *.core ${IMAGE} instbin instbin.mk instbin.cache \ + /bin/rm -f *.core mr.fs instbin instbin.mk instbin.cache \ lib*.a lib*.olist instbin.map *.o *.lo *.c bsd bsd.rd rm -f instbin.conf - rm -rf cd-dir ${IMAGE}.d + rm -rf cd-dir mr.fs.d .include <bsd.obj.mk> -.include <bsd.subdir.mk> diff --git a/distrib/landisk/ramdisk/Makefile.inc b/distrib/landisk/ramdisk/Makefile.inc deleted file mode 100644 index 55385fb2dc2..00000000000 --- a/distrib/landisk/ramdisk/Makefile.inc +++ /dev/null @@ -1,3 +0,0 @@ -# $OpenBSD: Makefile.inc,v 1.2 2014/07/16 19:59:30 okan Exp $ - -CRUNCHGENOPTS= -E diff --git a/distrib/loongson/Makefile b/distrib/loongson/Makefile index 551feabf138..9d63b3fb2b5 100644 --- a/distrib/loongson/Makefile +++ b/distrib/loongson/Makefile @@ -1,5 +1,8 @@ -# $OpenBSD: Makefile,v 1.4 2010/02/18 09:45:11 otto Exp $ +# $OpenBSD: Makefile,v 1.5 2019/04/30 17:46:04 deraadt Exp $ -SUBDIR= ramdisk miniroot +SUBDIR= ramdisk + +unconfig: + cd ramdisk; ${MAKE} unconfig .include <bsd.subdir.mk> diff --git a/distrib/loongson/cdfs/Makefile b/distrib/loongson/cdfs/Makefile deleted file mode 100644 index 873bc75e79d..00000000000 --- a/distrib/loongson/cdfs/Makefile +++ /dev/null @@ -1,30 +0,0 @@ -# $OpenBSD: Makefile,v 1.4 2019/04/29 15:56:25 deraadt Exp $ - -CDROM= cd${OSrev}.iso - -all: ${CDROM} - -${CDROM}: - -rm -rf ${.OBJDIR}/cd-dir - mkdir -p ${.OBJDIR}/cd-dir/${OSREV}/loongson - mkdir -p ${.OBJDIR}/cd-dir/etc - echo "set image /${OSREV}/loongson/bsd.rd" > ${.OBJDIR}/cd-dir/etc/boot.conf - cp ${.OBJDIR}/../ramdisk/bsd.rd ${.OBJDIR}/cd-dir/${OSREV}/loongson - mkhybrid -a -R -T -L -l -d -D -N -o ${.OBJDIR}/${CDROM} -v -v \ - -A "OpenBSD ${OSREV} loongson bootonly CD" \ - -P "Copyright (c) `date +%Y` Theo de Raadt, The OpenBSD project" \ - -p "Theo de Raadt <deraadt@openbsd.org>" \ - -V "OpenBSD/loongson ${OSREV} boot CD" \ - ${.OBJDIR}/cd-dir - -.ifdef RELEASEDIR -install: - cp ${CDROM} ${RELEASEDIR} -.endif - -clean cleandir: - /bin/rm -f ${CDROM} - rm -rf cd-dir - -.include <bsd.obj.mk> -.include <bsd.subdir.mk> diff --git a/distrib/loongson/miniroot/Makefile b/distrib/loongson/miniroot/Makefile deleted file mode 100644 index 5af6a5c9df6..00000000000 --- a/distrib/loongson/miniroot/Makefile +++ /dev/null @@ -1,49 +0,0 @@ - -IMAGE= miniroot${OSrev}.fs - -MOUNT_POINT= /mnt - -DISKTYPE= miniroot -NBLKS= 18432 - -.ifndef DESTDIR -all ${IMAGE}: - @echo setenv DESTDIR before making a ramdisk! - @false -.else -all: ${IMAGE} - -${IMAGE}: rd_setup do_files rd_teardown - -.endif - -do_files: - cp ${.OBJDIR}/../ramdisk/bsd.rd ${MOUNT_POINT}/bsd.rd - -rd_setup: - dd if=/dev/zero of=${IMAGE} bs=512 count=${NBLKS} - vnconfig -v -t ${DISKTYPE} ${IMAGE} > vnd - echo 'u\ne 0\n83\n\n63\n*\nw\nq\n' | fdisk -e `cat vnd` > /dev/null - echo 'w\ny\nq\n' | disklabel -E `cat vnd` > /dev/null - newfs_ext2fs /dev/r`cat vnd`i - mount /dev/`cat vnd`i ${MOUNT_POINT} - -rd_teardown: - df -i ${MOUNT_POINT} - -umount ${MOUNT_POINT} - vnconfig -u `cat vnd` - rm -f vnd - -unconfig: - -umount -f ${MOUNT_POINT} - -[ -f vnd ] && vnconfig -u `cat vnd` && rm -f vnd - -.PRECIOUS: ${IMAGE} - -.ifdef RELEASEDIR -install: - cp ${IMAGE} ${RELEASEDIR} -.endif - -.include <bsd.obj.mk> -.include <bsd.subdir.mk> diff --git a/distrib/loongson/ramdisk/Makefile b/distrib/loongson/ramdisk/Makefile index 0481210acba..f55f48d96f5 100644 --- a/distrib/loongson/ramdisk/Makefile +++ b/distrib/loongson/ramdisk/Makefile @@ -1,30 +1,51 @@ -# $OpenBSD: Makefile,v 1.17 2019/04/29 15:56:25 deraadt Exp $ +# $OpenBSD: Makefile,v 1.18 2019/04/30 17:46:04 deraadt Exp $ + +FS= miniroot${OSrev}.fs +FSSIZE= 18432 +FSDISKTYPE= miniroot +CDROM= cd${OSrev}.iso +MOUNT_POINT= /mnt +MTREE= ${UTILS}/mtree.conf -IMAGE= mr.fs -CRUNCHCONF?= instbin.conf -CRUNCHCONFS?= ${.CURDIR}/../common/crunch.conf LISTS= ${.CURDIR}/list -UTILS?= ${.CURDIR}/../../miniroot +UTILS= ${.CURDIR}/../../miniroot -MTREE= ${UTILS}/mtree.conf +MRMRDISKTYPE= rdroot +MRMAKEFSARGS= -o disklabel=${MRDISKTYPE},minfree=0,density=4096 -DISKTYPE= rdroot -MAKEFSARGS_RD= -o disklabel=${DISKTYPE},minfree=0,density=4096 +all: ${FS} ${CDROM} -.ifndef DESTDIR -all ${IMAGE}: - @echo setenv DESTDIR before making a ramdisk! - @false -.else +${FS}: bsd.rd + dd if=/dev/zero of=${FS} bs=512 count=${FSSIZE} + vnconfig -v -t ${FSDISKTYPE} ${FS} > vnd + echo 'u\ne 0\n83\n\n63\n*\nw\nq\n' | fdisk -e `cat vnd` > /dev/null + echo 'w\ny\nq\n' | disklabel -E `cat vnd` > /dev/null + newfs_ext2fs /dev/r`cat vnd`i + mount /dev/`cat vnd`i ${MOUNT_POINT} + cp ${.OBJDIR}/../ramdisk/bsd.rd ${MOUNT_POINT}/bsd.rd + df -i ${MOUNT_POINT} + -umount ${MOUNT_POINT} + vnconfig -u `cat vnd` + rm -f vnd -# mix config is not needed. -all: bsd.rd +${CDROM}: bsd.rd + rm -rf ${.OBJDIR}/cd-dir + mkdir -p ${.OBJDIR}/cd-dir/${OSREV}/loongson + mkdir -p ${.OBJDIR}/cd-dir/etc + echo "set image /${OSREV}/loongson/bsd.rd" > ${.OBJDIR}/cd-dir/etc/boot.conf + cp ${.OBJDIR}/bsd.rd ${.OBJDIR}/cd-dir/${OSREV}/loongson + mkhybrid -a -R -T -L -l -d -D -N -o ${.OBJDIR}/${CDROM} -v -v \ + -A "OpenBSD ${OSREV} loongson bootonly CD" \ + -P "Copyright (c) `date +%Y` Theo de Raadt, The OpenBSD project" \ + -p "Theo de Raadt <deraadt@openbsd.org>" \ + -V "OpenBSD/loongson ${OSREV} boot CD" \ + ${.OBJDIR}/cd-dir -bsd.rd: ${IMAGE} bsd +bsd.rd: mr.fs bsd cp bsd bsd.rd - rdsetroot bsd.rd ${IMAGE} + rdsetroot bsd.rd mr.fs -${IMAGE}: instbin +mr.fs: instbin rm -rf $@.d install -d -o root -g wheel $@.d mtree -def ${MTREE} -p $@.d -u @@ -32,33 +53,39 @@ ${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/loongson/compile/RAMDISK && \ su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && exec ${MAKE}' cp -p ${.CURDIR}/../../../sys/arch/loongson/compile/RAMDISK/obj/bsd bsd -instbin.mk instbin.cache instbin.c: ${CRUNCHCONF} - crunchgen -EM -D ${.CURDIR}/../../.. -L ${DESTDIR}/usr/lib ${.ALLSRC} +instbin.mk instbin.cache instbin.c: instbin.conf + crunchgen -E -M -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 -${CRUNCHCONF}: ${LISTS} +instbin.conf: ${LISTS} awk -f ${UTILS}/makeconf.awk ${LISTS} > instbin.conf -clean cleandir: - /bin/rm -f *.core ${IMAGE} instbin instbin.mk instbin.cache \ - lib*.a lib*.olist instbin.map *.o *.lo *.c bsd bsd.rd cd${OSrev}.iso - rm -rf cd-dir ${IMAGE}.d +unconfig: + -umount -f ${MOUNT_POINT} + -[ -f vnd ] && vnconfig -u `cat vnd` && rm -f vnd .ifdef RELEASEDIR install: - cp bsd.rd ${RELEASEDIR} + cp bsd.rd ${RELEASEDIR}/bsd.rd + chmod a+r ${RELEASEDIR}/bsd.rd + cp ${FS} ${RELEASEDIR} + cp ${CDROM} ${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 cd${OSrev}.iso + rm -rf cd-dir mr.fs.d + rm -f ${CDROM} + .include <bsd.obj.mk> -.include <bsd.subdir.mk> diff --git a/distrib/loongson/ramdisk/Makefile.inc b/distrib/loongson/ramdisk/Makefile.inc deleted file mode 100644 index 0eac336bac3..00000000000 --- a/distrib/loongson/ramdisk/Makefile.inc +++ /dev/null @@ -1,4 +0,0 @@ -# $OpenBSD: Makefile.inc,v 1.1 2010/01/31 21:36:01 otto Exp $ - -CRUNCHGENOPTS= -EM - diff --git a/distrib/luna88k/Makefile b/distrib/luna88k/Makefile index bd378050e84..53cb3ccfff7 100644 --- a/distrib/luna88k/Makefile +++ b/distrib/luna88k/Makefile @@ -1,5 +1,8 @@ -# $OpenBSD: Makefile,v 1.2 2014/02/27 18:55:39 miod Exp $ +# $OpenBSD: Makefile,v 1.3 2019/04/30 17:46:04 deraadt Exp $ -SUBDIR=ramdisk miniroot +SUBDIR=ramdisk + +unconfig: + cd ramdisk; ${MAKE} unconfig .include <bsd.subdir.mk> diff --git a/distrib/luna88k/miniroot/Makefile b/distrib/luna88k/miniroot/Makefile deleted file mode 100644 index cf761f2edbe..00000000000 --- a/distrib/luna88k/miniroot/Makefile +++ /dev/null @@ -1,65 +0,0 @@ -# $OpenBSD: Makefile,v 1.6 2019/04/29 15:56:25 deraadt Exp $ - -LDSTATIC=-static -# Hack needed to find kernel images... -BSDSRCDIR?=/usr/src -SRCSYSDIR?=${BSDSRCDIR}/sys - -TARGET= miniroot${OSrev}.fs -MOUNT_POINT= /mnt - -.ifndef DESTDIR -all ${TARGET}: - @echo setenv DESTDIR before creating a miniroot! - @false -.else - -all: ${TARGET} - -${TARGET}: vn_up install_files showit vn_down - -vn_up: blank_filesystem - vnconfig -v ${TARGET} > vnd - disklabel -w `cat vnd` miniroot - newfs -m 0 -f 1024 -b 8192 /dev/r`cat vnd`a - mount /dev/`cat vnd`a ${MOUNT_POINT} - -showit: - df -i ${MOUNT_POINT} - -vn_down: - umount ${MOUNT_POINT} - vnconfig -u `cat vnd` - rm -f vnd - -install_files: bsd.rd boot - -bsd.rd: - install -c -m 555 -o root -g wheel \ - ${.OBJDIR}/../ramdisk/bsd.rd ${MOUNT_POINT}/bsd - -boot: - install -c -m 555 -o root -g wheel \ - ${DESTDIR}/usr/mdec/boot ${MOUNT_POINT}/boot - ln ${MOUNT_POINT}/boot ${MOUNT_POINT}/vmunix - -blank_filesystem: - dd if=/dev/zero of=${TARGET} bs=32k count=128 # 4MB - -.endif - -unconfig: - -umount -f ${MOUNT_POINT} - -[ -f vnd ] && vnconfig -u `cat vnd` && rm -f vnd - -.ifdef RELEASEDIR -install: - cp ${TARGET} ${RELEASEDIR} -.endif - -clean: - rm -f ${TARGET} - -.include <bsd.own.mk> -.include <bsd.obj.mk> -.include <bsd.subdir.mk> diff --git a/distrib/luna88k/ramdisk/Makefile b/distrib/luna88k/ramdisk/Makefile index 1afcce07c16..13b9cccbe66 100644 --- a/distrib/luna88k/ramdisk/Makefile +++ b/distrib/luna88k/ramdisk/Makefile @@ -1,25 +1,41 @@ -# $OpenBSD: Makefile,v 1.24 2019/04/29 15:56:26 deraadt Exp $ +# $OpenBSD: Makefile,v 1.25 2019/04/30 17:46:04 deraadt Exp $ -LDSTATIC=-static -# Hack needed to find kernel images... -BSDSRCDIR?=/usr/src -SRCSYSDIR?=${BSDSRCDIR}/sys +FS= miniroot${OSrev}.fs +FSSIZE= 8192 +FSDISKTYPE= miniroot +MOUNT_POINT= /mnt +MTREE= ${UTILS}/mtree.conf -IMAGE= mr.fs LISTS= ${.CURDIR}/list -UTILS?= ${.CURDIR}/../../miniroot -MTREE= ${UTILS}/mtree.conf +UTILS= ${.CURDIR}/../../miniroot -DISKTYPE= rdroot -MAKEFSARGS_RD= -o disklabel=${DISKTYPE},minfree=0 +MRDISKTYPE= rdroot +MRMAKEFSARGS= -o disklabel=${MRDISKTYPE},minfree=0 + +LDSTATIC=-static -all: bsd.rd +all: ${FS} -bsd.rd: ${IMAGE} bsd +${FS}: vn_up install_files showit vn_down + dd if=/dev/zero of=${FS} bs=512 count=${FSSIZE} + vnconfig -v ${FS} > vnd + disklabel -w `cat vnd` ${FSDISKTYPE} + newfs -m 0 -f 1024 -b 8192 /dev/r`cat vnd`a + mount /dev/`cat vnd`a ${MOUNT_POINT} + install -c -m 555 -o root -g wheel bsd.rd ${MOUNT_POINT}/bsd + install -c -m 555 -o root -g wheel \ + ${DESTDIR}/usr/mdec/boot ${MOUNT_POINT}/boot + ln ${MOUNT_POINT}/boot ${MOUNT_POINT}/vmunix + df -i ${MOUNT_POINT} + umount ${MOUNT_POINT} + vnconfig -u `cat vnd` + rm -f vnd + +bsd.rd: mr.fs bsd cp bsd bsd.rd - rdsetroot bsd.rd ${IMAGE} + rdsetroot bsd.rd mr.fs -${IMAGE}: instbin +mr.fs: instbin rm -rf $@.d install -d -o root -g wheel $@.d mtree -def ${MTREE} -p $@.d -u @@ -27,33 +43,37 @@ ${IMAGE}: instbin TARGDIR=$@.d UTILS=${UTILS} RELEASEDIR=${RELEASEDIR} \ sh ${UTILS}/runlist.sh ${LISTS} rm $@.d/instbin - makefs ${MAKEFSARGS_RD} $@ $@.d + makefs ${MRMAKEFSARGS} $@ $@.d bsd: -.ifndef(NOBUILD) cd ${.CURDIR}/../../../sys/arch/luna88k/compile/RAMDISK && \ su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && exec ${MAKE}' -.endif cp -p ${.CURDIR}/../../../sys/arch/luna88k/compile/RAMDISK/obj/bsd bsd -.ifdef RELEASEDIR -install: - cp bsd.rd ${RELEASEDIR} -.endif +instbin.mk instbin.cache instbin.c: instbin.conf + crunchgen -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 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 instbin.conf +unconfig: + -umount -f ${MOUNT_POINT} + -[ -f vnd ] && vnconfig -u `cat vnd` && rm -f vnd -instbin: instbin.mk instbin.cache instbin.c - ${MAKE} -f instbin.mk all +.ifdef RELEASEDIR +install: + cp bsd.rd ${RELEASEDIR}/bsd.rd + chmod a+r ${RELEASEDIR}/bsd.rd + cp ${FS} ${RELEASEDIR} +.endif clean cleandir: - /bin/rm -f *.core ${IMAGE} instbin instbin.conf instbin.mk instbin.cache \ + /bin/rm -f *.core mr.fs instbin instbin.conf instbin.mk instbin.cache \ lib*.a lib*.olist instbin.map *.o *.lo *.c bsd bsd.rd - /bin/rm -rf ${IMAGE}.d + /bin/rm -rf mr.fs.d .include <bsd.obj.mk> -.include <bsd.subdir.mk> diff --git a/distrib/luna88k/ramdisk/Makefile.inc b/distrib/luna88k/ramdisk/Makefile.inc deleted file mode 100644 index f717b57e14b..00000000000 --- a/distrib/luna88k/ramdisk/Makefile.inc +++ /dev/null @@ -1,37 +0,0 @@ -# $OpenBSD: Makefile.inc,v 1.10 2019/04/29 15:56:26 deraadt Exp $ - -LISTS= ${.CURDIR}/list -UTILS?= ${.CURDIR}/../../miniroot - -COMMONDIR= ${.CURDIR}/../ramdisk -MOUNT_POINT?= ${.CURDIR}/../${BASE}/fs - -CRUNCHCONF?= ${COMMONDIR}/instbin.conf -MTREE= ${UTILS}/mtree.conf - -instbin.conf: ${LISTS} - awk -f ${UTILS}/makeconf.awk ${LISTS} > instbin.conf - -instbin.mk instbin.cache instbin.c: instbin.conf - crunchgen -D ${BSDSRCDIR} -L ${DESTDIR}/usr/lib instbin.conf - -instbin: instbin.mk instbin.cache instbin.c - ${MAKE} -f instbin.mk all - -#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 \ - *.o *.lo *.c \ - lib*.a lib*.olist instbin.map - -.include <bsd.obj.mk> -.include <bsd.subdir.mk> diff --git a/distrib/macppc/iso/Makefile b/distrib/macppc/iso/Makefile index 66395bf890a..0e39cc36c36 100644 --- a/distrib/macppc/iso/Makefile +++ b/distrib/macppc/iso/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.15 2019/04/29 15:56:26 deraadt Exp $ +# $OpenBSD: Makefile,v 1.16 2019/04/30 17:46:04 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} @@ -46,4 +46,3 @@ clean cleandir: rm -rf cd-dir .include <bsd.obj.mk> -.include <bsd.subdir.mk> diff --git a/distrib/macppc/ramdisk/Makefile b/distrib/macppc/ramdisk/Makefile index 738c6e1d154..8da4c9302d6 100644 --- a/distrib/macppc/ramdisk/Makefile +++ b/distrib/macppc/ramdisk/Makefile @@ -1,36 +1,17 @@ -# $OpenBSD: Makefile,v 1.40 2019/04/29 15:56:26 deraadt Exp $ - -IMAGE= mr.fs -CRUNCHCONF?= instbin.conf -CRUNCHCONFS?= ${.CURDIR}/../common/crunch.conf -LISTS= ${.CURDIR}/list -UTILS?= ${.CURDIR}/../../miniroot +# $OpenBSD: Makefile,v 1.41 2019/04/30 17:46:04 deraadt Exp $ +CDROM= cd${OSrev}.iso MTREE= ${UTILS}/mtree.conf -DISKTYPE= rdroot -MAKEFSARGS_RD= -o disklabel=${DISKTYPE},minfree=0,density=4096 - -.ifndef DESTDIR -all ${IMAGE}: - @echo setenv DESTDIR before making a ramdisk! - @false -.else - -# mix config is not needed. -all: bsd.rd cd +LISTS= ${.CURDIR}/list +UTILS= ${.CURDIR}/../../miniroot -bsd.rd: ${IMAGE} bsd - cp bsd bsd.rd - rdsetroot bsd.rd ${IMAGE} +all: ${CDROM} -cd: bsd.rd - -rm -rf ${.OBJDIR}/cd-dir/ - -@mkdir -p ${.OBJDIR}/cd-dir/${OSREV}/macppc/ - cp bsd.rd ${.OBJDIR}/cd-dir/${OSREV}/macppc/bsd.rd - strip -R .SUNW_ctf ${.OBJDIR}/cd-dir/${OSREV}/macppc/bsd.rd - gzip -9n ${.OBJDIR}/cd-dir/${OSREV}/macppc/bsd.rd - mv ${.OBJDIR}/cd-dir/${OSREV}/macppc/bsd.rd.gz ${.OBJDIR}/cd-dir/${OSREV}/macppc/bsd.rd +${CDROM}: bsd.gz + rm -rf ${.OBJDIR}/cd-dir/ + mkdir -p ${.OBJDIR}/cd-dir/${OSREV}/macppc/ + cp bsd.gz ${.OBJDIR}/cd-dir/${OSREV}/macppc/bsd.rd # On HFS, doing the following means COPIES of the files.. therefore # we skip doing so. # ln ${.OBJDIR}/cd-dir/${OSREV}/macppc/bsd.rd ${.OBJDIR}/cd-dir/bsd.rd @@ -45,9 +26,25 @@ cd: bsd.rd -P "Copyright (c) `date +%Y` Theo de Raadt, The OpenBSD project" \ -p "Theo de Raadt <deraadt@openbsd.org>" \ -V "OpenBSD/macppc ${OSREV} boot-only CD" \ - -o ${.OBJDIR}/cd${OSrev}.iso ${.OBJDIR}/cd-dir + -o ${CDROM} ${.OBJDIR}/cd-dir + +MRDISKTYPE= rdroot +MRMAKEFSARGS= -o disklabel=${MRDISKTYPE},minfree=0,density=4096 + +bsd.gz: bsd.rd + gzip -9nv < bsd.rd > bsd.gz + +bsd.rd: mr.fs bsd + cp bsd bsd.rd + rdsetroot bsd.rd mr.fs + strip -R .SUNW_ctf bsd.rd + +bsd: + cd ${.CURDIR}/../../../sys/arch/macppc/compile/RAMDISK && \ + su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && exec ${MAKE}' + cp -p ${.CURDIR}/../../../sys/arch/macppc/compile/RAMDISK/obj/bsd bsd -${IMAGE}: instbin +mr.fs: instbin rm -rf $@.d install -d -o root -g wheel $@.d mtree -def ${MTREE} -p $@.d -u @@ -55,37 +52,28 @@ ${IMAGE}: instbin TARGDIR=$@.d UTILS=${UTILS} RELEASEDIR=${RELEASEDIR} \ sh ${UTILS}/runlist.sh ${LISTS} rm $@.d/instbin - makefs ${MAKEFSARGS_RD} $@ $@.d - vnconfig -v mr.fs > vnd - df -i /dev/`cat vnd`a - vnconfig -u `cat vnd` - rm -f vnd - -.endif - -bsd: - cd ${.CURDIR}/../../../sys/arch/macppc/compile/RAMDISK && \ - su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && exec ${MAKE}' - cp -p ${.CURDIR}/../../../sys/arch/macppc/compile/RAMDISK/obj/bsd bsd + makefs ${MRMAKEFSARGS} $@ $@.d -instbin.mk instbin.cache instbin.c: ${CRUNCHCONF} - crunchgen -E -D ${.CURDIR}/../../.. -L ${DESTDIR}/usr/lib ${.ALLSRC} +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 -${CRUNCHCONF}: ${LISTS} +instbin.conf: ${LISTS} awk -f ${UTILS}/makeconf.awk ${LISTS} > instbin.conf -clean cleandir: - /bin/rm -f *.core ${IMAGE} instbin instbin.mk instbin.cache \ - lib*.a lib*.olist instbin.map *.o *.lo *.c bsd bsd.rd cd${OSrev}.iso - rm -rf cd-dir ${IMAGE}.d - .ifdef RELEASEDIR install: - cp bsd.rd cd${OSrev}.iso ${RELEASEDIR} + cp bsd.rd ${RELEASEDIR}/bsd.rd + chmod a+r ${RELEASEDIR}/bsd.rd + cp ${CDROM} ${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 cd${OSrev}.iso + rm -rf cd-dir mr.fs.d + .include <bsd.obj.mk> -.include <bsd.subdir.mk> diff --git a/distrib/macppc/ramdisk/Makefile.inc b/distrib/macppc/ramdisk/Makefile.inc deleted file mode 100644 index 55385fb2dc2..00000000000 --- a/distrib/macppc/ramdisk/Makefile.inc +++ /dev/null @@ -1,3 +0,0 @@ -# $OpenBSD: Makefile.inc,v 1.2 2014/07/16 19:59:30 okan Exp $ - -CRUNCHGENOPTS= -E diff --git a/distrib/miniroot/list2sh.awk b/distrib/miniroot/list2sh.awk index 4ae2093d480..743be0df5fa 100644 --- a/distrib/miniroot/list2sh.awk +++ b/distrib/miniroot/list2sh.awk @@ -1,4 +1,4 @@ -# $OpenBSD: list2sh.awk,v 1.21 2014/02/21 19:14:23 deraadt Exp $ +# $OpenBSD: list2sh.awk,v 1.22 2019/04/30 17:46:04 deraadt Exp $ BEGIN { printf("cd ${OBJDIR}\n"); @@ -19,6 +19,11 @@ $1 == "REMOVE" { printf("rm -f ${TARGDIR}/%s\n", $2); next; } +$1 == "MKDIR" { + printf("echo '%s'\n", $0); + printf("mkdir -p ${TARGDIR}/%s\n", $2); + next; +} $1 == "STRIP" { printf("echo '%s'\n", $0); printf("test -f ${TARGDIR}/%s && rm -fr ${TARGDIR}/%s\n", $3, $3); diff --git a/distrib/octeon/Makefile b/distrib/octeon/Makefile index 8e50b67e5f0..ba1e6b62b19 100644 --- a/distrib/octeon/Makefile +++ b/distrib/octeon/Makefile @@ -1,5 +1,8 @@ -# $OpenBSD: Makefile,v 1.2 2015/06/09 19:20:36 jasper Exp $ +# $OpenBSD: Makefile,v 1.3 2019/04/30 17:46:05 deraadt Exp $ -SUBDIR= ramdisk miniroot +SUBDIR= ramdisk + +unconfig: + cd ramdisk; ${MAKE} unconfig .include <bsd.subdir.mk> diff --git a/distrib/octeon/miniroot/Makefile b/distrib/octeon/miniroot/Makefile deleted file mode 100644 index 5b6f8c0586a..00000000000 --- a/distrib/octeon/miniroot/Makefile +++ /dev/null @@ -1,51 +0,0 @@ - -IMAGE= miniroot${OSrev}.fs - -MOUNT_POINT= /mnt - -DISKTYPE= miniroot -NBLKS= 24576 -NEWFSARGS= -t msdos - - -.ifndef DESTDIR -all ${IMAGE}: - @echo setenv DESTDIR before making a ramdisk! - @false -.else -all: ${IMAGE} - -${IMAGE}: rd_setup do_files rd_teardown - -.endif - -do_files: - cp ${.OBJDIR}/../ramdisk/bsd.rd ${MOUNT_POINT}/bsd.rd - -rd_setup: - dd if=/dev/zero of=${IMAGE} bs=512 count=${NBLKS} - vnconfig -v -t ${DISKTYPE} ${IMAGE} > vnd - echo 'u\ne 0\nC\nn\n64\n22528\nf 0\nw\nq\n' | fdisk -e `cat vnd` - echo 'w\ny\nq\n' | disklabel -E `cat vnd` > /dev/null - 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` - rm -f vnd - -unconfig: - -umount -f ${MOUNT_POINT} - -[ -f vnd ] && vnconfig -u `cat vnd` && rm -f vnd - -.PRECIOUS: ${IMAGE} - -.ifdef RELEASEDIR -install: - cp ${IMAGE} ${RELEASEDIR} -.endif - -.include <bsd.obj.mk> -.include <bsd.subdir.mk> diff --git a/distrib/octeon/ramdisk/Makefile b/distrib/octeon/ramdisk/Makefile index bc634f36545..7b113907089 100644 --- a/distrib/octeon/ramdisk/Makefile +++ b/distrib/octeon/ramdisk/Makefile @@ -1,24 +1,41 @@ -# $OpenBSD: Makefile,v 1.10 2019/04/29 15:56:26 deraadt Exp $ +# $OpenBSD: Makefile,v 1.11 2019/04/30 17:46:05 deraadt Exp $ + +FS= miniroot${OSrev}.fs +FSSIZE= 24576 +FSDISKTYPE= miniroot +MOUNT_POINT= /mnt +MTREE= ${UTILS}/mtree.conf -IMAGE= mr.fs -CRUNCHCONF?= instbin.conf -CRUNCHCONFS?= ${.CURDIR}/../common/crunch.conf LISTS= ${.CURDIR}/list -UTILS?= ${.CURDIR}/../../miniroot +UTILS= ${.CURDIR}/../../miniroot -MTREE= ${UTILS}/mtree.conf +NEWFSARGS= -t msdos -DISKTYPE= rdroot -MAKEFSARGS_RD= -o disklabel=${DISKTYPE},minfree=0,density=4096 +MRDISKTYPE= rdroot +MRMAKEFSARGS= -o disklabel=${MRDISKTYPE},minfree=0,density=4096 + +all: ${FS} + +${FS}: bsd.rd + dd if=/dev/zero of=${FS} bs=512 count=${FSSIZE} + vnconfig -v -t ${FSDISKTYPE} ${FS} > vnd + echo 'u\ne 0\nC\nn\n64\n22528\nf 0\nw\nq\n' | fdisk -e `cat vnd` + echo 'w\ny\nq\n' | disklabel -E `cat vnd` > /dev/null + newfs ${NEWFSARGS} /dev/r`cat vnd`a + mount /dev/`cat vnd`a ${MOUNT_POINT} + cp bsd.rd ${MOUNT_POINT}/bsd.rd + df -i ${MOUNT_POINT} + umount ${MOUNT_POINT} + vnconfig -u `cat vnd` + rm -f vnd -# mix config is not needed. all: bsd.rd -bsd.rd: ${IMAGE} bsd +bsd.rd: mr.fs bsd cp bsd bsd.rd - rdsetroot bsd.rd ${IMAGE} + rdsetroot bsd.rd mr.fs -${IMAGE}: instbin +mr.fs: instbin rm -rf $@.d install -d -o root -g wheel $@.d mtree -def ${MTREE} -p $@.d -u @@ -26,31 +43,37 @@ ${IMAGE}: instbin TARGDIR=$@.d UTILS=${UTILS} RELEASEDIR=${RELEASEDIR} \ sh ${UTILS}/runlist.sh ${LISTS} rm $@.d/instbin - makefs ${MAKEFSARGS_RD} $@ $@.d + makefs ${MRMAKEFSARGS} $@ $@.d bsd: cd ${.CURDIR}/../../../sys/arch/octeon/compile/RAMDISK && \ su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && exec ${MAKE}' cp -p ${.CURDIR}/../../../sys/arch/octeon/compile/RAMDISK/obj/bsd bsd -instbin.mk instbin.cache instbin.c: ${CRUNCHCONF} - crunchgen -M -E -D ${.CURDIR}/../../.. -L ${DESTDIR}/usr/lib ${.ALLSRC} +instbin.mk instbin.cache instbin.c: instbin.conf + crunchgen -E -M -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 -${CRUNCHCONF}: ${LISTS} +instbin.conf: ${LISTS} awk -f ${UTILS}/makeconf.awk ${LISTS} > instbin.conf clean cleandir: - /bin/rm -f *.core ${IMAGE} instbin instbin.mk instbin.cache \ + /bin/rm -f *.core mr.fs instbin instbin.mk instbin.cache \ lib*.a lib*.olist instbin.map *.o *.lo *.c bsd bsd.rd - rm -rf cd-dir ${IMAGE}.d + rm -rf cd-dir mr.fs.d + +unconfig: + -umount -f ${MOUNT_POINT} + -[ -f vnd ] && vnconfig -u `cat vnd` && rm -f vnd .ifdef RELEASEDIR install: - cp bsd.rd ${RELEASEDIR} + cp bsd.rd ${RELEASEDIR}/bsd.rd + chmod a+r ${RELEASEDIR}/bsd.rd + cp ${FS} ${RELEASEDIR} .endif .include <bsd.obj.mk> -.include <bsd.subdir.mk> diff --git a/distrib/octeon/ramdisk/Makefile.inc b/distrib/octeon/ramdisk/Makefile.inc deleted file mode 100644 index 107b66c8d7d..00000000000 --- a/distrib/octeon/ramdisk/Makefile.inc +++ /dev/null @@ -1,3 +0,0 @@ -# $OpenBSD: Makefile.inc,v 1.1 2013/03/26 18:03:53 jasper Exp $ - -CRUNCHGENOPTS= -ME diff --git a/distrib/ramdisk/Makefile b/distrib/ramdisk/Makefile index 59aab6ab993..187bd81a240 100644 --- a/distrib/ramdisk/Makefile +++ b/distrib/ramdisk/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.61 2019/04/29 17:55:54 naddy Exp $ +# $OpenBSD: Makefile,v 1.62 2019/04/30 17:46:05 deraadt Exp $ ARCHDIR= ${.CURDIR}/../${MACHINE}/ramdisk @@ -13,7 +13,7 @@ DISKTYPE= rdroot IMAGE?= ramdisk${OSrev}.fs IMAGESIZE?= 8192 # 4MB in 512 byte blocks CRUNCHGENOPTS?=-E -UTILS?= ${.CURDIR}/../miniroot +UTILS= ${.CURDIR}/../miniroot LISTS= ${.CURDIR}/list ${ARCHDIR}/list.local MTREE= ${UTILS}/mtree.conf @@ -59,7 +59,7 @@ ${FLOPPY}: bsd.gz ${BOOT} ${BOOTXX} bsd: cd ${.CURDIR}/../../sys/arch/${MACHINE}/compile/${RAMDISK} && \ - su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && ${MAKE}' + su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && exec ${MAKE}' cp -p ${.CURDIR}/../../sys/arch/${MACHINE}/compile/${RAMDISK}/obj/bsd bsd bsd.rd: bsd ${IMAGE} @@ -115,4 +115,3 @@ unconfig: -[ -f vnd ] && vnconfig -u `cat vnd` && rm -f vnd .include <bsd.obj.mk> -.include <bsd.subdir.mk> diff --git a/distrib/sgi/Makefile b/distrib/sgi/Makefile index 6d736081584..6bac4a909f5 100644 --- a/distrib/sgi/Makefile +++ b/distrib/sgi/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.4 2007/10/18 18:16:20 deraadt Exp $ +# $OpenBSD: Makefile,v 1.5 2019/04/30 17:46:05 deraadt Exp $ SUBDIR= ramdisk cdfs @@ -6,4 +6,7 @@ SUBDIR= ramdisk cdfs SUBDIR+= iso .endif +unconfig: + cd ramdisk; ${MAKE} unconfig + .include <bsd.subdir.mk> diff --git a/distrib/sgi/cdfs/Makefile b/distrib/sgi/cdfs/Makefile index be597a32ad7..568af8c31db 100644 --- a/distrib/sgi/cdfs/Makefile +++ b/distrib/sgi/cdfs/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.21 2019/04/29 15:56:26 deraadt Exp $ +# $OpenBSD: Makefile,v 1.22 2019/04/30 17:46:05 deraadt Exp $ CDROM= cd${OSrev}.iso FFS= ffs.img @@ -15,7 +15,7 @@ ALLIP= 22 26 27 28 30 32 SGIVOLSZ= 33500 ${CDROM}: - -rm -rf ${.OBJDIR}/cd-dir + rm -rf ${.OBJDIR}/cd-dir mkdir -p ${.OBJDIR}/cd-dir/ dd if=/dev/zero of=${FFS} bs=1m count=${CDFSMB} vnconfig -v ${FFS} > vnd @@ -55,18 +55,17 @@ ${CDROM}: rm -f vnd dd if=${FFS} of=${CDROM} bs=512 seek=${SGIVOLSZ} +unconfig: + -umount -f ${MOUNT_POINT} + -[ -f vnd ] && vnconfig -u `cat vnd` && rm -f vnd + .ifdef RELEASEDIR install: cp ${CDROM} ${RELEASEDIR} .endif -unconfig: - -umount -f ${MOUNT_POINT} - -[ -f vnd ] && vnconfig -u `cat vnd` && rm -f vnd - clean cleandir: /bin/rm -f ${CDROM} ${FFS} xfs512.bin xfs rm -rf cd-dir .include <bsd.obj.mk> -.include <bsd.subdir.mk> diff --git a/distrib/sgi/iso/Makefile b/distrib/sgi/iso/Makefile index 619ccf30d24..aa0cc49d78c 100644 --- a/distrib/sgi/iso/Makefile +++ b/distrib/sgi/iso/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.33 2019/04/29 15:56:26 deraadt Exp $ +# $OpenBSD: Makefile,v 1.34 2019/04/30 17:46:05 deraadt Exp $ CDROM= install${OSrev}.iso RELXDIR?= /home/relx-${MACHINE} @@ -38,7 +38,7 @@ CDROMSZ=489 # nt (size of the iso image in megabytes) # filling the 2048 byte sector filesystem. ${CDROM}: - -rm -rf ${.OBJDIR}/cd-dir + rm -rf ${.OBJDIR}/cd-dir mkdir -p ${.OBJDIR}/cd-dir/ dd if=/dev/zero of=${.OBJDIR}/${CDROM} bs=2048b count=${CDROMSZ} @@ -105,16 +105,15 @@ ${CDROM}: vnconfig -u `cat vnd` rm -f vnd -install: - cp ${CDROM} ${RELDIR}/ - unconfig: -umount -f ${MOUNT_POINT} -[ -f vnd ] && vnconfig -u `cat vnd` && rm -f vnd +install: + cp ${CDROM} ${RELDIR}/ + clean cleandir: /bin/rm -f ${CDROM} xfs512.bin xfs rm -rf cd-dir .include <bsd.obj.mk> -.include <bsd.subdir.mk> diff --git a/distrib/sgi/ramdisk/Makefile b/distrib/sgi/ramdisk/Makefile index b66ea66882e..a08a863a8a1 100644 --- a/distrib/sgi/ramdisk/Makefile +++ b/distrib/sgi/ramdisk/Makefile @@ -1,45 +1,32 @@ -# $OpenBSD: Makefile,v 1.28 2019/04/29 15:56:26 deraadt Exp $ - -IMAGE= mr.fs -CRUNCHCONF?= instbin.conf -CRUNCHCONFS?= ${.CURDIR}/../common/crunch.conf -LISTS= ${.CURDIR}/list -UTILS?= ${.CURDIR}/../../miniroot +# $OpenBSD: Makefile,v 1.29 2019/04/30 17:46:05 deraadt Exp $ MTREE= ${UTILS}/mtree.conf -DISKTYPE= rdroot -MAKEFSARGS_RD= -o disklabel=${DISKTYPE},minfree=0,density=4096 +LISTS= ${.CURDIR}/list +UTILS= ${.CURDIR}/../../miniroot -.ifndef DESTDIR -all ${IMAGE}: - @echo setenv DESTDIR before makeing a ramdisk! - @false -.else +MRDISKTYPE= rdroot +MRMAKEFSARGS= -o disklabel=${MRDISKTYPE},minfree=0,density=4096 ALLIP= 22 26 27 28 30 32 -ALLBSD= ALLBSDRD= .for IP in ${ALLIP} -ALLBSD+= bsd.IP${IP} ALLBSDRD+= bsd.rd.IP${IP} all: ${ALLBSDRD} .endfor .for IP in ${ALLIP} +bsd.rd.IP${IP}: mr.fs bsd.IP${IP} + cp bsd.IP${IP} bsd.rd.IP${IP} + rdsetroot bsd.rd.IP${IP} mr.fs + bsd.IP${IP}: -.ifndef NOBUILD cd ${.CURDIR}/../../../sys/arch/sgi/compile/RAMDISK-IP${IP} && \ su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && exec ${MAKE}' -.endif cp -p ${.CURDIR}/../../../sys/arch/sgi/compile/RAMDISK-IP${IP}/obj/bsd bsd.IP${IP} - -bsd.rd.IP${IP}: ${IMAGE} bsd.IP${IP} - cp bsd.IP${IP} bsd.rd.IP${IP} - rdsetroot bsd.rd.IP${IP} ${IMAGE} .endfor -${IMAGE}: instbin +mr.fs: instbin rm -rf $@.d install -d -o root -g wheel $@.d mtree -def ${MTREE} -p $@.d -u @@ -47,28 +34,27 @@ ${IMAGE}: instbin TARGDIR=$@.d UTILS=${UTILS} RELEASEDIR=${RELEASEDIR} \ sh ${UTILS}/runlist.sh ${LISTS} rm $@.d/instbin - makefs ${MAKEFSARGS_RD} $@ $@.d + makefs ${MRMAKEFSARGS} $@ $@.d -.endif - -instbin.mk instbin.cache instbin.c: ${CRUNCHCONF} - crunchgen -M -E -D ${.CURDIR}/../../.. -L ${DESTDIR}/usr/lib ${.ALLSRC} +instbin.mk instbin.cache instbin.c: instbin.conf + crunchgen -M -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 -${CRUNCHCONF}: ${LISTS} +instbin.conf: ${LISTS} awk -f ${UTILS}/makeconf.awk ${LISTS} > instbin.conf -clean cleandir: - /bin/rm -f *.core ${IMAGE} instbin instbin.mk instbin.cache \ - lib*.a lib*.olist instbin.map ${ALLBSD} ${ALLBSDRD} *.o *.lo *.c - /bin/rm -rf ${IMAGE}.d - .ifdef RELEASEDIR install: cp ${ALLBSDRD} ${RELEASEDIR} .endif + +clean cleandir: + /bin/rm -f *.core mr.fs instbin instbin.mk instbin.cache \ + lib*.a lib*.olist instbin.map ${ALLBSD} ${ALLBSDRD} *.o *.lo *.c + /bin/rm -rf mr.fs.d + .include <bsd.obj.mk> -.include <bsd.subdir.mk> diff --git a/distrib/sgi/ramdisk/Makefile.inc b/distrib/sgi/ramdisk/Makefile.inc deleted file mode 100644 index 55385fb2dc2..00000000000 --- a/distrib/sgi/ramdisk/Makefile.inc +++ /dev/null @@ -1,3 +0,0 @@ -# $OpenBSD: Makefile.inc,v 1.2 2014/07/16 19:59:30 okan Exp $ - -CRUNCHGENOPTS= -E diff --git a/distrib/socppc/Makefile b/distrib/socppc/Makefile index 3ddafe542c5..ba1e6b62b19 100644 --- a/distrib/socppc/Makefile +++ b/distrib/socppc/Makefile @@ -1,5 +1,8 @@ -# $OpenBSD: Makefile,v 1.2 2010/02/15 22:51:36 kettenis Exp $ +# $OpenBSD: Makefile,v 1.3 2019/04/30 17:46:05 deraadt Exp $ -SUBDIR= ramdisk miniroot +SUBDIR= ramdisk + +unconfig: + cd ramdisk; ${MAKE} unconfig .include <bsd.subdir.mk> diff --git a/distrib/socppc/miniroot/Makefile b/distrib/socppc/miniroot/Makefile deleted file mode 100644 index 639c4232947..00000000000 --- a/distrib/socppc/miniroot/Makefile +++ /dev/null @@ -1,53 +0,0 @@ - -IMAGE= miniroot${OSrev}.fs - -MOUNT_POINT= /mnt - -DISKTYPE= miniroot -NBLKS= 8064 -# minfree, opt, b/i trks, sects, cpg -NEWFSARGS= -m 0 -o space -i 4096 - -.ifndef DESTDIR -all ${IMAGE}: - @echo setenv DESTDIR before making a ramdisk! - @false -.else -all: ${IMAGE} - -${IMAGE}: rd_setup do_files rd_teardown - -.endif - -do_files: - dd if=${DESTDIR}/usr/mdec/boot.elf of=/dev/r`cat vnd`i conv=osync - gzip -c < ${.OBJDIR}/../ramdisk/bsd.rd > ${MOUNT_POINT}/bsd.rd - ln ${MOUNT_POINT}/bsd.rd ${MOUNT_POINT}/bsd - -rd_setup: - dd if=/dev/zero of=${IMAGE} bs=512 count=${NBLKS} - vnconfig -v -t ${DISKTYPE} ${IMAGE} > vnd - fdisk -i -y `cat 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` - rm -f vnd - -unconfig: - -umount -f ${MOUNT_POINT} - -[ -f vnd ] && vnconfig -u `cat vnd` && rm -f vnd - -.PRECIOUS: ${IMAGE} - -.ifdef RELEASEDIR -install: - cp ${IMAGE} ${RELEASEDIR} -.endif - -.include <bsd.obj.mk> -.include <bsd.subdir.mk> diff --git a/distrib/socppc/ramdisk/Makefile b/distrib/socppc/ramdisk/Makefile index b92e4438156..8a14762b668 100644 --- a/distrib/socppc/ramdisk/Makefile +++ b/distrib/socppc/ramdisk/Makefile @@ -1,34 +1,38 @@ -# $OpenBSD: Makefile,v 1.23 2019/04/29 15:56:26 deraadt Exp $ - -BSD_BIN= bsd.bin -IMAGE= mr.fs -CRUNCHCONF?= instbin.conf -CRUNCHCONFS?= ${.CURDIR}/../common/crunch.conf -LISTS= ${.CURDIR}/list -UTILS?= ${.CURDIR}/../../miniroot +# $OpenBSD: Makefile,v 1.24 2019/04/30 17:46:05 deraadt Exp $ +FS= miniroot${OSrev}.fs +FSSIZE= 8064 +FSDISKTYPE= miniroot +MOUNT_POINT= /mnt MTREE= ${UTILS}/mtree.conf -DISKTYPE= rdroot -MAKEFSARGS_RD= -o disklabel=${DISKTYPE},minfree=0,density=4096 - -.ifndef DESTDIR -all ${IMAGE}: - @echo setenv DESTDIR before making a ramdisk! - @false -.else - -# mix config is not needed. -all: bsd.rd ${BSD_BIN} +# minfree, opt, b/i trks, sects, cpg +NEWFSARGS= -m 0 -o space -i 4096 -bsd.rd: ${IMAGE} bsd - cp bsd bsd.rd - rdsetroot bsd.rd ${IMAGE} - -${BSD_BIN}: bsd.rd - objcopy -O binary bsd.rd ${BSD_BIN} - -${IMAGE}: instbin +LISTS= ${.CURDIR}/list +UTILS= ${.CURDIR}/../../miniroot + +MRDISKTYPE= rdroot +MRMAKEFSARGS= -o disklabel=${MRDISKTYPE},minfree=0,density=4096 + +all: ${FS} bsd.bin + +${FS}: mr.fs + dd if=/dev/zero of=${FS} bs=512 count=${FSSIZE} + vnconfig -v -t ${FSDISKTYPE} ${FS} > vnd + fdisk -i -y `cat vnd` + disklabel -w `cat vnd` ${FSDISKTYPE} + newfs ${NEWFSARGS} /dev/r`cat vnd`a + mount /dev/`cat vnd`a ${MOUNT_POINT} + dd if=${DESTDIR}/usr/mdec/boot.elf of=/dev/r`cat vnd`i conv=osync + gzip -c < bsd.rd > ${MOUNT_POINT}/bsd.rd + ln ${MOUNT_POINT}/bsd.rd ${MOUNT_POINT}/bsd + df -i ${MOUNT_POINT} + umount ${MOUNT_POINT} + vnconfig -u `cat vnd` + rm -f vnd + +mr.fs: instbin rm -rf $@.d install -d -o root -g wheel $@.d mtree -def ${MTREE} -p $@.d -u @@ -36,33 +40,45 @@ ${IMAGE}: instbin TARGDIR=$@.d UTILS=${UTILS} RELEASEDIR=${RELEASEDIR} \ sh ${UTILS}/runlist.sh ${LISTS} rm $@.d/instbin - makefs ${MAKEFSARGS_RD} $@ $@.d + makefs ${MRMAKEFSARGS} $@ $@.d -.endif +bsd.bin: bsd.rd + objcopy -O binary bsd.rd bsd.bin + +bsd.rd: mr.fs bsd + cp bsd bsd.rd + rdsetroot bsd.rd mr.fs bsd: cd ${.CURDIR}/../../../sys/arch/socppc/compile/RAMDISK && \ - su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && ${MAKE}' + su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && exec ${MAKE}' cp -p ${.CURDIR}/../../../sys/arch/socppc/compile/RAMDISK/obj/bsd bsd -instbin.mk instbin.cache instbin.c: ${CRUNCHCONF} - crunchgen -E -D ${.CURDIR}/../../.. -L ${DESTDIR}/usr/lib ${.ALLSRC} +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 -${CRUNCHCONF}: ${LISTS} +instbin.conf: ${LISTS} awk -f ${UTILS}/makeconf.awk ${LISTS} > instbin.conf -clean cleandir: - /bin/rm -f *.core ${IMAGE} instbin instbin.mk instbin.cache \ - lib*.a lib*.olist instbin.map *.o *.lo *.c bsd bsd.rd cd${OSrev}.iso - rm -rf cd-dir ${IMAGE}.d +unconfig: + -umount -f ${MOUNT_POINT} + -[ -f vnd ] && vnconfig -u `cat vnd` && rm -f vnd .ifdef RELEASEDIR install: - cp bsd.rd ${BSD_BIN} ${RELEASEDIR} + cp bsd.rd ${RELEASEDIR}/bsd.rd + chmod a+r ${RELEASEDIR}/bsd.rd + cp bsd.bin ${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 cd${OSrev}.iso + rm -rf cd-dir mr.fs.d + .include <bsd.obj.mk> -.include <bsd.subdir.mk> diff --git a/distrib/socppc/ramdisk/Makefile.inc b/distrib/socppc/ramdisk/Makefile.inc deleted file mode 100644 index 55385fb2dc2..00000000000 --- a/distrib/socppc/ramdisk/Makefile.inc +++ /dev/null @@ -1,3 +0,0 @@ -# $OpenBSD: Makefile.inc,v 1.2 2014/07/16 19:59:30 okan Exp $ - -CRUNCHGENOPTS= -E 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> |