1 # $NetBSD: Makefile.inc,v 1.11 2009/04/03 22:36:34 perry Exp $
3 # TOP is assumed to be defined by Makefile including this one.
5 COMMONDIR= ${TOP}/bootfloppy-common
7 .include <bsd.kernobj.mk>
13 VND_RDEV= /dev/r${VND}a
14 VND_CDEV= /dev/${VND}d
15 VND_CRDEV= /dev/r${VND}d
18 MDEC= ${DESTDIR}/usr/mdec
20 LISTS= ${COMMONDIR}/list
22 RAMDISKDIR!= cd $(.CURDIR)/../ramdisk && ${PRINTOBJDIR}
23 RAMDISK= ${RAMDISKDIR}/ramdisk.fs
28 # Some reasonable values for the -i parameter to newfs are:
30 # 6144 1147k, 189 inodes free
31 # 16384 1159k, 93 inodes free
32 # 204800 1167k, 29 inodes free
35 CLEANFILES+= 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}
50 vnconfig -u ${VND_CDEV}
53 -umount -f ${MOUNT_POINT}
54 -vnconfig -u ${VND_DEV}
57 netbsd.ram.gz: ${KERN} ${RAMDISK}
59 ${TOOL_MDSETIMAGE} -v netbsd.tmp ${RAMDISK}
61 mv netbsd.tmp.gz ${.TARGET}
64 /bin/rm -f *.core ${IMAGE} ${CLEANFILES}
67 .include <bsd.subdir.mk>