Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/distrib/hp300 Skeleton for ramdisk-style installation media.
details: https://anonhg.NetBSD.org/src/rev/06c32f08fc1e
branches: trunk
changeset: 521987:06c32f08fc1e
user: gmcgarry <gmcgarry%NetBSD.org@localhost>
date: Sun Feb 10 01:22:54 2002 +0000
description:
Skeleton for ramdisk-style installation media.
diffstat:
distrib/hp300/Makefile | 5 ++
distrib/hp300/Makefile.inc | 13 +++++
distrib/hp300/instkernel/Makefile | 36 +++++++++++++++
distrib/hp300/ramdisk/Makefile | 75 ++++++++++++++++++++++++++++++++
distrib/hp300/ramdisk/disktab.ramdisk | 7 ++
distrib/hp300/ramdisk/mtree.conf | 82 +++++++++++++++++++++++++++++++++++
6 files changed, 218 insertions(+), 0 deletions(-)
diffs (242 lines):
diff -r 60fe31de98b7 -r 06c32f08fc1e distrib/hp300/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/distrib/hp300/Makefile Sun Feb 10 01:22:54 2002 +0000
@@ -0,0 +1,5 @@
+# $NetBSD: Makefile,v 1.3 2002/02/10 01:22:54 gmcgarry Exp $
+
+#SUBDIR= ramdisk instkernel
+
+.include <bsd.subdir.mk>
diff -r 60fe31de98b7 -r 06c32f08fc1e distrib/hp300/Makefile.inc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/distrib/hp300/Makefile.inc Sun Feb 10 01:22:54 2002 +0000
@@ -0,0 +1,13 @@
+# $NetBSD: Makefile.inc,v 1.1 2002/02/10 01:22:54 gmcgarry Exp $
+
+.include "../../Makefile.inc"
+.include <bsd.own.mk>
+
+REV!=sh ${BSDSRCDIR}/sys/conf/osrelease.sh -s
+VER!=sh ${BSDSRCDIR}/sys/conf/osrelease.sh
+
+.if target(install) && !defined(RELEASEDIR)
+beforeinstall:
+ @echo setenv RELEASEDIR before doing that!
+ @false
+.endif
diff -r 60fe31de98b7 -r 06c32f08fc1e distrib/hp300/instkernel/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/distrib/hp300/instkernel/Makefile Sun Feb 10 01:22:54 2002 +0000
@@ -0,0 +1,36 @@
+# $NetBSD: Makefile,v 1.1 2002/02/10 01:22:55 gmcgarry Exp $
+
+.include "../../../Makefile.inc"
+.include <bsd.kernobj.mk>
+.include <bsd.own.mk>
+
+DISKBINDIR= /installation/diskimage
+KERNBINDIR= /binary/kernel
+
+KERN= ${KERNOBJDIR}/RAMDISK/netbsd
+RAMDISK!= cd ${.CURDIR}/../ramdisk; ${MAKE} echoimage
+CLEANFILES= netbsd netbsd.gz
+
+MDSETIMAGE?= mdsetimage
+
+all: netbsd.gz
+
+netbsd.gz: ${KERN} ${RAMDISK}
+ cp ${KERN} netbsd
+ ${MDSETIMAGE} -v netbsd ${RAMDISK}
+ rm -f netbsd.gz
+ gzip -9 netbsd
+
+realinstall:
+ ${INSTALL} ${RENAME} ${PRESERVE} ${COPY} -o root -g wheel \
+ -m ${BINMODE} netbsd.gz ${RELEASEDIR}${KERNBINDIR}/install.gz
+
+clean cleandir distclean:
+ rm -f ${CLEANFILES}
+
+# XXX!
+depend:
+dependall: depend all
+
+.include <bsd.obj.mk>
+.include "../Makefile.inc"
diff -r 60fe31de98b7 -r 06c32f08fc1e distrib/hp300/ramdisk/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/distrib/hp300/ramdisk/Makefile Sun Feb 10 01:22:54 2002 +0000
@@ -0,0 +1,75 @@
+# $NetBSD: Makefile,v 1.1 2002/02/10 01:22:56 gmcgarry Exp $
+
+BINDIR= /installation/netboot
+
+TOP?= ${.CURDIR}/..
+ARCHDIR?= ${.CURDIR}/../miniroot
+
+.include "${TOP}/Makefile.inc"
+IMAGE= ramdisk.fs
+
+CBIN= ramdiskbin
+CSIZE= 2880 # 512 byte blocks, update disktab.ramdisk if changed
+DISKTAB= ${.CURDIR}/disktab.ramdisk
+DISKTYPE= install-ramdisk
+MOUNT_POINT?= /mnt
+
+VND?= vnd0
+VND_DEV= /dev/${VND}a
+VND_RDEV= /dev/r${VND}a
+
+CLEANFILES= ${IMAGE} ${CBIN} ${CBIN}.mk ${CBIN}.cache
+
+LISTS= ${.CURDIR}/list
+CRUNCHCONF= ${.CURDIR}/${CBIN}.conf
+MTREECONF= ${.CURDIR}/mtree.conf
+
+CRUNCHGEN?= crunchgen
+MTREE?= mtree
+
+all: ${IMAGE}
+
+${IMAGE}: ${CBIN}
+ dd if=/dev/zero of=${IMAGE} count=${CSIZE}
+ vnconfig -v -c ${VND} ${IMAGE}
+ disklabel -rw -f ${DISKTAB} ${VND} ${DISKTYPE}
+ newfs -B be -m 0 -o space -i 5120 ${VND_RDEV}
+ mount ${VND_DEV} ${MOUNT_POINT}
+ ${MTREE} -def ${MTREECONF} -p ${MOUNT_POINT}/ -u
+ TOPDIR=${TOP} CURDIR=${.CURDIR} OBJDIR=${.OBJDIR} ARCHDIR=${ARCHDIR} \
+ KERNOBJDIR=${KERNOBJDIR} \
+ TARGDIR=${MOUNT_POINT} sh ${TOP}/src/runlist.sh ${LISTS}
+ @echo ""
+ @df -i ${MOUNT_POINT}
+ @echo ""
+ umount ${MOUNT_POINT}
+ vnconfig -u ${VND}
+
+unconfig:
+ -umount -f ${MOUNT_POINT}
+ -vnconfig -u ${VND}
+ -/bin/rm -f ${IMAGE}
+
+${CBIN}.mk ${CBIN}.cache ${CBIN}.c: ${CRUNCHCONF}
+ ${CRUNCHGEN} -D ${TOP}/../.. -L ${DESTDIR}/usr/lib ${.ALLSRC}
+
+${CBIN}: ${CBIN}.mk ${CBIN}.cache ${CBIN}.c
+ ${MAKE} -f ${CBIN}.mk all
+
+echoimage:
+ @echo ${.OBJDIR}/${IMAGE}
+
+realinstall:
+ ${INSTALL} ${RENAME} ${PRESERVE} ${COPY} -o root -g wheel \
+ -m ${NONBINMODE} ${DISKIMAGE} ${RELEASEDIR}${BINDIR}
+
+clean cleandir distclean:
+ /bin/rm -f *.core ${CLEANFILES} *.o *.cro *.c
+
+# XXX!
+depend:
+dependall: depend all
+
+.include <bsd.own.mk>
+.include <bsd.obj.mk>
+.include "../Makefile.inc"
diff -r 60fe31de98b7 -r 06c32f08fc1e distrib/hp300/ramdisk/disktab.ramdisk
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/distrib/hp300/ramdisk/disktab.ramdisk Sun Feb 10 01:22:54 2002 +0000
@@ -0,0 +1,7 @@
+install-ramdisk:\
+ :ty=simulated:se#512:nt#3:ns#16:nc#60:\
+ :ta=4.2BSD:\
+ :pa#2880:oa#0:ba#8192:fa#1024:\
+ :pb#0:ob#0:\
+ :pc#2880:oc#0:
+~
diff -r 60fe31de98b7 -r 06c32f08fc1e distrib/hp300/ramdisk/mtree.conf
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/distrib/hp300/ramdisk/mtree.conf Sun Feb 10 01:22:54 2002 +0000
@@ -0,0 +1,82 @@
+# $NetBSD: mtree.conf,v 1.1 2002/02/10 01:22:56 gmcgarry Exp $
+
+/set type=dir uname=root gname=wheel mode=0755
+# .
+.
+
+# ./bin
+bin
+# ./bin
+..
+
+# ./dev
+dev
+# ./dev
+..
+
+# ./dist
+dist
+# ./dist
+..
+
+# ./etc
+etc
+# ./etc
+..
+
+# ./mnt
+mnt
+# ./mnt
+..
+
+# ./mnt2
+mnt2
+# ./mnt2
+..
+
+# ./kern
+kern
+# ./kern
+..
+
+# ./sbin
+sbin
+# ./sbin
+..
+
+# ./tmp
+tmp mode=01777
+# ./tmp
+..
+
+# ./usr
+usr
+
+# ./usr/bin
+bin
+# ./usr/bin
+..
+
+# ./usr/mdec
+mdec
+# ./usr/mdec
+..
+
+# ./usr/sbin
+sbin
+# ./usr/sbin
+..
+
+# ./usr/share
+share
+
+# ./usr/share/misc
+misc
+# ./usr/share/misc
+..
+
+# ./usr/share
+..
+
+# ./usr
+..
Home |
Main Index |
Thread Index |
Old Index