Home | History | Annotate | Line # | Download | only in bootfloppy-big
Makefile revision 1.7.4.3
      1 #	$NetBSD: Makefile,v 1.7.4.3 2000/10/18 03:34:43 tv 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 VND_CDEV=	/dev/${VND}d
     38 VND_CRDEV=	/dev/r${VND}d
     39 MDEC=		${DESTDIR}/usr/mdec
     40 BOOTCODE=	${MDEC}/biosboot.sym
     41 STRIP?=		strip
     42 
     43 LISTS?=		${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 
     53 INO_BYTES?=	204800
     54 
     55 CLEANFILES+=	netbsd
     56 
     57 realall:	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 
     73 unconfig:
     74 	-umount -f ${MOUNT_POINT}
     75 	-vnconfig -u ${VND_DEV}
     76 	-/bin/rm -f ${IMAGE} ${IMAGE}.tmp
     77 
     78 netbsd: ${KERN}
     79 	rm -f netbsd
     80 	cp ${KERN} netbsd
     81 
     82 release:
     83 	-mkdir -p ${RELEASEDIR}/installation/floppy
     84 	cp -p ${IMAGE} ${RELEASEDIR}/installation/floppy
     85 	gzip <${IMAGE} >${RELEASEDIR}/installation/floppy/${IMAGE}.gz
     86 
     87 clean 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