1 # $NetBSD: Makefile,v 1.4.2.1 1997/12/12 22:59:46 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/${IMAGE}.list \ 14 ${TOP}/common/mini_sbin.list \ 15 ${TOP}/common/mini_bin.list \ 16 ${TOP}/common/mini_usr.list 17 18 KERNEL=${SRCSYSDIR}/arch/sun3/compile/GENERIC/netbsd 19 20 MOUNT_POINT= /mnt 21 BDEV= /dev/sd1b 22 CDEV= /dev/rsd1b 23 24 # These are all the parameters for the miniroot: (8MB) 25 DISKTYPE= miniroot 26 NBLKS= 16384 27 # old format, minfree, opt, b/i trks, sects, cpg 28 NEWFSARGS= -O -m 0 -o space -i 8192 -t 8 -u 32 -c 16 29 30 CLEANFILES= ${IMAGE}.gz install.sub 31 32 ${IMAGE}.gz: ${TREE} ${LISTS} install.sub 33 -newfs ${NEWFSARGS} -s ${NBLKS} ${CDEV} ${DISKTYPE} 34 mount ${BDEV} ${MOUNT_POINT} 35 mtree -def ${TREE} -p ${MOUNT_POINT}/ -u 36 cp ${KERNEL} ${MOUNT_POINT}/netbsd 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 sync 44 @echo "" 45 @df -i ${MOUNT_POINT} 46 @echo "" 47 -umount ${MOUNT_POINT} 48 dd if=${CDEV} bs=16b count=`expr ${NBLKS} / 16` |\ 49 gzip > ${IMAGE}.tmp 50 -mv -f ${IMAGE}.tmp ${IMAGE}.gz 51 52 # Do not delete this if I change my mind and kill make... 53 .PRECIOUS: ${IMAGE}.gz 54 55 install.sub : ${TOP}/../miniroot/install.sub 56 sed -e "/^VERSION=/s/=.*/=${REV}/" < $? > $@ 57 58 clean cleandir: 59 -rm -f a.out core *.core *.o 60 -rm -f ${CLEANFILES} 61 62 # Standard rules needed by the above... 63 .include <bsd.obj.mk> 64