Makefile revision 1.25
1# $NetBSD: Makefile,v 1.25 2000/10/20 11:56:57 pk Exp $ 2# 3# boot.fs is the image for disk 1 of the two-set floppy based installation 4# method. 5# 6# It is constructed by injecting the microroot filesystem `ramdisk.fs' 7# into the md based kernel built from the INSTALL kernel configuration file. 8# 9 10TOP= ${.CURDIR}/.. 11MINIROOT= ${.CURDIR}/../../miniroot 12 13.include "${TOP}/Makefile.inc" 14 15.include <bsd.own.mk> # So we use /etc/mk.conf. 16.include <bsd.kernobj.mk> 17 18KERN?= ${KERNOBJDIR}/INSTALL/netbsd 19 20MOUNT_POINT?= /mnt 21VND?= vnd0 22VND_DEV= /dev/${VND}a 23VND_RDEV= /dev/r${VND}a 24VND_CDEV= /dev/${VND}c 25VND_CRDEV= /dev/r${VND}c 26FD?= fd0 27FD_RDEV= /dev/r${FD}a 28IMAGE?= boot.fs 29MDEC= ${DESTDIR}/usr/mdec 30 31LISTS= ${.CURDIR}/list 32RAMDISK!= cd ${TOP}/ramdisk/; \ 33 printf "xxx: .MAKE\n\t@echo \$${.OBJDIR}/ramdisk.fs\n" |\ 34 ${MAKE} -s -f- 35 36# Some reasonable values for the -i parameter to newfs are: 37# 38# 6144 1147k, 189 inodes free 39# 16384 1159k, 93 inodes free 40# 204800 1167k, 29 inodes free 41INO_BYTES= 204800 42 43BLOCKSIZE=512 44FSSIZE!= expr ${BLOCKSIZE} \* 18 \* 2 \* 80 45 46GEOM=${BLOCKSIZE}/18/2/80 47 48CLEANFILES+= netbsd.ram.gz netbsd.tmp disktab.tmp 49 50.MAIN: all 51 52all: netbsd.ram.gz 53 dd if=/dev/zero of=${IMAGE} bs=${FSSIZE} count=1 54 vnconfig -v -c ${VND_CDEV} ${IMAGE} ${GEOM} 55 #newfs -B be -m 0 -o space -i ${INO_BYTES} -c 80 ${VND_RDEV} 56 newfs -B be -m 0 -o space -i ${INO_BYTES} -c 80 ${VND_RDEV} 57 mount ${VND_DEV} ${MOUNT_POINT} 58 TOPDIR=${TOP} CURDIR=${MINIROOT} OBJDIR=${.OBJDIR} \ 59 KERNOBJDIR=${KERNOBJDIR} \ 60 TARGDIR=${MOUNT_POINT} sh ${MINIROOT}/runlist.sh ${LISTS} 61 @echo "" 62 @df -i ${MOUNT_POINT} 63 @echo "" 64 @echo "installing new bootblocks" 65 -rm -f ${MOUNT_POINT}/boot 66 ${MDEC}/binstall -m ${MDEC} -v ffs ${MOUNT_POINT} 67 umount ${MOUNT_POINT} 68 vnconfig -u ${VND_CDEV} 69 70unconfig: 71 -umount -f ${MOUNT_POINT} 72 -vnconfig -u ${VND_DEV} 73 74netbsd.ram.gz: ${KERN} ${RAMDISK} 75 cp ${KERN} netbsd.tmp 76 mdsetimage -v netbsd.tmp ${RAMDISK} 77 strip netbsd.tmp 78 gzip -9 netbsd.tmp 79 mv netbsd.tmp.gz ${.TARGET} 80 81clean cleandir distclean: 82 /bin/rm -f *.core ${IMAGE} ${CLEANFILES} 83 84depend install: 85 86real-floppy: 87 dd if=${IMAGE} of=${FD_RDEV} bs=32k 88 89.ifndef RELEASEDIR 90release: 91 @echo setenv RELEASEDIR first 92 @false 93.else 94release: $(IMAGE) 95 gzip -c -9 < $(.OBJDIR)/boot.fs \ 96 > $(RELEASEDIR)/installation/bootfs/boot.fs.gz 97.endif # RELEASEDIR check 98 99.include <bsd.obj.mk> 100