Makefile revision 1.10
1# $NetBSD: Makefile,v 1.10 2000/10/17 21:08:43 fvdl Exp $ 2 3TOP= ${.CURDIR}/.. 4 5.include "${TOP}/Makefile.inc" 6 7COMMONDIR= ${TOP}/bootfloppy-common 8IMAGE= boot-big.fs 9KERN!= 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 27DISKTYPE= floppy288 28DISKSIZE= 5760 29METAFILE!= printf "USTAR.volsize.%o" ${DISKSIZE} 30BLOCK8K= 359 31PAD=yes 32 33MOUNT_POINT?= /mnt 34VND?= vnd0 35VND_DEV= /dev/${VND}a 36VND_RDEV= /dev/r${VND}a 37VND_CDEV= /dev/${VND}d 38VND_CRDEV= /dev/r${VND}d 39MDEC= ${DESTDIR}/usr/mdec 40BOOTCODE= ${MDEC}/biosboot.sym 41STRIP?= strip 42 43LISTS?= ${COMMONDIR}/list 44 45# Some reasonable values for the -i parameter to newfs are: 46# 47# 6144 1147k, 189 inodes free 48# 16384 1159k, 93 inodes free 49# on 1.44M: 50# 204800 1407k, 27 inodes free 51# (with a 4k blocksize, one cannot get fewer than ~32 inodes allocated) 52 53INO_BYTES?= 204800 54 55CLEANFILES+= netbsd 56 57realall: netbsd 58 -rm -f ${IMAGE}.tmp 59 dd if=/dev/zero of=${IMAGE}.tmp count=${DISKSIZE} 60 vnconfig -t ${DISKTYPE} -v -c ${VND_CDEV} ${IMAGE}.tmp 61 disklabel -rw ${VND_CDEV} ${DISKTYPE} 62 newfs -B le -m 0 -o space -i ${INO_BYTES} -c 80 ${VND_RDEV} ${DISKTYPE} 63 ${MDEC}/installboot -v -f ${BOOTCODE} ${VND_RDEV} 64 mount ${VND_DEV} ${MOUNT_POINT} 65 TOPDIR=${TOP} CURDIR=${.CURDIR} OBJDIR=${.OBJDIR} \ 66 TARGDIR=${MOUNT_POINT} sh ${TOP}/runlist.sh ${LISTS} 67 @echo "" 68 @df -i ${MOUNT_POINT} 69 umount ${MOUNT_POINT} 70 vnconfig -u ${VND_CDEV} 71 mv -f ${IMAGE}.tmp ${IMAGE} 72 73unconfig: 74 -umount -f ${MOUNT_POINT} 75 -vnconfig -u ${VND_DEV} 76 -/bin/rm -f ${IMAGE} ${IMAGE}.tmp 77 78netbsd: ${KERN} 79 rm -f netbsd 80 cp ${KERN} netbsd 81 82release: 83 -mkdir -p ${RELEASEDIR}/installation/floppy 84 cp -p ${IMAGE} ${RELEASEDIR}/installation/floppy 85 gzip <${IMAGE} >${RELEASEDIR}/installation/floppy/${IMAGE}.gz 86 87clean cleandir distclean: 88 /bin/rm -f *.core ${CLEANFILES} ${IMAGE} ${IMAGE}.tmp 89 90.include <bsd.own.mk> 91.include <bsd.obj.mk> 92.include <bsd.subdir.mk> 93