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