Home | History | Annotate | Line # | Download | only in bootfloppy
Makefile revision 1.1
      1  1.1  tsubai #	$NetBSD: Makefile,v 1.1 1998/07/24 15:55:28 tsubai 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.1  tsubai 
      7  1.1  tsubai IMAGE=		boot.fs
      8  1.1  tsubai KERN=		${.CURDIR}/../../../../sys/arch/macppc/compile/INSTALL/netbsd
      9  1.1  tsubai 
     10  1.1  tsubai MOUNT_POINT?=	/mnt
     11  1.1  tsubai VND?=		vnd0
     12  1.1  tsubai VND_DEV=	/dev/${VND}a
     13  1.1  tsubai VND_RDEV=	/dev/r${VND}a
     14  1.1  tsubai VND_CDEV=	/dev/${VND}c
     15  1.1  tsubai VND_CRDEV=	/dev/r${VND}c
     16  1.1  tsubai FD?=		fd0
     17  1.1  tsubai FD_RDEV=	/dev/r${FD}a
     18  1.1  tsubai IMAGE?=		xxx.fs
     19  1.1  tsubai KERN?=		netbsd-xxx
     20  1.1  tsubai MDEC=		${DESTDIR}/usr/mdec
     21  1.1  tsubai 
     22  1.1  tsubai LISTS=		${.CURDIR}/list
     23  1.1  tsubai RAMDISK!=	cd $(.CURDIR)/../ramdisk/; \
     24  1.1  tsubai 		    printf "xxx: .MAKE\n\t@echo \$${.OBJDIR}/ramdisk.fs\n" | \
     25  1.1  tsubai 		    ${MAKE} -s -f-
     26  1.1  tsubai 
     27  1.1  tsubai DISKTYPE=	floppy
     28  1.1  tsubai 
     29  1.1  tsubai # Some reasonable values for the -i parameter to newfs are:
     30  1.1  tsubai #
     31  1.1  tsubai #  8192		1387k, 189 inodes free
     32  1.1  tsubai # 16384		1399k,  93 inodes free
     33  1.1  tsubai # 65536		1407k,  29 inodes free
     34  1.1  tsubai INO_BYTES?=	65536
     35  1.1  tsubai 
     36  1.1  tsubai CLEANFILES+=	netbsd.ram.gz netbsd.tmp
     37  1.1  tsubai 
     38  1.1  tsubai all:	netbsd.ram.gz
     39  1.1  tsubai 	dd if=/dev/zero of=${IMAGE} bs=1440k count=1
     40  1.1  tsubai 	# vnconfig -v -c ${VND_CDEV} ${IMAGE}
     41  1.1  tsubai 	vnconfig -t ${DISKTYPE} -v -c ${VND_CDEV} ${IMAGE}
     42  1.1  tsubai 	disklabel -rw ${VND_CDEV} ${DISKTYPE}
     43  1.1  tsubai 	newfs -m 0 -o space -i ${INO_BYTES} -c 80 -f 1024 -b 8192 ${VND_RDEV}
     44  1.1  tsubai 	mount ${VND_DEV} ${MOUNT_POINT}
     45  1.1  tsubai 	TOPDIR=${TOP} CURDIR=${.CURDIR} OBJDIR=${.OBJDIR} \
     46  1.1  tsubai 	    TARGDIR=${MOUNT_POINT} sh ${TOP}/runlist.sh ${LISTS}
     47  1.1  tsubai 	@echo ""
     48  1.1  tsubai 	@df -i ${MOUNT_POINT}
     49  1.1  tsubai 	@echo ""
     50  1.1  tsubai 	@echo "installing new bootblocks"
     51  1.1  tsubai 	-rm -f ${MOUNT_POINT}/boot
     52  1.1  tsubai 	cp ${MDEC}/ofwboot ${MOUNT_POINT}/boot
     53  1.1  tsubai 	sync
     54  1.1  tsubai 	${MDEC}/installboot -v ${MOUNT_POINT}/boot ${MDEC}/bootxx ${VND_RDEV}
     55  1.1  tsubai 	umount ${MOUNT_POINT}
     56  1.1  tsubai 	vnconfig -u ${VND_CDEV}
     57  1.1  tsubai 
     58  1.1  tsubai unconfig:
     59  1.1  tsubai 	-umount -f ${MOUNT_POINT}
     60  1.1  tsubai 	-vnconfig -u ${VND_DEV}
     61  1.1  tsubai 
     62  1.1  tsubai netbsd.ram.gz: ${KERN} ${RAMDISK}
     63  1.1  tsubai 	cp ${KERN} netbsd.tmp
     64  1.1  tsubai 	mdsetimage -v netbsd.tmp ${RAMDISK}
     65  1.1  tsubai 	gzip netbsd.tmp
     66  1.1  tsubai 	mv netbsd.tmp.gz ${.TARGET}
     67  1.1  tsubai 
     68  1.1  tsubai clean cleandir:
     69  1.1  tsubai 	/bin/rm -f *.core ${IMAGE} ${CLEANFILES}
     70  1.1  tsubai 
     71  1.1  tsubai real-floppy:
     72  1.1  tsubai 	dd if=${IMAGE} of=${FD_RDEV} bs=45k
     73  1.1  tsubai 
     74  1.1  tsubai .include <bsd.obj.mk>
     75