1 # $NetBSD: Makefile,v 1.5 1997/12/12 04:15:41 gwr Exp $ 2 3 TOP= ${.CURDIR}/.. 4 5 # This include just sets REV=XX 6 .include "${TOP}/Makefile.inc" 7 8 IMAGE= miniroot 9 CBIN= mini_usr 10 11 TREE= ${TOP}/common/${IMAGE}.tree 12 13 LISTS= ${TOP}/common/mini_sbin.list \ 14 ${TOP}/common/mini_bin.list \ 15 ${TOP}/common/${CBIN}.list \ 16 ${TOP}/common/mini_xx.list \ 17 ${TOP}/common/${IMAGE}.list 18 19 KERNEL=${SRCSYSDIR}/arch/sun3/compile/GENERIC/netbsd 20 21 MOUNT_POINT= /mnt 22 BDEV= /dev/sd1b 23 CDEV= /dev/rsd1b 24 25 # These are all the parameters for the miniroot: (8MB) 26 DISKTYPE= miniroot 27 NBLKS= 16384 28 # old format, minfree, opt, b/i trks, sects, cpg 29 NEWFSARGS= -O -m 0 -o space -i 8192 -t 8 -u 32 -c 16 30 31 CLEANFILES= ${IMAGE}.gz install.sub 32 33 ${IMAGE}.gz: ${TREE} ${LISTS} ${CBIN} mini_xx install.sub 34 -newfs ${NEWFSARGS} -s ${NBLKS} ${CDEV} ${DISKTYPE} 35 mount ${BDEV} ${MOUNT_POINT} 36 mtree -def ${TREE} -p ${MOUNT_POINT}/ -u 37 TOPDIR=${TOP} CURDIR=${.CURDIR} \ 38 OBJDIR=${.OBJDIR} TARGDIR=${MOUNT_POINT} \ 39 sh ${TOP}/common/RunList.sh ${LISTS} 40 sync ; sleep 1 ; sync 41 cd ${MOUNT_POINT} ;\ 42 usr/mdec/installboot -v ufsboot usr/mdec/bootxx ${CDEV} 43 cp ${KERNEL} ${MOUNT_POINT}/netbsd 44 sync 45 @echo "" 46 @df -i ${MOUNT_POINT} 47 @echo "" 48 -umount ${MOUNT_POINT} 49 dd if=${CDEV} bs=16b count=`expr ${NBLKS} / 16` |\ 50 gzip > ${IMAGE}.tmp 51 -mv -f ${IMAGE}.tmp ${IMAGE}.gz 52 53 # Do not delete this if I change my mind and kill make... 54 .PRECIOUS: ${IMAGE}.gz 55 56 # Rules for making ${CBIN} ... 57 .include "${TOP}/common/Make.crunch" 58 59 install.sub : ${TOP}/../miniroot/install.sub 60 sed -e "/^VERSION=/s/=.*/=${REV}/" < $? > $@ 61 62 clean cleandir: clean_xx 63 -rm -f a.out core *.core *.o 64 -rm -f ${CLEANFILES} 65 66 # Standard rules needed by the above... 67 .include <bsd.obj.mk> 68 69 # Hacks for re-linking some program -static 70 .include "${TOP}/common/mini_xx.mk" 71