1 1.2 sjg # $NetBSD: Makefile,v 1.2 2000/05/02 16:06:52 sjg Exp $ 2 1.1 tsutsui 3 1.1 tsutsui TOP= ${.CURDIR}/.. 4 1.1 tsutsui 5 1.1 tsutsui .include "${TOP}/Makefile.inc" 6 1.2 sjg .include <bsd.kernobj.mk> 7 1.1 tsutsui 8 1.1 tsutsui IMAGE= boot.fs 9 1.2 sjg KERN= ${KERNOBJDIR}/INSTALL/netbsd 10 1.1 tsutsui 11 1.1 tsutsui MOUNT_POINT?= /mnt 12 1.1 tsutsui VND?= vnd0 13 1.1 tsutsui VND_DEV= /dev/${VND}a 14 1.1 tsutsui VND_RDEV= /dev/r${VND}a 15 1.1 tsutsui VND_CDEV= /dev/${VND}c 16 1.1 tsutsui VND_CRDEV= /dev/r${VND}c 17 1.1 tsutsui FD?= fd0 18 1.1 tsutsui FD_RDEV= /dev/r${FD}a 19 1.1 tsutsui IMAGE?= xxx.fs 20 1.1 tsutsui KERN?= netbsd-xxx 21 1.1 tsutsui MDEC= ${DESTDIR}/usr/mdec 22 1.1 tsutsui 23 1.1 tsutsui LISTS= ${.CURDIR}/list 24 1.1 tsutsui RAMDISK!= cd $(.CURDIR)/../ramdisk/; \ 25 1.1 tsutsui printf "xxx: .MAKE\n\t@echo \$${.OBJDIR}/ramdisk.fs\n" | \ 26 1.1 tsutsui ${MAKE} -s -f- 27 1.1 tsutsui 28 1.1 tsutsui DISKTYPE= floppy 29 1.1 tsutsui 30 1.1 tsutsui # Some reasonable values for the -i parameter to newfs are: 31 1.1 tsutsui # 32 1.1 tsutsui # 8192 1387k, 189 inodes free 33 1.1 tsutsui # 16384 1399k, 93 inodes free 34 1.1 tsutsui # 65536 1407k, 29 inodes free 35 1.1 tsutsui INO_BYTES?= 65536 36 1.1 tsutsui 37 1.1 tsutsui CLEANFILES+= netbsd.ram.gz netbsd.tmp 38 1.1 tsutsui 39 1.1 tsutsui all: netbsd.ram.gz 40 1.1 tsutsui dd if=/dev/zero of=${IMAGE} bs=1440k count=1 41 1.1 tsutsui # vnconfig -v -c ${VND_CDEV} ${IMAGE} 42 1.1 tsutsui vnconfig -t ${DISKTYPE} -v -c ${VND_CDEV} ${IMAGE} 43 1.1 tsutsui disklabel -rw ${VND_CDEV} ${DISKTYPE} 44 1.1 tsutsui newfs -B be -m 0 -o space -i ${INO_BYTES} -c 80 \ 45 1.1 tsutsui -f 1024 -b 8192 ${VND_RDEV} 46 1.1 tsutsui mount ${VND_DEV} ${MOUNT_POINT} 47 1.1 tsutsui TOPDIR=${TOP} CURDIR=${.CURDIR} OBJDIR=${.OBJDIR} \ 48 1.2 sjg KERNOBJDIR=${KERNOBJDIR} \ 49 1.1 tsutsui TARGDIR=${MOUNT_POINT} sh ${TOP}/runlist.sh ${LISTS} 50 1.1 tsutsui @echo "" 51 1.1 tsutsui @df -i ${MOUNT_POINT} 52 1.1 tsutsui @echo "" 53 1.1 tsutsui @echo "installing new bootblocks" 54 1.1 tsutsui -rm -f ${MOUNT_POINT}/boot 55 1.1 tsutsui cp ${MDEC}/boot ${MOUNT_POINT}/boot 56 1.1 tsutsui sync 57 1.1 tsutsui ${MDEC}/installboot -v ${MOUNT_POINT}/boot ${MDEC}/bootxx ${VND_CRDEV} 58 1.1 tsutsui umount ${MOUNT_POINT} 59 1.1 tsutsui vnconfig -u ${VND_CDEV} 60 1.1 tsutsui 61 1.1 tsutsui unconfig: 62 1.1 tsutsui -umount -f ${MOUNT_POINT} 63 1.1 tsutsui -vnconfig -u ${VND_DEV} 64 1.1 tsutsui 65 1.1 tsutsui netbsd.ram.gz: ${KERN} ${RAMDISK} 66 1.1 tsutsui cp ${KERN} netbsd.tmp 67 1.1 tsutsui mdsetimage -v netbsd.tmp ${RAMDISK} 68 1.1 tsutsui gzip -9 netbsd.tmp 69 1.1 tsutsui mv netbsd.tmp.gz ${.TARGET} 70 1.1 tsutsui 71 1.1 tsutsui clean cleandir distclean: 72 1.1 tsutsui rm -f *.core ${IMAGE} ${CLEANFILES} 73 1.1 tsutsui 74 1.1 tsutsui real-floppy: 75 1.1 tsutsui dd if=${IMAGE} of=${FD_RDEV} bs=45k 76 1.1 tsutsui 77 1.1 tsutsui .include <bsd.own.mk> 78 1.1 tsutsui .include <bsd.obj.mk> 79 1.1 tsutsui .include <bsd.subdir.mk> 80