1999-04-27 05:34:49 +04:00
|
|
|
# $NetBSD: Makefile,v 1.5 1999/04/27 01:34:49 simonb Exp $
|
1998-12-05 10:33:13 +03:00
|
|
|
|
|
|
|
|
1999-04-16 20:01:33 +04:00
|
|
|
IMAGE= diskimage
|
|
|
|
IMAGESIZE= 4096 # 512 byte blocks
|
|
|
|
DISKTYPE=
|
1999-04-16 20:08:28 +04:00
|
|
|
LABELPROTO= ${.CURDIR}/diskimage.label.proto
|
1999-04-16 20:01:33 +04:00
|
|
|
# Get defaults from minidisk configuration
|
|
|
|
.include "../miniroot/Makefile.inc"
|
|
|
|
NEWFSOPTS+= -i 32768 # don't need many inodes!
|
1998-12-05 10:33:13 +03:00
|
|
|
|
1999-04-16 20:01:33 +04:00
|
|
|
KERN= ${.CURDIR}/../../../sys/arch/pmax/compile/RAMDISK/netbsd
|
|
|
|
RAMDISK!= cd ${.CURDIR}/../ramdisk; \
|
|
|
|
printf "xxx: .MAKE\n\t@echo \$${.OBJDIR}/ramdisk.fs\n" | \
|
|
|
|
${MAKE} -s -f-
|
|
|
|
CLEANFILES= netbsd netbsd.gz netbsd.ecoff netbsd.ecoff.gz ${IMAGE}
|
|
|
|
|
|
|
|
VND_DEV= /dev/${VND}
|
|
|
|
VND_RDEV= /dev/r${VND}
|
|
|
|
MOUNT_POINT?= /mnt
|
|
|
|
|
1999-04-27 05:34:49 +04:00
|
|
|
all: netbsd.gz ${IMAGE}.gz
|
1998-12-05 10:33:13 +03:00
|
|
|
|
1999-04-05 10:17:44 +04:00
|
|
|
netbsd.gz: ${KERN} ${RAMDISK}
|
|
|
|
cp ${KERN} netbsd
|
|
|
|
mdsetimage -v netbsd ${RAMDISK}
|
|
|
|
elf2ecoff netbsd netbsd.ecoff
|
1998-12-05 10:33:13 +03:00
|
|
|
rm -f netbsd.ecoff.gz
|
1999-04-05 10:17:44 +04:00
|
|
|
gzip -9 netbsd.ecoff
|
|
|
|
rm -f netbsd.gz
|
|
|
|
gzip -9 netbsd
|
1998-12-05 10:33:13 +03:00
|
|
|
|
1999-04-27 05:34:49 +04:00
|
|
|
${IMAGE}.gz: netbsd.gz ${DESTDIR}/usr/mdec/boot
|
1999-04-16 20:01:33 +04:00
|
|
|
dd if=/dev/zero of=${IMAGE} count=${IMAGESIZE}
|
|
|
|
vnconfig ${DISKTYPEARG} -v -c ${VND_DEV} ${IMAGE} ${VND_GEOM}
|
|
|
|
${PRELABEL}
|
|
|
|
-newfs -m 0 -o space ${NEWFSOPTS} ${VND_RDEV}
|
|
|
|
${BOOTINSTALL}
|
|
|
|
mount ${VND_DEV} ${MOUNT_POINT}
|
|
|
|
cp -p ${DESTDIR}/usr/mdec/boot ${MOUNT_POINT}
|
|
|
|
cp -p netbsd.gz ${MOUNT_POINT}/netbsd
|
|
|
|
@echo ""
|
|
|
|
@df -i ${MOUNT_POINT}
|
|
|
|
@echo ""
|
|
|
|
umount ${MOUNT_POINT}
|
|
|
|
vnconfig -u ${VND_DEV}
|
1999-04-27 05:34:49 +04:00
|
|
|
gzip -9 ${IMAGE}
|
1999-04-16 20:01:33 +04:00
|
|
|
|
1998-12-05 10:33:13 +03:00
|
|
|
clean cleandir distclean:
|
|
|
|
rm -f ${CLEANFILES}
|
|
|
|
|
|
|
|
.include <bsd.own.mk>
|
|
|
|
.include <bsd.obj.mk>
|