Skeleton for ramdisk-style installation media.

This commit is contained in:
gmcgarry 2002-02-10 01:22:54 +00:00
parent 930fd2d1bf
commit 0007bec6dc
6 changed files with 218 additions and 0 deletions

5
distrib/hp300/Makefile Normal file
View File

@ -0,0 +1,5 @@
# $NetBSD: Makefile,v 1.3 2002/02/10 01:22:54 gmcgarry Exp $
#SUBDIR= ramdisk instkernel
.include <bsd.subdir.mk>

View File

@ -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

View File

@ -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"

View File

@ -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"

View File

@ -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:
~

View File

@ -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
..