Tidy up a little and make work.
Now uses like disktab files for disk labels.
This commit is contained in:
parent
97998ce539
commit
67d216b128
@ -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
|
DISKBINDIR= /installation/diskimage
|
||||||
KERNBINDIR= /binary/kernel
|
KERNBINDIR= /binary/kernel
|
||||||
|
|
||||||
IMAGE= diskimage
|
IMAGE= diskimage
|
||||||
IMAGESIZE= 4096 # 512 byte blocks
|
IMAGESIZE= 4096 # 512 byte blocks, update disktab.diskimage if changed
|
||||||
DISKTYPE=
|
DISKTAB= ${.CURDIR}/disktab.diskimage
|
||||||
LABELPROTO= ${.CURDIR}/diskimage.label.proto
|
DISKTYPE= miniroot
|
||||||
# Get defaults from minidisk configuration
|
NEWFSOPTS?= -c 32 -B le -i 32768 # don't need many inodes!
|
||||||
.include "../miniroot/Makefile.inc"
|
|
||||||
NEWFSOPTS+= -i 32768 # don't need many inodes!
|
|
||||||
|
|
||||||
KERN= ${.CURDIR}/../../../sys/arch/pmax/compile/RAMDISK/netbsd
|
KERN= ${.CURDIR}/../../../sys/arch/pmax/compile/RAMDISK/netbsd
|
||||||
RAMDISK!= cd ${.CURDIR}/../ramdisk; ${MAKE} echoimage
|
RAMDISK!= cd ${.CURDIR}/../ramdisk; ${MAKE} echoimage
|
||||||
CLEANFILES= netbsd netbsd.gz netbsd.ecoff netbsd.ecoff.gz ${IMAGE}.gz
|
CLEANFILES= netbsd netbsd.gz netbsd.ecoff netbsd.ecoff.gz ${IMAGE}.gz
|
||||||
|
|
||||||
VND_DEV= /dev/${VND}
|
VND?= vnd0
|
||||||
VND_RDEV= /dev/r${VND}
|
VND_DEV= /dev/${VND}c
|
||||||
|
VND_RDEV= /dev/r${VND}c
|
||||||
MOUNT_POINT?= /mnt
|
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
|
all: netbsd.gz ${IMAGE}.gz
|
||||||
|
|
||||||
netbsd.gz: ${KERN} ${RAMDISK}
|
netbsd.gz: ${KERN} ${RAMDISK}
|
||||||
@ -32,9 +37,11 @@ netbsd.gz: ${KERN} ${RAMDISK}
|
|||||||
|
|
||||||
${IMAGE}.gz: netbsd.gz ${DESTDIR}/usr/mdec/boot.pmax
|
${IMAGE}.gz: netbsd.gz ${DESTDIR}/usr/mdec/boot.pmax
|
||||||
dd if=/dev/zero of=${IMAGE} count=${IMAGESIZE}
|
dd if=/dev/zero of=${IMAGE} count=${IMAGESIZE}
|
||||||
vnconfig ${DISKTYPEARG} -v -c ${VND_DEV} ${IMAGE} ${VND_GEOM}
|
vnconfig ${DISKTYPEARG} -v -c ${VND} ${IMAGE} ${VND_GEOM}
|
||||||
${PRELABEL}
|
disklabel -rw -f ${DISKTAB} ${VND} ${DISKTYPE}
|
||||||
-newfs -m 0 -o space ${NEWFSOPTS} ${VND_RDEV}
|
newfs -B le -m 0 -o space ${NEWFSOPTS} ${VND_RDEV}
|
||||||
|
${DESTDIR}/usr/mdec/installboot ${VND_RDEV} \
|
||||||
|
${DESTDIR}/usr/mdec/bootxx_ffs
|
||||||
${BOOTINSTALL}
|
${BOOTINSTALL}
|
||||||
mount ${VND_DEV} ${MOUNT_POINT}
|
mount ${VND_DEV} ${MOUNT_POINT}
|
||||||
cp -p ${DESTDIR}/usr/mdec/boot.pmax ${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}
|
@df -i ${MOUNT_POINT}
|
||||||
@echo ""
|
@echo ""
|
||||||
umount ${MOUNT_POINT}
|
umount ${MOUNT_POINT}
|
||||||
vnconfig -u ${VND_DEV}
|
vnconfig -u ${VND}
|
||||||
rm -f ${IMAGE}.gz
|
rm -f ${IMAGE}.gz
|
||||||
gzip -9 ${IMAGE}
|
gzip -9 ${IMAGE}
|
||||||
|
|
||||||
|
unconfig:
|
||||||
|
-umount -f ${MOUNT_POINT}
|
||||||
|
-vnconfig -u ${VND}
|
||||||
|
-/bin/rm -f ${IMAGE} ${IMAGE}.gz
|
||||||
|
|
||||||
realinstall:
|
realinstall:
|
||||||
${INSTALL} ${RENAME} ${PRESERVE} ${COPY} -o root -g wheel \
|
${INSTALL} ${RENAME} ${PRESERVE} ${COPY} -o root -g wheel \
|
||||||
-m ${NONBINMODE} ${IMAGE}.gz ${RELEASEDIR}${DISKBINDIR}
|
-m ${NONBINMODE} ${IMAGE}.gz ${RELEASEDIR}${DISKBINDIR}
|
||||||
|
@ -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
|
BINDIR= /installation/netboot
|
||||||
|
|
||||||
TOP?= ${.CURDIR}/..
|
TOP?= ${.CURDIR}/..
|
||||||
ARCHDIR?= ${.CURDIR}/../../${MACHINE}/miniroot
|
ARCHDIR?= ${.CURDIR}/../miniroot
|
||||||
|
|
||||||
.include "${TOP}/Makefile.inc"
|
.include "${TOP}/Makefile.inc"
|
||||||
IMAGE= ramdisk.fs
|
IMAGE= ramdisk.fs
|
||||||
DISKIMAGE= diskimage.tgz
|
DISKIMAGE= diskimage.tgz
|
||||||
|
|
||||||
CBIN= ramdiskbin
|
CBIN= ramdiskbin
|
||||||
#CSIZE?= 6144
|
CSIZE= 6144 # 512 byte blocks, update disktab.ramdisk if changed
|
||||||
CSIZE?= 4096
|
DISKTAB= ${.CURDIR}/disktab.ramdisk
|
||||||
|
DISKTYPE= install-ramdisk
|
||||||
MOUNT_POINT?= /mnt
|
MOUNT_POINT?= /mnt
|
||||||
# DEV/RDEV file system device, CDEV/RDEV vnconfig device
|
|
||||||
VND?= vnd0
|
VND?= vnd0
|
||||||
VND_DEV= /dev/${VND}a
|
VND_DEV= /dev/${VND}c
|
||||||
VND_RDEV= /dev/r${VND}a
|
VND_RDEV= /dev/r${VND}c
|
||||||
VND_CDEV= /dev/${VND}c
|
|
||||||
VND_CRDEV= /dev/r${VND}c
|
|
||||||
MDEC= ${DESTDIR}/usr/mdec
|
|
||||||
|
|
||||||
CLEANFILES= ${IMAGE} ${DISKIMAGE} ${CBIN} ${CBIN}.mk ${CBIN}.cache
|
CLEANFILES= ${IMAGE} ${DISKIMAGE} ${CBIN} ${CBIN}.mk ${CBIN}.cache
|
||||||
|
|
||||||
LISTS= list
|
LISTS= ${.CURDIR}/list
|
||||||
CRUNCHCONF= ${CBIN}.conf
|
CRUNCHCONF= ${.CURDIR}/${CBIN}.conf
|
||||||
MTREE= mtree.conf
|
MTREE= ${.CURDIR}/mtree.conf
|
||||||
|
|
||||||
all: ${IMAGE}
|
all: ${IMAGE}
|
||||||
|
|
||||||
${IMAGE}: ${CBIN}
|
${IMAGE}: ${CBIN}
|
||||||
dd if=/dev/zero of=${IMAGE} count=${CSIZE}
|
dd if=/dev/zero of=${IMAGE} count=${CSIZE}
|
||||||
vnconfig -v -c ${VND_CDEV} ${IMAGE}
|
vnconfig -v -c ${VND} ${IMAGE}
|
||||||
# disklabel -rw ${VND_CDEV} ${DISKTYPE}
|
disklabel -rw -f ${DISKTAB} ${VND} ${DISKTYPE}
|
||||||
newfs -B le -m 0 -o space -i 5120 ${VND_RDEV}
|
newfs -B le -m 0 -o space -i 5120 ${VND_RDEV}
|
||||||
mount ${VND_DEV} ${MOUNT_POINT}
|
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} \
|
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 ""
|
@echo ""
|
||||||
@df -i ${MOUNT_POINT}
|
@df -i ${MOUNT_POINT}
|
||||||
@echo ""
|
@echo ""
|
||||||
@ -45,11 +43,11 @@ ${IMAGE}: ${CBIN}
|
|||||||
tar cf - -C ${MOUNT_POINT} . | gzip -9 > ${DISKIMAGE}
|
tar cf - -C ${MOUNT_POINT} . | gzip -9 > ${DISKIMAGE}
|
||||||
@echo ""
|
@echo ""
|
||||||
umount ${MOUNT_POINT}
|
umount ${MOUNT_POINT}
|
||||||
vnconfig -u ${VND_CDEV}
|
vnconfig -u ${VND}
|
||||||
|
|
||||||
unconfig:
|
unconfig:
|
||||||
-umount -f ${MOUNT_POINT}
|
-umount -f ${MOUNT_POINT}
|
||||||
-vnconfig -u ${VND_DEV}
|
-vnconfig -u ${VND}
|
||||||
-/bin/rm -f ${IMAGE}
|
-/bin/rm -f ${IMAGE}
|
||||||
|
|
||||||
${CBIN}.mk ${CBIN}.cache ${CBIN}.c: ${CRUNCHCONF}
|
${CBIN}.mk ${CBIN}.cache ${CBIN}.c: ${CRUNCHCONF}
|
||||||
|
Loading…
Reference in New Issue
Block a user