1 # $NetBSD: Makefile,v 1.11 2001/11/08 02:10:26 christos Exp $ 2 3 TOP= ${.CURDIR}/.. 4 5 .include "${TOP}/Makefile.inc" 6 7 COMMONDIR= ${TOP}/bootfloppy-common 8 IMAGE= boot-big.fs 9 KERN!= cd $(.CURDIR)/../kernel-ramdisk/; \ 10 printf "xxx: .MAKE\n\t@echo \$${.OBJDIR}/netbsd.INSTALL.gz\n" | \ 11 ${MAKE} -s -f- 12 13 # This Makefile builds a boot image on a 2.88M-sized image. 14 # 15 # Since NetBSD currently can't write 2.88M diskettes, it's only 16 # use is as a boot image for El Torito bootable CD-ROM images. 17 # 18 # To prepare a CD, do the following steps: 19 # 1) create a release(7) tree called NetBSD-1.3I 20 # 2) create NetBSD-1.3I/boot.i386/ and place boot.fs in that directory 21 # 3) do ``mkisofs -A "NetBSD ${version}" -b boot.i386/boot.fs -f \ 22 # -o i386-cd.img -r -T NetBSD-1.3I'' 23 # (you may omit '-f' if you're not using symlinks in the release tree) 24 # This should place the image in i386-cd.img, which can hopefully 25 # be used to burn a CD. 26 27 DISKTYPE= floppy288 28 DISKSIZE= 5760 29 METAFILE!= printf "USTAR.volsize.%o" ${DISKSIZE} 30 BLOCK8K= 359 31 PAD=yes 32 33 MOUNT_POINT?= /mnt 34 VND?= vnd0 35 VND_DEV= /dev/${VND}a 36 VND_RDEV= /dev/r${VND}a 37 MDEC= ${DESTDIR}/usr/mdec 38 BOOTCODE= ${MDEC}/biosboot.sym 39 STRIP?= strip 40 41 LISTS?= ${COMMONDIR}/list 42 43 # Some reasonable values for the -i parameter to newfs are: 44 # 45 # 6144 1147k, 189 inodes free 46 # 16384 1159k, 93 inodes free 47 # on 1.44M: 48 # 204800 1407k, 27 inodes free 49 # (with a 4k blocksize, one cannot get fewer than ~32 inodes allocated) 50 51 INO_BYTES?= 204800 52 53 CLEANFILES+= netbsd 54 55 realall: netbsd 56 -rm -f ${IMAGE}.tmp 57 dd if=/dev/zero of=${IMAGE}.tmp count=${DISKSIZE} 58 vnconfig -t ${DISKTYPE} -v -c ${VND} ${IMAGE}.tmp 59 disklabel -rw ${VND} ${DISKTYPE} 60 newfs -B le -m 0 -o space -i ${INO_BYTES} -c 80 ${VND_RDEV} 61 ${MDEC}/installboot -v -f ${BOOTCODE} ${VND_RDEV} 62 mount ${VND_DEV} ${MOUNT_POINT} 63 TOPDIR=${TOP} CURDIR=${.CURDIR} OBJDIR=${.OBJDIR} \ 64 TARGDIR=${MOUNT_POINT} sh ${TOP}/runlist.sh ${LISTS} 65 @echo "" 66 @df -i ${MOUNT_POINT} 67 umount ${MOUNT_POINT} 68 vnconfig -u ${VND} 69 mv -f ${IMAGE}.tmp ${IMAGE} 70 71 unconfig: 72 -umount -f ${MOUNT_POINT} 73 -vnconfig -u ${VND} 74 -/bin/rm -f ${IMAGE} ${IMAGE}.tmp 75 76 netbsd: ${KERN} 77 rm -f netbsd 78 cp ${KERN} netbsd 79 80 release: 81 -mkdir -p ${RELEASEDIR}/installation/floppy 82 cp -p ${IMAGE} ${RELEASEDIR}/installation/floppy 83 gzip <${IMAGE} >${RELEASEDIR}/installation/floppy/${IMAGE}.gz 84 85 clean cleandir distclean: 86 /bin/rm -f *.core ${CLEANFILES} ${IMAGE} ${IMAGE}.tmp 87 88 .include <bsd.own.mk> 89 .include <bsd.obj.mk> 90 .include <bsd.subdir.mk> 91