Use vnd rather than sd1b to make miniroot image.
This commit is contained in:
parent
73a779fa1f
commit
b3e031a6db
|
@ -1,4 +1,4 @@
|
||||||
# $NetBSD: Makefile,v 1.15 1999/05/21 04:06:20 gwr Exp $
|
# $NetBSD: Makefile,v 1.16 2000/06/09 14:58:32 tsutsui Exp $
|
||||||
|
|
||||||
TOP= ${.CURDIR}/..
|
TOP= ${.CURDIR}/..
|
||||||
|
|
||||||
|
@ -18,22 +18,27 @@ KERNEL3 = ${KERNOBJDIR}/INSTALL/netbsd
|
||||||
KERNEL3X = ${KERNOBJDIR}/INSTALL3X/netbsd
|
KERNEL3X = ${KERNOBJDIR}/INSTALL3X/netbsd
|
||||||
|
|
||||||
MOUNT_POINT?= /mnt
|
MOUNT_POINT?= /mnt
|
||||||
BDEV?= /dev/sd1b
|
VND?= vnd1
|
||||||
CDEV?= /dev/rsd1b
|
VND_DEV?= /dev/${VND}a
|
||||||
|
VND_RDEV?= /dev/r${VND}a
|
||||||
|
VND_CRDEV?= /dev/r${VND}c
|
||||||
|
|
||||||
# These are all the parameters for the miniroot: (8MB)
|
# These are all the parameters for the miniroot: (10MB)
|
||||||
DISKTYPE= miniroot
|
DISKTYPE= miniroot
|
||||||
NBLKS= 20480
|
SIZE= 10
|
||||||
# bigendian, old format, minfree, opt, b/i trks, sects, cpg
|
# bigendian, old format, minfree, opt, b/i, cpg
|
||||||
NEWFSARGS= -B be -O -m 0 -o space -i 8192 -t 8 -u 32 -c 16
|
NEWFSARGS= -B be -O -m 0 -o space -i 8192 -c 16
|
||||||
|
|
||||||
CLEANFILES= ${IMAGE}.gz install.sub
|
CLEANFILES= ${IMAGE}.gz ${IMAGE} ${IMAGE}.tmp install.sub
|
||||||
|
|
||||||
all: ${IMAGE}.gz
|
all: ${IMAGE}.gz
|
||||||
|
|
||||||
${IMAGE}.gz: ${TREE} ${LISTS} install.sub
|
${IMAGE}.gz: ${TREE} ${LISTS} install.sub
|
||||||
-newfs ${NEWFSARGS} -s ${NBLKS} ${CDEV} ${DISKTYPE}
|
dd if=/dev/zero of=${IMAGE} bs=1024k count=${SIZE}
|
||||||
mount ${BDEV} ${MOUNT_POINT}
|
vnconfig -t ${DISKTYPE} -v -c ${VND} ${IMAGE}
|
||||||
|
disklabel -rw ${VND} ${DISKTYPE}
|
||||||
|
newfs ${NEWFSARGS} ${VND_RDEV}
|
||||||
|
mount ${VND_DEV} ${MOUNT_POINT}
|
||||||
mtree -def ${TREE} -p ${MOUNT_POINT}/ -u
|
mtree -def ${TREE} -p ${MOUNT_POINT}/ -u
|
||||||
cp ${KERNEL3} ${MOUNT_POINT}/netbsd.sun3
|
cp ${KERNEL3} ${MOUNT_POINT}/netbsd.sun3
|
||||||
cp ${KERNEL3X} ${MOUNT_POINT}/netbsd.sun3x
|
cp ${KERNEL3X} ${MOUNT_POINT}/netbsd.sun3x
|
||||||
|
@ -42,14 +47,14 @@ ${IMAGE}.gz: ${TREE} ${LISTS} install.sub
|
||||||
sh ${TOP}/common/RunList.sh ${LISTS}
|
sh ${TOP}/common/RunList.sh ${LISTS}
|
||||||
sync ; sleep 1 ; sync
|
sync ; sleep 1 ; sync
|
||||||
cd ${MOUNT_POINT} ;\
|
cd ${MOUNT_POINT} ;\
|
||||||
usr/mdec/installboot -v ufsboot usr/mdec/bootxx ${CDEV}
|
usr/mdec/installboot -v ufsboot usr/mdec/bootxx ${VND_CRDEV}
|
||||||
sync
|
sync
|
||||||
@echo ""
|
@echo ""
|
||||||
@df -i ${MOUNT_POINT}
|
@df -i ${MOUNT_POINT}
|
||||||
@echo ""
|
@echo ""
|
||||||
-umount ${MOUNT_POINT}
|
-umount ${MOUNT_POINT}
|
||||||
dd if=${CDEV} bs=16b count=`expr ${NBLKS} / 16` |\
|
vnconfig -u ${VND}
|
||||||
gzip > ${IMAGE}.tmp
|
gzip -9 -c ${IMAGE} > ${IMAGE}.tmp
|
||||||
-mv -f ${IMAGE}.tmp ${IMAGE}.gz
|
-mv -f ${IMAGE}.tmp ${IMAGE}.gz
|
||||||
|
|
||||||
# Do not delete this if I change my mind and kill make...
|
# Do not delete this if I change my mind and kill make...
|
||||||
|
|
Loading…
Reference in New Issue