Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/distrib/sun3/ramdisk - Use vnd instead of sd1b to build ramd...



details:   https://anonhg.NetBSD.org/src/rev/faab911d2dc3
branches:  trunk
changeset: 487588:faab911d2dc3
user:      tsutsui <tsutsui%NetBSD.org@localhost>
date:      Fri Jun 09 15:03:34 2000 +0000

description:
- Use vnd instead of sd1b to build ramdisk image.
- Adjust ramdisk size.
- Switch to MI mdsetimage(8) from home-grown rdsetroot.

diffstat:

 distrib/sun3/ramdisk/Makefile |  40 ++++++++++++++++++++--------------------
 1 files changed, 20 insertions(+), 20 deletions(-)

diffs (75 lines):

diff -r fce81c771483 -r faab911d2dc3 distrib/sun3/ramdisk/Makefile
--- a/distrib/sun3/ramdisk/Makefile     Fri Jun 09 14:58:32 2000 +0000
+++ b/distrib/sun3/ramdisk/Makefile     Fri Jun 09 15:03:34 2000 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.11 1999/05/21 04:06:20 gwr Exp $
+#      $NetBSD: Makefile,v 1.12 2000/06/09 15:03:34 tsutsui Exp $
 
 TOP=           ${.CURDIR}/..
 
@@ -17,36 +17,37 @@
 KERNEL3X = ${KERNOBJDIR}/RAMDISK3X/netbsd
 
 MOUNT_POINT?=  /mnt
-BDEV?=         /dev/sd1b
-CDEV?=         /dev/rsd1b
+VND?=          vnd1
+VND_DEV?=      /dev/${VND}a
+VND_RDEV?=     /dev/r${VND}a
 
-# These are all the parameters for the root fs: (320K)
+# These are all the parameters for the root fs:
 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
+SIZE=          400k
+# bigendian, minfree, opt, b/i , cpg
+NEWFSARGS= -B be -m 0 -o space -i 4096 -c 20
 
 KERNELS= netbsd-RAMDISK netbsd-RAMDISK3X
-CLEANFILES= $(KERNELS) rdsetroot ${IMAGE}.fs
+CLEANFILES= $(KERNELS) ${IMAGE}.fs netbsd-tmp
 
 all: $(KERNELS)
 
-netbsd-RAMDISK : rdsetroot ${IMAGE}.fs
+netbsd-RAMDISK : ${IMAGE}.fs
        cp ${KERNEL3} netbsd-tmp
-       ./rdsetroot  netbsd-tmp < ${IMAGE}.fs
+       mdsetimage -v netbsd-tmp ${IMAGE}.fs
        -mv -f netbsd-tmp $@
 
-netbsd-RAMDISK3X : rdsetroot ${IMAGE}.fs
+netbsd-RAMDISK3X : ${IMAGE}.fs
        cp ${KERNEL3X} netbsd-tmp
-       ./rdsetroot  netbsd-tmp < ${IMAGE}.fs
+       mdsetimage -v netbsd-tmp ${IMAGE}.fs
        -mv -f netbsd-tmp $@
 
-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}
+       dd if=/dev/zero of=${IMAGE}.fs bs=${SIZE} count=1
+       vnconfig -t ${DISKTYPE} -v -c ${VND} ${IMAGE}.fs
+       disklabel -rw ${VND} ${DISKTYPE}
+       newfs ${NEWFSARGS} ${VND_RDEV}
+       mount ${VND_DEV} ${MOUNT_POINT}
        mtree -def ${TREE} -p ${MOUNT_POINT}/ -u
        TOPDIR=${TOP} CURDIR=${.CURDIR} \
          OBJDIR=${.OBJDIR} TARGDIR=${MOUNT_POINT} \
@@ -55,9 +56,8 @@
        @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}
 
 # Do not delete this if I change my mind and kill make...
 .PRECIOUS: ${IMAGE}.fs



Home | Main Index | Thread Index | Old Index