Makefile revision 1.12
1#	$NetBSD: Makefile,v 1.12 2002/05/02 18:02:44 lukem Exp $
2
3
4.include "${.CURDIR}/../../../Makefile.inc"
5.include <bsd.own.mk>
6
7IMAGE=		boot.fs
8KERNDIR!=	cd ${.CURDIR}/../ramdisk-kernel && ${PRINTOBJDIR}
9KERN=		${KERNDIR}/netbsd.INSTALL.gz
10
11MOUNT_POINT?=	/mnt
12VND?=		vnd0
13VND_DEV=	/dev/${VND}a
14VND_RDEV=	/dev/r${VND}a
15VND_CDEV=	/dev/${VND}c
16VND_CRDEV=	/dev/r${VND}c
17FD?=		fd0
18FD_RDEV=	/dev/r${FD}a
19IMAGE?=		xxx.fs
20KERN?=		netbsd-xxx
21MDEC=		${DESTDIR}/usr/mdec
22
23DISKTYPE=	floppy
24
25CLEANFILES+=	${IMAGE}
26
27# Some reasonable values for the -i parameter to newfs are:
28#
29#  8192		1387k, 189 inodes free
30# 16384		1399k,  93 inodes free
31# 65536		1407k,  29 inodes free
32INO_BYTES?=	65536
33
34all:	${KERN}
35	dd if=/dev/zero of=${IMAGE} bs=1440k count=1
36	vnconfig -t ${DISKTYPE} -v -c ${VND} ${IMAGE}
37	disklabel -rw ${VND} ${DISKTYPE}
38	newfs -B be -m 0 -o space -i ${INO_BYTES} -c 80 \
39	    -f 1024 -b 8192 ${VND_RDEV}
40	mount ${VND_DEV} ${MOUNT_POINT}
41	cp ${KERN} ${MOUNT_POINT}/netbsd
42	@echo ""
43	@df -i ${MOUNT_POINT}
44	@echo ""
45	@echo "installing new bootblocks"
46	-rm -f ${MOUNT_POINT}/boot
47	cp ${MDEC}/boot ${MOUNT_POINT}/boot
48	sync
49	${MDEC}/installboot -v ${MOUNT_POINT}/boot ${MDEC}/bootxx ${VND_CRDEV}
50	umount ${MOUNT_POINT}
51	vnconfig -u ${VND}
52
53unconfig:
54	-umount -f ${MOUNT_POINT}
55	-vnconfig -u ${VND}
56
57release: check_RELEASEDIR .WAIT ${IMAGE}
58	${RELEASE_INSTALL} ${IMAGE} ${RELEASEDIR}/installation/floppy
59	# XXX: do we want both?
60	gzip -c -9 ${IMAGE} > ${RELEASEDIR}/installation/floppy/${IMAGE}.gz
61
62real-floppy:
63	dd if=${IMAGE} of=${FD_RDEV} bs=45k
64
65.include <bsd.prog.mk>
66