Makefile.inc revision 1.12
1# $NetBSD: Makefile.inc,v 1.12 2009/09/18 09:24:59 abs Exp $ 2 3# TOP is assumed to be defined by Makefile including this one. 4 5COMMONDIR= ${TOP}/bootfloppy-common 6 7.include <bsd.kernobj.mk> 8.include <bsd.own.mk> 9 10MOUNT_POINT?= /mnt 11VND?= vnd0 12VND_DEV= /dev/${VND}a 13VND_RDEV= /dev/r${VND}a 14VND_CDEV= /dev/${VND}d 15VND_CRDEV= /dev/r${VND}d 16IMAGE?= xxx.fs 17KERN?= netbsd-xxx 18MDEC= ${DESTDIR}/usr/mdec 19 20LISTS= ${COMMONDIR}/list 21 22RAMDISKDIR!= cd $(.CURDIR)/../ramdisk && ${PRINTOBJDIR} 23RAMDISK= ${RAMDISKDIR}/ramdisk.fs 24 25DISKTYPE?= floppy3 26DISKSIZE?= 2880 27 28# Some reasonable values for the -i parameter to newfs are: 29# 30# 6144 1147k, 189 inodes free 31# 16384 1159k, 93 inodes free 32# 204800 1167k, 29 inodes free 33INO_BYTES?= 204800 34 35CLEANFILES+= netbsd.ram.gz 36 37all: netbsd.ram.gz 38 dd if=/dev/zero of=${IMAGE} count=${DISKSIZE} 39 vnconfig -t ${DISKTYPE} -v -c ${VND_CDEV} ${IMAGE} 40 disklabel -rw ${VND_CDEV} ${DISKTYPE} 41 newfs -B be -m 0 -o space -i ${INO_BYTES} -c 80 ${VND_RDEV} ${DISKTYPE} 42 mount ${VND_DEV} ${MOUNT_POINT} 43 TOPDIR=${TOP} CURDIR=${.CURDIR} OBJDIR=${.OBJDIR} \ 44 KERNOBJDIR=${KERNOBJDIR} TARGDIR=${MOUNT_POINT} ${HOST_SH} \ 45 ${NETBSDSRCDIR}/distrib/common/runlist.sh ${LISTS} 46 @echo "" 47 @df -i ${MOUNT_POINT} 48 @echo "" 49 umount ${MOUNT_POINT} 50 vnconfig -u ${VND_CDEV} 51 52unconfig: 53 -umount -f ${MOUNT_POINT} 54 -vnconfig -u ${VND_DEV} 55 -/bin/rm -f ${IMAGE} 56 57netbsd.ram.gz: ${KERN} ${RAMDISK} 58 cp ${KERN} netbsd.tmp 59 ${TOOL_MDSETIMAGE} -v netbsd.tmp ${RAMDISK} 60 gzip -9nf netbsd.tmp 61 mv netbsd.tmp.gz ${.TARGET} 62 63clean cleandir: 64 /bin/rm -f *.core ${IMAGE} ${CLEANFILES} 65 66.include <bsd.obj.mk> 67.include <bsd.subdir.mk> 68