2001-11-09 23:52:18 +03:00
|
|
|
# $NetBSD: Makefile,v 1.8 2001/11/09 20:52:19 tsutsui Exp $
|
1999-12-09 17:53:00 +03:00
|
|
|
|
|
|
|
TOP= ${.CURDIR}/..
|
|
|
|
|
|
|
|
.include "${TOP}/Makefile.inc"
|
2000-06-17 22:37:43 +04:00
|
|
|
.include <bsd.subdir.mk>
|
1999-12-09 17:53:00 +03:00
|
|
|
|
|
|
|
IMAGE= boot.fs
|
2001-01-07 11:38:01 +03:00
|
|
|
KERNDIR!= cd ${.CURDIR}/../ramdisk-kernel && ${PRINTOBJDIR}
|
2000-06-11 15:35:18 +04:00
|
|
|
KERN= ${KERNDIR}/netbsd.INSTALL.gz
|
1999-12-09 17:53:00 +03:00
|
|
|
|
|
|
|
MOUNT_POINT?= /mnt
|
|
|
|
VND?= vnd0
|
|
|
|
VND_DEV= /dev/${VND}a
|
|
|
|
VND_RDEV= /dev/r${VND}a
|
|
|
|
VND_CDEV= /dev/${VND}c
|
|
|
|
VND_CRDEV= /dev/r${VND}c
|
|
|
|
FD?= fd0
|
|
|
|
FD_RDEV= /dev/r${FD}a
|
|
|
|
IMAGE?= xxx.fs
|
|
|
|
KERN?= netbsd-xxx
|
|
|
|
MDEC= ${DESTDIR}/usr/mdec
|
|
|
|
|
|
|
|
DISKTYPE= floppy
|
|
|
|
|
|
|
|
# Some reasonable values for the -i parameter to newfs are:
|
|
|
|
#
|
|
|
|
# 8192 1387k, 189 inodes free
|
|
|
|
# 16384 1399k, 93 inodes free
|
|
|
|
# 65536 1407k, 29 inodes free
|
|
|
|
INO_BYTES?= 65536
|
|
|
|
|
2000-06-11 15:35:18 +04:00
|
|
|
all: ${KERN}
|
1999-12-09 17:53:00 +03:00
|
|
|
dd if=/dev/zero of=${IMAGE} bs=1440k count=1
|
2001-11-09 23:52:18 +03:00
|
|
|
vnconfig -t ${DISKTYPE} -v -c ${VND} ${IMAGE}
|
|
|
|
disklabel -rw ${VND} ${DISKTYPE}
|
1999-12-09 17:53:00 +03:00
|
|
|
newfs -B be -m 0 -o space -i ${INO_BYTES} -c 80 \
|
|
|
|
-f 1024 -b 8192 ${VND_RDEV}
|
|
|
|
mount ${VND_DEV} ${MOUNT_POINT}
|
2000-06-11 15:35:18 +04:00
|
|
|
cp ${KERN} ${MOUNT_POINT}/netbsd
|
1999-12-09 17:53:00 +03:00
|
|
|
@echo ""
|
|
|
|
@df -i ${MOUNT_POINT}
|
|
|
|
@echo ""
|
|
|
|
@echo "installing new bootblocks"
|
|
|
|
-rm -f ${MOUNT_POINT}/boot
|
|
|
|
cp ${MDEC}/boot ${MOUNT_POINT}/boot
|
|
|
|
sync
|
|
|
|
${MDEC}/installboot -v ${MOUNT_POINT}/boot ${MDEC}/bootxx ${VND_CRDEV}
|
|
|
|
umount ${MOUNT_POINT}
|
2001-11-09 23:52:18 +03:00
|
|
|
vnconfig -u ${VND}
|
1999-12-09 17:53:00 +03:00
|
|
|
|
|
|
|
unconfig:
|
|
|
|
-umount -f ${MOUNT_POINT}
|
2001-11-09 23:52:18 +03:00
|
|
|
-vnconfig -u ${VND}
|
1999-12-09 17:53:00 +03:00
|
|
|
|
2000-06-11 15:35:18 +04:00
|
|
|
.ifndef RELEASEDIR
|
|
|
|
release:
|
|
|
|
@echo set RELEASEDIR first!
|
|
|
|
@false
|
|
|
|
.else
|
|
|
|
release:
|
2000-06-14 14:24:24 +04:00
|
|
|
-mkdir -p ${RELEASEDIR}/installation/floppy
|
|
|
|
cp -p ${IMAGE} ${RELEASEDIR}/installation/floppy
|
|
|
|
gzip -c -9 ${IMAGE} > ${RELEASEDIR}/installation/floppy/${IMAGE}.gz
|
2000-06-11 15:35:18 +04:00
|
|
|
.endif
|
1999-12-09 17:53:00 +03:00
|
|
|
|
|
|
|
clean cleandir distclean:
|
|
|
|
rm -f *.core ${IMAGE} ${CLEANFILES}
|
|
|
|
|
|
|
|
real-floppy:
|
|
|
|
dd if=${IMAGE} of=${FD_RDEV} bs=45k
|
|
|
|
|
|
|
|
.include <bsd.obj.mk>
|