Source-Changes-HG archive

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

[src/trunk]: src/distrib/pmax Tidy up a little and make work.



details:   https://anonhg.NetBSD.org/src/rev/4ed7d55780da
branches:  trunk
changeset: 480183:4ed7d55780da
user:      simonb <simonb%NetBSD.org@localhost>
date:      Thu Jan 06 03:47:55 2000 +0000

description:
Tidy up a little and make work.
Now uses like disktab files for disk labels.

diffstat:

 distrib/pmax/instkernel/Makefile |  38 +++++++++++++++++++++++++-------------
 distrib/pmax/ramdisk/Makefile    |  36 +++++++++++++++++-------------------
 2 files changed, 42 insertions(+), 32 deletions(-)

diffs (150 lines):

diff -r 58dc3bf4928c -r 4ed7d55780da distrib/pmax/instkernel/Makefile
--- a/distrib/pmax/instkernel/Makefile  Thu Jan 06 03:43:03 2000 +0000
+++ b/distrib/pmax/instkernel/Makefile  Thu Jan 06 03:47:55 2000 +0000
@@ -1,24 +1,29 @@
-#      $NetBSD: Makefile,v 1.14 2000/01/04 01:20:23 simonb Exp $
+#      $NetBSD: Makefile,v 1.15 2000/01/06 03:47:55 simonb Exp $
 
 DISKBINDIR=    /installation/diskimage
 KERNBINDIR=    /binary/kernel
 
 IMAGE=         diskimage
-IMAGESIZE=     4096 # 512 byte blocks
-DISKTYPE=
-LABELPROTO=    ${.CURDIR}/diskimage.label.proto
-# Get defaults from minidisk configuration
-.include       "../miniroot/Makefile.inc"
-NEWFSOPTS+=    -i 32768        # don't need many inodes!
+IMAGESIZE=     4096 # 512 byte blocks, update disktab.diskimage if changed
+DISKTAB=       ${.CURDIR}/disktab.diskimage
+DISKTYPE=      miniroot
+NEWFSOPTS?=    -c 32 -B le -i 32768    # don't need many inodes!
 
 KERN=          ${.CURDIR}/../../../sys/arch/pmax/compile/RAMDISK/netbsd
 RAMDISK!=      cd ${.CURDIR}/../ramdisk; ${MAKE} echoimage
 CLEANFILES=    netbsd netbsd.gz netbsd.ecoff netbsd.ecoff.gz ${IMAGE}.gz
 
-VND_DEV=       /dev/${VND}
-VND_RDEV=      /dev/r${VND}
+VND?=          vnd0
+VND_DEV=       /dev/${VND}c
+VND_RDEV=      /dev/r${VND}c
 MOUNT_POINT?=  /mnt
 
+#
+# install bootblock, so that we can boot from there
+#
+BOOTINSTALL= ${DESTDIR}/usr/mdec/installboot ${VND_RDEV} \
+       ${DESTDIR}/usr/mdec/bootxx_ffs
+
 all:   netbsd.gz ${IMAGE}.gz
 
 netbsd.gz: ${KERN} ${RAMDISK}
@@ -32,9 +37,11 @@
 
 ${IMAGE}.gz: netbsd.gz ${DESTDIR}/usr/mdec/boot.pmax
        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}
+       vnconfig ${DISKTYPEARG} -v -c ${VND} ${IMAGE} ${VND_GEOM}
+       disklabel -rw -f ${DISKTAB} ${VND} ${DISKTYPE}
+       newfs -B le -m 0 -o space ${NEWFSOPTS} ${VND_RDEV}
+       ${DESTDIR}/usr/mdec/installboot ${VND_RDEV} \
+           ${DESTDIR}/usr/mdec/bootxx_ffs
        ${BOOTINSTALL}
        mount ${VND_DEV} ${MOUNT_POINT}
        cp -p ${DESTDIR}/usr/mdec/boot.pmax ${MOUNT_POINT}
@@ -43,10 +50,15 @@
        @df -i ${MOUNT_POINT}
        @echo ""
        umount ${MOUNT_POINT}
-       vnconfig -u ${VND_DEV}
+       vnconfig -u ${VND}
        rm -f ${IMAGE}.gz
        gzip -9 ${IMAGE}
 
+unconfig:
+       -umount -f ${MOUNT_POINT}
+       -vnconfig -u ${VND}
+       -/bin/rm -f ${IMAGE} ${IMAGE}.gz
+
 realinstall:
        ${INSTALL} ${RENAME} ${PRESERVE} ${COPY} -o root -g wheel \
                -m ${NONBINMODE} ${IMAGE}.gz ${RELEASEDIR}${DISKBINDIR}
diff -r 58dc3bf4928c -r 4ed7d55780da distrib/pmax/ramdisk/Makefile
--- a/distrib/pmax/ramdisk/Makefile     Thu Jan 06 03:43:03 2000 +0000
+++ b/distrib/pmax/ramdisk/Makefile     Thu Jan 06 03:47:55 2000 +0000
@@ -1,43 +1,41 @@
-#      $NetBSD: Makefile,v 1.10 1999/12/28 10:54:20 simonb Exp $
+#      $NetBSD: Makefile,v 1.11 2000/01/06 03:47:56 simonb Exp $
 
 BINDIR=                /installation/netboot
 
 TOP?=          ${.CURDIR}/..
-ARCHDIR?=        ${.CURDIR}/../../${MACHINE}/miniroot
+ARCHDIR?=      ${.CURDIR}/../miniroot
 
 .include "${TOP}/Makefile.inc"
 IMAGE=         ramdisk.fs
 DISKIMAGE=     diskimage.tgz
 
 CBIN=          ramdiskbin
-#CSIZE?=       6144
-CSIZE?=                4096
+CSIZE=         6144 # 512 byte blocks, update disktab.ramdisk if changed
+DISKTAB=       ${.CURDIR}/disktab.ramdisk
+DISKTYPE=      install-ramdisk
 MOUNT_POINT?=  /mnt
-# DEV/RDEV file system device, CDEV/RDEV 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
-MDEC=          ${DESTDIR}/usr/mdec
+VND_DEV=       /dev/${VND}c
+VND_RDEV=      /dev/r${VND}c
 
 CLEANFILES=    ${IMAGE} ${DISKIMAGE} ${CBIN} ${CBIN}.mk ${CBIN}.cache
 
-LISTS=         list
-CRUNCHCONF=    ${CBIN}.conf
-MTREE=         mtree.conf
+LISTS=         ${.CURDIR}/list
+CRUNCHCONF=    ${.CURDIR}/${CBIN}.conf
+MTREE=         ${.CURDIR}/mtree.conf
 
 all: ${IMAGE}
 
 ${IMAGE}: ${CBIN} 
        dd if=/dev/zero of=${IMAGE} count=${CSIZE}
-       vnconfig -v -c ${VND_CDEV} ${IMAGE}
-#      disklabel -rw ${VND_CDEV} ${DISKTYPE}
+       vnconfig -v -c ${VND} ${IMAGE}
+       disklabel -rw -f ${DISKTAB} ${VND} ${DISKTYPE}
        newfs -B le -m 0 -o space -i 5120 ${VND_RDEV}
        mount ${VND_DEV} ${MOUNT_POINT}
-       mtree -def ${.CURDIR}/${MTREE} -p ${MOUNT_POINT}/ -u
+       mtree -def ${MTREE} -p ${MOUNT_POINT}/ -u
        TOPDIR=${TOP} CURDIR=${.CURDIR} OBJDIR=${.OBJDIR} ARCHDIR=${ARCHDIR} \
-           TARGDIR=${MOUNT_POINT} sh ${TOP}/src/runlist.sh ${.CURDIR}/${LISTS}
+           TARGDIR=${MOUNT_POINT} sh ${TOP}/src/runlist.sh ${LISTS}
        @echo ""
        @df -i ${MOUNT_POINT}
        @echo ""
@@ -45,11 +43,11 @@
        tar cf - -C ${MOUNT_POINT} . | gzip -9 > ${DISKIMAGE}
        @echo ""
        umount ${MOUNT_POINT}
-       vnconfig -u ${VND_CDEV}
+       vnconfig -u ${VND}
 
 unconfig:
        -umount -f ${MOUNT_POINT}
-       -vnconfig -u ${VND_DEV}
+       -vnconfig -u ${VND}
        -/bin/rm -f ${IMAGE}
 
 ${CBIN}.mk ${CBIN}.cache ${CBIN}.c: ${CRUNCHCONF}



Home | Main Index | Thread Index | Old Index