Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-4]: src/distrib/sun3 Apply patch (requested by toddpw):
details: https://anonhg.NetBSD.org/src/rev/c1167ecf23c4
branches: netbsd-1-4
changeset: 470449:c1167ecf23c4
user: he <he%NetBSD.org@localhost>
date: Wed Mar 01 00:27:37 2000 +0000
description:
Apply patch (requested by toddpw):
Convert sun3 miniroot/ramdisk build process to use vnd devices
instead of requiring a scratch partition on some local disk. Also
remove dependency on /etc/disktab entry. Support recursive
``depend'' makes (do nothing though).
diffstat:
distrib/sun3/miniroot/Makefile | 49 +++++++++++++++++++++++++++-------------
distrib/sun3/ramdisk/Makefile | 50 ++++++++++++++++++++++++++++-------------
2 files changed, 67 insertions(+), 32 deletions(-)
diffs (180 lines):
diff -r d813ebffb5fe -r c1167ecf23c4 distrib/sun3/miniroot/Makefile
--- a/distrib/sun3/miniroot/Makefile Wed Mar 01 00:22:41 2000 +0000
+++ b/distrib/sun3/miniroot/Makefile Wed Mar 01 00:27:37 2000 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.12.2.1 1999/06/21 03:16:53 perry Exp $
+# $NetBSD: Makefile,v 1.12.2.2 2000/03/01 00:27:37 he Exp $
TOP= ${.CURDIR}/..
@@ -18,22 +18,37 @@
KERNEL3X = ${KERNOBJDIR}/INSTALL3X/netbsd
MOUNT_POINT?= /mnt
-BDEV?= /dev/sd1b
-CDEV?= /dev/rsd1b
+# DEV/RDEV file system device, CDEV/CRDEV vnconfig device
+VND?= vnd0
+VND_DEV= /dev/${VND}a
+VND_RDEV= /dev/r${VND}a
+VND_CDEV= /dev/${VND}c
+VND_CRDEV= /dev/r${VND}c
-# These are all the parameters for the miniroot: (8MB)
+CYLS= 20
+SECS= 64
+TRKS= 16
+TOTALSECT != expr ${CYLS} '*' ${SECS} '*' ${TRKS}
DISKTYPE= miniroot
-NBLKS= 20480
-# bigendian, old format, minfree, opt, b/i trks, sects, cpg
-NEWFSARGS= -B be -O -m 0 -o space -i 8192 -t 8 -u 32 -c 16
+DISKTAB= ./${DISKTYPE}.disktab
+GEOM= 512/${SECS}/${TRKS}/${CYLS}
+INO_BYTES= 8192
-CLEANFILES= ${IMAGE}.gz install.sub
+CLEANFILES= ${IMAGE}.gz ${IMAGE} install.sub ${DISKTAB}
all: ${IMAGE}.gz
-${IMAGE}.gz: ${TREE} ${LISTS} install.sub
- -newfs ${NEWFSARGS} -s ${NBLKS} ${CDEV} ${DISKTYPE}
- mount ${BDEV} ${MOUNT_POINT}
+${DISKTAB}:
+ echo "${DISKTYPE}:ty=simulated:se#512:nt#${TRKS}:ns#${SECS}:nc#${CYLS}:pa#${TOTALSECT}:oa#0:ba#4096:fa#512:ta=4.2BSD:pc#${TOTALSECT}:oc#0:" > $@
+
+${IMAGE}.gz: ${TREE} ${LISTS} install.sub ${DISKTAB}
+ dd if=/dev/zero of=${IMAGE} bs=512 count=${TOTALSECT}
+ vnconfig -v -c ${VND_CDEV} ${IMAGE} ${GEOM}
+ disklabel -rw -f ${DISKTAB} ${VND_CDEV} ${DISKTYPE}
+ disklabel -W ${VND_CDEV}
+ # bigendian, old format, minfree, opt, b/i, cpg, device
+ newfs -B be -O -m 0 -o space -i ${INO_BYTES} -c ${CYLS} ${VND_RDEV}
+ mount ${VND_DEV} ${MOUNT_POINT}
mtree -def ${TREE} -p ${MOUNT_POINT}/ -u
cp ${KERNEL3} ${MOUNT_POINT}/netbsd.sun3
cp ${KERNEL3X} ${MOUNT_POINT}/netbsd.sun3x
@@ -42,15 +57,14 @@
sh ${TOP}/common/RunList.sh ${LISTS}
sync ; sleep 1 ; sync
cd ${MOUNT_POINT} ;\
- usr/mdec/installboot -v ufsboot usr/mdec/bootxx ${CDEV}
+ usr/mdec/installboot -v ufsboot usr/mdec/bootxx ${VND_CRDEV}
sync
@echo ""
@df -i ${MOUNT_POINT}
@echo ""
- -umount ${MOUNT_POINT}
- dd if=${CDEV} bs=16b count=`expr ${NBLKS} / 16` |\
- gzip > ${IMAGE}.tmp
- -mv -f ${IMAGE}.tmp ${IMAGE}.gz
+ umount ${MOUNT_POINT}
+ vnconfig -u ${VND_CDEV}
+ gzip -9 < ${IMAGE} > $@
# Do not delete this if I change my mind and kill make...
.PRECIOUS: ${IMAGE}.gz
@@ -62,6 +76,9 @@
-rm -f a.out core *.core *.o
-rm -f ${CLEANFILES}
+# XXX -- allow 'make depend' to run without error
+depend:
+
# Standard rules needed by the above...
.include <bsd.obj.mk>
diff -r d813ebffb5fe -r c1167ecf23c4 distrib/sun3/ramdisk/Makefile
--- a/distrib/sun3/ramdisk/Makefile Wed Mar 01 00:22:41 2000 +0000
+++ b/distrib/sun3/ramdisk/Makefile Wed Mar 01 00:27:37 2000 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.7.2.1 1999/06/21 03:19:34 perry Exp $
+# $NetBSD: Makefile,v 1.7.2.2 2000/03/01 00:28:02 he Exp $
TOP= ${.CURDIR}/..
@@ -17,17 +17,24 @@
KERNEL3X = ${KERNOBJDIR}/RAMDISK3X/netbsd
MOUNT_POINT?= /mnt
-BDEV?= /dev/sd1b
-CDEV?= /dev/rsd1b
+# DEV/RDEV file system device, CDEV/CRDEV vnconfig device
+VND?= vnd0
+VND_DEV= /dev/${VND}a
+VND_RDEV= /dev/r${VND}a
+VND_CDEV= /dev/${VND}c
+VND_CRDEV= /dev/r${VND}c
-# These are all the parameters for the root fs: (320K)
+CYLS= 20
+SECS= 16
+TRKS= 2
+TOTALSECT != expr ${CYLS} '*' ${SECS} '*' ${TRKS}
DISKTYPE= rdroot
-NBLKS= 640
-# bigendian, old format, minfree, opt, b/i trks, sects, cpg
-NEWFSARGS= -B be -O -m 0 -o space -i 2048 -t 2 -u 16 -c 16
+DISKTAB= ./${DISKTYPE}.disktab
+GEOM= 512/${SECS}/${TRKS}/${CYLS}
+INO_BYTES= 2048
KERNELS= netbsd-RAMDISK netbsd-RAMDISK3X
-CLEANFILES= $(KERNELS) rdsetroot ${IMAGE}.fs
+CLEANFILES= $(KERNELS) rdsetroot ${IMAGE}.fs ${DISKTAB}
all: $(KERNELS)
@@ -44,9 +51,17 @@
rdsetroot: ${TOP}/common/rdsetroot.c
$(CC) -o $@ -DDEBUG ${TOP}/common/rdsetroot.c
-${IMAGE}.fs: ${TREE} ${LISTS} ${CBIN}
- -newfs ${NEWFSARGS} -s ${NBLKS} ${CDEV} ${DISKTYPE}
- mount ${BDEV} ${MOUNT_POINT}
+${DISKTAB}:
+ echo "${DISKTYPE}:ty=simulated:se#512:nt#${TRKS}:ns#${SECS}:nc#${CYLS}:pa#${TOTALSECT}:oa#0:ba#4096:fa#512:ta=4.2BSD:pc#${TOTALSECT}:oc#0:" > $@
+
+${IMAGE}.fs: ${TREE} ${LISTS} ${CBIN} ${DISKTAB}
+ dd if=/dev/zero of=$@ bs=512 count=${TOTALSECT}
+ vnconfig -v -c ${VND_CDEV} $@ ${GEOM}
+ disklabel -rw -f ${DISKTAB} ${VND_CDEV} ${DISKTYPE}
+ disklabel -W ${VND_CDEV}
+ # bigendian, old format, minfree, opt, b/i, cpg, device
+ newfs -B be -O -m 0 -o space -i ${INO_BYTES} -c ${CYLS} ${VND_RDEV}
+ mount ${VND_DEV} ${MOUNT_POINT}
mtree -def ${TREE} -p ${MOUNT_POINT}/ -u
TOPDIR=${TOP} CURDIR=${.CURDIR} \
OBJDIR=${.OBJDIR} TARGDIR=${MOUNT_POINT} \
@@ -55,12 +70,12 @@
@echo ""
@df -i ${MOUNT_POINT}
@echo ""
- -umount ${MOUNT_POINT}
- dd if=${CDEV} of=$@ bs=16b \
- count=`expr ${NBLKS} / 16`
+ umount ${MOUNT_POINT}
+ vnconfig -u ${VND_CDEV}
# Do not delete this if I change my mind and kill make...
-.PRECIOUS: ${IMAGE}.fs
+# Yes delete the durn thing, in case the make fails because vnd is busy!!
+#.PRECIOUS: ${IMAGE}.fs
# Rules for making ${CBIN} ...
.include "${TOP}/common/Make.crunch"
@@ -73,9 +88,12 @@
.include "${HACKSRC}/Makefile.inc"
clean cleandir distclean:
- -rm -f a.out core *.core *.o
+ -rm -f a.out core *.core *.o *.cro
-rm -f ${CLEANFILES}
+# XXX -- prevent 'make depend' from bombing out
+depend:
+
# Standard rules needed by the above...
.include <bsd.obj.mk>
Home |
Main Index |
Thread Index |
Old Index