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