diff options
Diffstat (limited to 'distrib/hppa/ramdisk/Makefile')
-rw-r--r-- | distrib/hppa/ramdisk/Makefile | 103 |
1 files changed, 41 insertions, 62 deletions
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> |