2003-10-26 10:25:33 +03:00
|
|
|
# $NetBSD: Makefile.inc,v 1.10 2003/10/26 07:25:33 lukem Exp $
|
1998-11-19 11:58:02 +03:00
|
|
|
|
|
|
|
# TOP is assumed to be defined by Makefile including this one.
|
|
|
|
|
|
|
|
COMMONDIR= ${TOP}/bootfloppy-common
|
|
|
|
|
2000-05-02 20:06:45 +04:00
|
|
|
.include <bsd.kernobj.mk>
|
2002-03-06 00:23:28 +03:00
|
|
|
.include <bsd.own.mk>
|
2000-05-02 20:06:45 +04:00
|
|
|
|
1998-11-19 11:58:02 +03:00
|
|
|
MOUNT_POINT?= /mnt
|
|
|
|
VND?= vnd0
|
|
|
|
VND_DEV= /dev/${VND}a
|
|
|
|
VND_RDEV= /dev/r${VND}a
|
|
|
|
VND_CDEV= /dev/${VND}d
|
|
|
|
VND_CRDEV= /dev/r${VND}d
|
|
|
|
IMAGE?= xxx.fs
|
|
|
|
KERN?= netbsd-xxx
|
|
|
|
MDEC= ${DESTDIR}/usr/mdec
|
|
|
|
|
|
|
|
LISTS= ${COMMONDIR}/list
|
2002-03-05 22:53:19 +03:00
|
|
|
|
|
|
|
RAMDISKDIR!= cd $(.CURDIR)/../ramdisk && ${PRINTOBJDIR}
|
|
|
|
RAMDISK= ${RAMDISKDIR}/ramdisk.fs
|
1998-11-19 11:58:02 +03:00
|
|
|
|
|
|
|
DISKTYPE?= floppy3
|
|
|
|
DISKSIZE?= 2880
|
|
|
|
|
|
|
|
# Some reasonable values for the -i parameter to newfs are:
|
|
|
|
#
|
|
|
|
# 6144 1147k, 189 inodes free
|
|
|
|
# 16384 1159k, 93 inodes free
|
|
|
|
# 204800 1167k, 29 inodes free
|
|
|
|
INO_BYTES?= 204800
|
|
|
|
|
|
|
|
CLEANFILES+= netbsd.ram.gz
|
|
|
|
|
|
|
|
all: netbsd.ram.gz
|
|
|
|
dd if=/dev/zero of=${IMAGE} count=${DISKSIZE}
|
|
|
|
vnconfig -t ${DISKTYPE} -v -c ${VND_CDEV} ${IMAGE}
|
|
|
|
disklabel -rw ${VND_CDEV} ${DISKTYPE}
|
1999-03-04 23:32:18 +03:00
|
|
|
newfs -B be -m 0 -o space -i ${INO_BYTES} -c 80 ${VND_RDEV} ${DISKTYPE}
|
1998-11-19 11:58:02 +03:00
|
|
|
mount ${VND_DEV} ${MOUNT_POINT}
|
|
|
|
TOPDIR=${TOP} CURDIR=${.CURDIR} OBJDIR=${.OBJDIR} \
|
2000-05-02 20:06:45 +04:00
|
|
|
KERNOBJDIR=${KERNOBJDIR} \
|
2003-10-26 10:25:33 +03:00
|
|
|
TARGDIR=${MOUNT_POINT} ${HOST_SH} ${TOP}/runlist.sh ${LISTS}
|
1998-11-19 11:58:02 +03:00
|
|
|
@echo ""
|
|
|
|
@df -i ${MOUNT_POINT}
|
|
|
|
@echo ""
|
|
|
|
umount ${MOUNT_POINT}
|
|
|
|
vnconfig -u ${VND_CDEV}
|
|
|
|
|
|
|
|
unconfig:
|
|
|
|
-umount -f ${MOUNT_POINT}
|
|
|
|
-vnconfig -u ${VND_DEV}
|
|
|
|
-/bin/rm -f ${IMAGE}
|
|
|
|
|
|
|
|
netbsd.ram.gz: ${KERN} ${RAMDISK}
|
|
|
|
cp ${KERN} netbsd.tmp
|
2003-07-10 14:33:58 +04:00
|
|
|
${TOOL_MDSETIMAGE} -v netbsd.tmp ${RAMDISK}
|
2002-04-13 17:26:45 +04:00
|
|
|
gzip -9f netbsd.tmp
|
1998-11-19 11:58:02 +03:00
|
|
|
mv netbsd.tmp.gz ${.TARGET}
|
|
|
|
|
|
|
|
clean cleandir:
|
|
|
|
/bin/rm -f *.core ${IMAGE} ${CLEANFILES}
|
|
|
|
|
|
|
|
.include <bsd.obj.mk>
|
|
|
|
.include <bsd.subdir.mk>
|