From 67d216b12877fb8a1575875738bb02e51d55c7c7 Mon Sep 17 00:00:00 2001 From: simonb Date: Thu, 6 Jan 2000 03:47:55 +0000 Subject: [PATCH] Tidy up a little and make work. Now uses like disktab files for disk labels. --- distrib/pmax/instkernel/Makefile | 38 +++++++++++++++++++++----------- distrib/pmax/ramdisk/Makefile | 36 ++++++++++++++---------------- 2 files changed, 42 insertions(+), 32 deletions(-) diff --git a/distrib/pmax/instkernel/Makefile b/distrib/pmax/instkernel/Makefile index 8bd77f05ad57..6db501698b3c 100644 --- a/distrib/pmax/instkernel/Makefile +++ b/distrib/pmax/instkernel/Makefile @@ -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 @@ netbsd.gz: ${KERN} ${RAMDISK} ${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 @@ ${IMAGE}.gz: netbsd.gz ${DESTDIR}/usr/mdec/boot.pmax @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 --git a/distrib/pmax/ramdisk/Makefile b/distrib/pmax/ramdisk/Makefile index 3043759f51b8..04a638b5103e 100644 --- a/distrib/pmax/ramdisk/Makefile +++ b/distrib/pmax/ramdisk/Makefile @@ -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 @@ ${IMAGE}: ${CBIN} 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}