Major overhaul, to enable unprivileged (cross) building, removing the

requirement to build as root on a system with vnconfig.


Use ${KERNSRCDIR} and ${_SRC_TOP_} where appropriate

Remove now-obsolete:
	list2sh.awk runlist.sh bootfloppy-common/list

Bootfloppy-*/Makefile: don't need to set DISKTYPE or BLOCK8K any more

Rename  bootfloppy-common/Makefile.inc  to  common/Makefile.bootfloppy
and	fdset-common/Makefile.inc       to  common/Makefile.fdset
This uses makefs instead of vnconfig and disklabel, thus removing the
need for root privileges to build these floppies..

Add common/Makefile.ramdisk, to simplify ramdisk-*/Makefile.
Uses shared ${_SRC_TOP_}/distrib/common/Makefile.crunch and
${_SRC_TOP_}/distrib/common/Makefile.image to even further simply things.

Migrate ramdisk-*/dot.profile to a shared common/dot.profile, which
detects whether it's an install or rescue profile based on the existance
of /sysinst.  Remove /dev generation code as init(8) now does that for us.

Migrate common parts of */list to a shared common/list.ramdisk.
Convert ramdisk-*/list to new format used by distrib/common/parselist.awk
Don't bother running pwd_mkdb now that libhack's getpwent parses
/etc/master.passwd instead of /etc/passwd.

Migrate ramdisk-*/mtree.conf to a shared common/mtree.conf, which is now a
new full-path-style specfile.

Remove ramdisk-*/ramdiskbin.conf as it's now automatically generated
from ramdisk-*/list by parselist.awk.

Migrate ramdisk-*/termcap.mini to a shared common/termcap.mini.

Remove unused ramdisk-{small,tiny}/disktab.preinstall.

Use .for loops in kernel-*/Makefile to simply defining mostly-duplicated
targets.

ramdisk-*/Makefile: convert to using common/Makefile.ramdisk

Remove unused ramdisk-*/dot.hdprofile.
This commit is contained in:
lukem 2002-02-03 16:22:19 +00:00
parent c33eea3aac
commit c8099b4072
54 changed files with 592 additions and 2533 deletions

View File

@ -1,8 +1,8 @@
# $NetBSD: Makefile.inc,v 1.12 2000/05/29 05:37:06 matt Exp $
# $NetBSD: Makefile.inc,v 1.13 2002/02/03 16:22:19 lukem Exp $
.include "../../../Makefile.inc"
# REV is revision without dots, as in "12C"
# VER is revision with dots, as in "1.2C"
REV!=sh ${.CURDIR}/../../../../sys/conf/osrelease.sh -s
VER!=sh ${.CURDIR}/../../../../sys/conf/osrelease.sh
REV!=sh ${KERNSRCDIR}/conf/osrelease.sh -s
VER!=sh ${KERNSRCDIR}/conf/osrelease.sh

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.12 2002/02/03 14:58:24 lukem Exp $
# $NetBSD: Makefile,v 1.13 2002/02/03 16:22:20 lukem Exp $
TOP= ${.CURDIR}/..
@ -23,10 +23,9 @@ KERN!= cd $(.CURDIR)/../kernel-ramdisk/; \
# This should place the image in i386-cd.img, which can hopefully
# be used to burn a CD.
DISKTYPE= floppy288
DISKSIZE= 5760
METAFILE!= printf "USTAR.volsize.%o" ${DISKSIZE}
BLOCK8K= 359
PAD=yes
.include "${TOP}/bootfloppy-common/Makefile.inc"
.include "${TOP}/common/Makefile.bootfloppy"

View File

@ -1,9 +0,0 @@
# $NetBSD: list,v 1.4 2000/05/05 20:13:31 mycroft Exp $
# copy the kernel
# We copy compressed kernel to "netbsd" rather than "netbsd.gz" for two reasons
# 1) shaves two seconds off the boot as the bootblocks look for netbsd first.
# 2) avoids possible moment of confusion when bootblocks
# print "no such file or directory" error before moving on to netbsd.gz
COPY ${OBJDIR}/netbsd netbsd

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.2 2001/07/30 21:38:22 jdolecek Exp $
# $NetBSD: Makefile,v 1.3 2002/02/03 16:22:21 lukem Exp $
TOP= ${.CURDIR}/..
@ -9,8 +9,6 @@ KERN!= cd $(.CURDIR)/../kernel-ramdisk/; \
printf "xxx: .MAKE\n\t@echo \$${.OBJDIR}/netbsd.INSTALL_PS2.gz\n" | \
${MAKE} -s -f-
DISKTYPE= floppy
DISKSIZE= 2880
BLOCK8K= 179
.include "${TOP}/bootfloppy-common/Makefile.inc"
.include "${TOP}/common/Makefile.bootfloppy"

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.9 2000/09/27 16:04:13 fvdl Exp $
# $NetBSD: Makefile,v 1.10 2002/02/03 16:22:21 lukem Exp $
TOP= ${.CURDIR}/..
@ -9,8 +9,6 @@ KERN!= cd $(.CURDIR)/../kernel-ramdisk/; \
printf "xxx: .MAKE\n\t@echo \$${.OBJDIR}/netbsd.INSTALL_SMALL.gz\n" | \
${MAKE} -s -f-
DISKTYPE= floppy5
DISKSIZE= 2400
BLOCK8K= 149
.include "${TOP}/bootfloppy-common/Makefile.inc"
.include "${TOP}/common/Makefile.bootfloppy"

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.6 2000/09/27 16:04:14 fvdl Exp $
# $NetBSD: Makefile,v 1.7 2002/02/03 16:22:21 lukem Exp $
TOP= ${.CURDIR}/..
@ -9,8 +9,6 @@ KERN!= cd $(.CURDIR)/../kernel-ramdisk/; \
printf "xxx: .MAKE\n\t@echo \$${.OBJDIR}/netbsd.INSTALL_TINY.gz\n" | \
${MAKE} -s -f-
DISKTYPE= floppy5
DISKSIZE= 2400
BLOCK8K= 149
.include "${TOP}/bootfloppy-common/Makefile.inc"
.include "${TOP}/common/Makefile.bootfloppy"

View File

@ -1,20 +1,14 @@
# $NetBSD: Makefile.inc,v 1.34 2002/02/03 14:56:00 lukem Exp $
# $NetBSD: Makefile.bootfloppy,v 1.1 2002/02/03 16:22:21 lukem Exp $
# TOP is assumed to be defined by Makefile including this one.
VND?= vnd0
VND_DEV= /dev/${VND}a
VND_RDEV= /dev/r${VND}a
IMAGE?= boot-xxx.fs
FSTMP= ustar.tmp
MDEC= ${DESTDIR}/usr/mdec
BOOTCODE?= ${MDEC}/biosboot.sym
#BOOTCODE= ${MDEC}/biosboot_com0.sym # Serial output
STRIP?= strip
DISKTYPE?= floppy3
DISKSIZE?= 2880
BLOCK8K?= 179
CLEANFILES+= netbsd boot ustar.tmp ${METAFILE}
@ -22,17 +16,16 @@ realall: netbsd boot
if test "${METAFILE}" != ""; then \
touch ${METAFILE}; \
fi
tar cvf ${FSTMP} boot ${METAFILE} netbsd
${PAX} -wvf ${FSTMP} boot ${METAFILE} netbsd
@echo
@echo Making disk number one
rm -f ${IMAGE}.tmp
dd if=/dev/zero of=${IMAGE}.tmp count=${DISKSIZE}
vnconfig -t ${DISKTYPE} -v -c ${VND} ${IMAGE}.tmp
disklabel -rw ${VND} ${DISKTYPE}
dd bs=8k seek=1 count=${BLOCK8K} if=${FSTMP} of=${VND_RDEV}
rm -rf empty
mkdir -m 755 empty
${MAKEFS} -s ${DISKSIZE}b ${IMAGE}.tmp empty
dd bs=8k seek=1 count=$$((${DISKSIZE} / 16 - 1)) \
if=${FSTMP} of=${IMAGE}.tmp
@echo "installing new bootblocks"
${MDEC}/installboot -b 17 -v -f ${BOOTCODE} ${VND_RDEV}
vnconfig -u ${VND}
${MDEC}/installboot -b 17 -v -f ${BOOTCODE} ${IMAGE}.tmp
@ls -l ${FSTMP} | (read mode links uid gid size junk; \
dksize=$$((${DISKSIZE} * 512 - 8 * 1024)); \
disks=$$(($$size / $$dksize + 1)); \
@ -81,14 +74,15 @@ netbsd: ${KERN}
boot: ${BOOTCODE}
rm -f boot
cp ${BOOTCODE} boot
strip boot
${STRIP} boot
release:
-mkdir -p ${RELEASEDIR}/installation/floppy
cp -p ${IMAGE} ${RELEASEDIR}/installation/floppy
clean cleandir distclean:
/bin/rm -f *.core ${CLEANFILES} ${IMAGE} ${IMAGE}.tmp
rm -f *.core ${CLEANFILES} ${IMAGE} ${IMAGE}.tmp
rm -rf empty
.include <bsd.own.mk>
.include <bsd.obj.mk>

View File

@ -1,37 +1,29 @@
# $NetBSD: Makefile.inc,v 1.29 2002/01/08 04:00:01 tv Exp $
# $NetBSD: Makefile.fdset,v 1.1 2002/02/03 16:22:22 lukem Exp $
# TOP is assumed to be defined by Makefile including this one.
VND?= vnd0
VND_DEV= /dev/${VND}a
VND_RDEV= /dev/r${VND}a
BASENAME?= boot
IMAGE1?= ${BASENAME}1.fs
FSTMP= ustar.tmp
MDEC= ${DESTDIR}/usr/mdec
BOOTCODE?= ${MDEC}/biosboot.sym
#BOOTCODE= ${MDEC}/biosboot_com0.sym # Serial output
STRIP?= strip
MOUNT_POINT?= /mnt
DISKTYPE?= floppy3
DISKSIZE?= 2880
BLOCK8K?= 179
CLEANFILES+= netbsd boot ustar.tmp
realall: unconfig netbsd boot
tar cvf ${FSTMP} boot netbsd
realall: netbsd boot
${PAX} -wvf ${FSTMP} boot netbsd
@echo
@echo Making disk number one
-mv -f ${IMAGE1} ${IMAGE1}.tmp
dd if=/dev/zero of=${IMAGE1}.tmp count=${DISKSIZE}
vnconfig -t ${DISKTYPE} -v -c ${VND} ${IMAGE1}.tmp
disklabel -rw ${VND} ${DISKTYPE}
dd bs=8k seek=1 count=${BLOCK8K} if=${FSTMP} of=${VND_RDEV}
rm -rf empty
mkdir -m 755 empty
${MAKEFS} -s ${DISKSIZE}b ${IMAGE1}.tmp empty
dd bs=8k seek=1 count=$$((${DISKSIZE} / 16 - 1)) \
if=${FSTMP} of=${IMAGE1}.tmp
@echo "installing new bootblocks"
${MDEC}/installboot -b 17 -v -f ${BOOTCODE} ${VND_RDEV}
vnconfig -u ${VND}
${MDEC}/installboot -b 17 -v -f ${BOOTCODE} ${IMAGE1}.tmp
@ls -l ${FSTMP} | (read mode links uid gid size junk; \
dksize=$$((${DISKSIZE} * 512 - 8 * 1024)); \
disks=$$(($$size / $$dksize + 1)); \
@ -42,15 +34,16 @@ realall: unconfig netbsd boot
echo Making disk number $$d.; \
IMAGE=${BASENAME}$${d}.fs; \
echo USTARFS $$d > $${IMAGE}; \
skip=$$((($$d - 1) * ${BLOCK8K})); \
skip=$$((($$d - 1) * (${DISKSIZE} / 16 - 1))); \
if test $$d -eq $$disks; then \
dd bs=8k seek=1 skip=$${skip} \
conv=sync \
if=${FSTMP} of=$${IMAGE}; \
else \
dd bs=8k seek=1 skip=$${skip} \
conv=sync count=${BLOCK8K} \
if=${FSTMP} of=$${IMAGE}; \
conv=sync \
count=$$((${DISKSIZE} / 16 - 1)) \
if=${FSTMP} of=$${IMAGE}; \
fi; \
d=$$(($$d + 1)); \
done; \
@ -85,18 +78,15 @@ netbsd: ${KERN}
boot: ${BOOTCODE}
rm -f boot
cp ${BOOTCODE} boot
strip boot
${STRIP} boot
release:
-mkdir -p ${RELEASEDIR}/installation/floppy
cp -p ${BASENAME}?.fs ${RELEASEDIR}/installation/floppy
unconfig:
-umount -f ${MOUNT_POINT}
-vnconfig -u ${VND}
clean cleandir distclean:
/bin/rm -f *.core ${CLEANFILES} ${BASENAME}?.fs ${IMAGE1}.tmp
rm -f *.core ${CLEANFILES} ${BASENAME}?.fs ${IMAGE1}.tmp
rm -rf empty
.include <bsd.own.mk>
.include <bsd.obj.mk>

View File

@ -0,0 +1,37 @@
# $NetBSD: Makefile.ramdisk,v 1.1 2002/02/03 16:22:22 lukem Exp $
.include "../Makefile.inc"
.include <bsd.own.mk>
.PATH: ${.CURDIR}/../common
WARNS= 1
CRUNCHBIN= ramdiskbin
LISTS= ${.CURDIR}/list ${.CURDIR}/../common/list.ramdisk
MTREECONF= ${.CURDIR}/../common/mtree.conf
IMAGEENDIAN= le
IMAGEDEPENDS+= ${CRUNCHBIN} dot.profile termcap.mini
POPULATEENV+= BOOTMODEL=${BOOTMODEL:Q}
realall: ${IMAGE}
# Use stubs to eliminate some large stuff from libc
HACKSRC=${_SRC_TOP_}/distrib/utils/libhack
.include "${HACKSRC}/Makefile.inc"
# turn off small gethostby* temporarily
HACKOBJS:= ${HACKOBJS:Ngethost.o}
# This is listed in ramdiskbin.conf but is built here.
${CRUNCHBIN}: libhack.o
release:
.include "${_SRC_TOP_}/distrib/common/Makefile.crunch"
.include "${_SRC_TOP_}/distrib/common/Makefile.image"
.include <bsd.prog.mk>

View File

@ -1,4 +1,4 @@
# $NetBSD: dot.profile,v 1.4 2002/01/26 02:34:30 lukem Exp $
# $NetBSD: dot.profile,v 1.1 2002/02/03 16:22:22 lukem Exp $
#
# Copyright (c) 1997 Perry E. Metzger
# Copyright (c) 1994 Christopher G. Demetriou
@ -43,7 +43,7 @@ BLOCKSIZE=1k
export BLOCKSIZE
EDITOR=ed
export EDITOR
BOOTMODEL=small
BOOTMODEL=@BOOTMODEL@
export BOOTMODEL
umask 022
@ -59,15 +59,6 @@ if [ "X${DONEPROFILE}" = "X" ]; then
stty newcrt werase ^W intr ^C kill ^U erase ^? 9600
echo ''
# Create real /dev
echo 'Creating real /dev (this may take a while) ...'
mount -t mfs swap /dev
gzcat /MAKEDEV.gz > /dev/MAKEDEV
cd /dev
sh MAKEDEV all 2> /dev/null
cd ..
echo 'Done.'
# mount the ramdisk read write
mount -u $ROOTDEV /
@ -80,6 +71,11 @@ if [ "X${DONEPROFILE}" = "X" ]; then
dmesg() cat /kern/msgbuf
grep() sed -n "/$1/p"
# run the installation or upgrade script.
sysinst
if [ -x /sysinst ]; then
# run the installation or upgrade script.
sysinst
else
echo "This image contains utilities which may be needed"
echo "to get you out of a pinch."
fi
fi

View File

@ -0,0 +1,21 @@
# $NetBSD: list.ramdisk,v 1.1 2002/02/03 16:22:22 lukem Exp $
# various files that we need in /etc for the install
COPY ${_SRC_TOP_}/etc/group etc/group
COPY ${_SRC_TOP_}/etc/master.passwd etc/master.passwd
COPY ${_SRC_TOP_}/etc/protocols etc/protocols
COPY ${_SRC_TOP_}/etc/netconfig etc/netconfig
COPY ${_SRC_TOP_}/etc/services etc/services
COPY ${_SRC_TOP_}/etc/etc.i386/MAKEDEV dev/MAKEDEV
# we need the boot block in /usr/mdec + the MBR copy
COPY ${DESTDIR}/usr/mdec/biosboot.sym usr/mdec/biosboot.sym
COPY ${DESTDIR}/usr/mdec/mbr usr/mdec/mbr
COPY ${DESTDIR}/usr/mdec/mbr_bootsel usr/mdec/mbr_bootsel
# and the common installation tools
COPY ${CURDIR}/../common/termcap.mini usr/share/misc/termcap
# and the installation tools
CMD sed -e "s/@BOOTMODEL@/${BOOTMODEL}/" < ${CURDIR}/../common/dot.profile > .profile

View File

@ -0,0 +1,38 @@
# $NetBSD: mtree.conf,v 1.1 2002/02/03 16:22:22 lukem Exp $
/set type=dir uname=root gname=wheel mode=0755
.
./.profile type=file mode=0644
./bin
./dev
./dist
./dist/base_obsolete type=file
./dist/comp_obsolete type=file
./dist/etc_obsolete type=file
./dist/games_obsolete type=file
./dist/man_obsolete type=file
./dist/misc_obsolete type=file
./dist/text_obsolete type=file
./dist/xbase_obsolete type=file
./dist/xcomp_obsolete type=file
./dist/xserver_obsolete type=file
./etc
./etc/passwd type=file mode=0644
./mnt
./mnt2
./kern
./sbin
./tmp mode=01777
./usr
./usr/bin
./usr/mdec
./usr/sbin
./usr/share
./usr/share/misc
./var
./var/db
./var/run
./var/log
./var/spool
./var/spool/lock

View File

@ -1,4 +1,4 @@
# $NetBSD: termcap.mini,v 1.1 2000/09/27 16:04:15 fvdl Exp $
# $NetBSD: termcap.mini,v 1.1 2002/02/03 16:22:22 lukem Exp $
#
# Copyright (c) 1980, 1985, 1989 The Regents of the University of California.
# All rights reserved.

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.1 2000/12/14 22:26:06 jmc Exp $
# $NetBSD: Makefile,v 1.2 2002/02/03 16:22:23 lukem Exp $
TOP= ${.CURDIR}/..
@ -11,4 +11,4 @@ KERN!= cd $(.CURDIR)/../kernel-ramdisk/; \
printf "xxx: .MAKE\n\t@echo \$${.OBJDIR}/netbsd.INSTALL.gz\n" | \
${MAKE} -s -f-
.include "${TOP}/fdset-common/Makefile.inc"
.include "${TOP}/common/Makefile.fdset"

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.2 2000/09/27 19:13:52 fvdl Exp $
# $NetBSD: Makefile,v 1.3 2002/02/03 16:22:23 lukem Exp $
TOP= ${.CURDIR}/..
@ -9,4 +9,4 @@ KERN!= cd $(.CURDIR)/../kernel-ramdisk/; \
${MAKE} -s -f-
BASENAME=bootlap
.include "${TOP}/fdset-common/Makefile.inc"
.include "${TOP}/common/Makefile.fdset"

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.5 2000/09/27 16:04:14 fvdl Exp $
# $NetBSD: Makefile,v 1.6 2002/02/03 16:22:22 lukem Exp $
TOP= ${.CURDIR}/..
@ -8,4 +8,4 @@ KERN!= cd $(.CURDIR)/../kernel-ramdisk/; \
printf "xxx: .MAKE\n\t@echo \$${.OBJDIR}/netbsd.INSTALL.gz\n" | \
${MAKE} -s -f-
.include "${TOP}/fdset-common/Makefile.inc"
.include "${TOP}/common/Makefile.fdset"

View File

@ -1,65 +1,51 @@
# $NetBSD: Makefile,v 1.7 2002/01/27 15:31:57 lukem Exp $
# $NetBSD: Makefile,v 1.8 2002/02/03 16:22:24 lukem Exp $
.include "../Makefile.inc"
.include <bsd.kernobj.mk>
.include <bsd.own.mk>
RAMDISK!= cd $(.CURDIR)/../ramdisk-big/; \
printf "xxx: .MAKE\n\t@echo \$${.OBJDIR}/ramdisk-big.fs\n" | \
${MAKE} -s -f-
RAMDISK_T!= cd ${.CURDIR}/../ramdisk-tiny/; \
printf "xxx: .MAKE\n\t@echo \$${.OBJDIR}/ramdisk-tiny.fs\n" | \
${MAKE} -s -f-
RAMDISK_S!= cd ${.CURDIR}/../ramdisk-small/; \
printf "xxx: .MAKE\n\t@echo \$${.OBJDIR}/ramdisk-small.fs\n" | \
${MAKE} -s -f-
# create ${RAMDISK_*} variables
#
RAMDISKS= RAMDISK_B ramdisk-big \
RAMDISK_S ramdisk-small \
RAMDISK_T ramdisk-tiny
netbsd.INSTALL.gz: .NOTMAIN ${KERNOBJDIR}/INSTALL/netbsd ${RAMDISK}
cp ${KERNOBJDIR}/INSTALL/netbsd netbsd.tmp
${MDSETIMAGE} -v netbsd.tmp ${RAMDISK}
${NM} netbsd.tmp > netbsd.INSTALL.symbols
${STRIP} netbsd.tmp
gzip -9 netbsd.tmp
mv netbsd.tmp.gz ${.TARGET}
.for V F in ${RAMDISKS}
${V}!= cd ${.CURDIR}/../${F}/; \
printf "xxx: .MAKE\n\t@echo \$${.OBJDIR}/${F}.fs\n" | \
${MAKE} -s -f-
.endfor
netbsd.INSTALL_LAPTOP.gz: .NOTMAIN ${KERNOBJDIR}/INSTALL_LAPTOP/netbsd ${RAMDISK}
cp ${KERNOBJDIR}/INSTALL_LAPTOP/netbsd netbsd.tmp
${MDSETIMAGE} -v netbsd.tmp ${RAMDISK}
${NM} netbsd.tmp > netbsd.INSTALL_LAPTOP.symbols
${STRIP} netbsd.tmp
gzip -9 netbsd.tmp
mv netbsd.tmp.gz ${.TARGET}
# create netbsd.*.gz targets
#
# TARGETS is a list of:
# KERNEL_name fs-image "nocluster" disables clustering
#
TARGETS= INSTALL ${RAMDISK_B} - \
INSTALL_LAPTOP ${RAMDISK_B} - \
INSTALL_SMALL ${RAMDISK_S} - \
INSTALL_TINY ${RAMDISK_T} nocluster \
INSTALL_PS2 ${RAMDISK_S} nocluster
netbsd.INSTALL_TINY.gz: .NOTMAIN ${KERNOBJDIR}/INSTALL_TINY/netbsd ${RAMDISK_T}
cp ${KERNOBJDIR}/INSTALL_TINY/netbsd netbsd.tmp
.for K R E in ${TARGETS}
_E:=${E} # work around obscure issue in make(1)
KERNELS+= netbsd.${K}.gz
KERNELSYMS+= netbsd.${K}.symbols
netbsd.${K}.gz: .NOTMAIN ${KERNOBJDIR}/${K}/netbsd ${R}
@echo "Populating ${K} with ${R}"
cp ${KERNOBJDIR}/${K}/netbsd netbsd.tmp
.if ${_E} == "nocluster"
gdb --write -batch -x ${.CURDIR}/nocluster.gdb netbsd.tmp </dev/null
${MDSETIMAGE} -v netbsd.tmp ${RAMDISK_T}
${NM} netbsd.tmp > netbsd.INSTALL_TINY.symbols
.endif
${MDSETIMAGE} -v netbsd.tmp ${R}
${NM} netbsd.tmp > netbsd.${K}.symbols
${STRIP} netbsd.tmp
gzip -9 netbsd.tmp
mv netbsd.tmp.gz ${.TARGET}
.endfor
netbsd.INSTALL_SMALL.gz: .NOTMAIN ${KERNOBJDIR}/INSTALL_SMALL/netbsd ${RAMDISK_S}
cp ${KERNOBJDIR}/INSTALL_SMALL/netbsd netbsd.tmp
${MDSETIMAGE} -v netbsd.tmp ${RAMDISK_S}
${NM} netbsd.tmp > netbsd.INSTALL_SMALL.symbols
${STRIP} netbsd.tmp
gzip -9 netbsd.tmp
mv netbsd.tmp.gz ${.TARGET}
netbsd.INSTALL_PS2.gz: .NOTMAIN ${KERNOBJDIR}/INSTALL_PS2/netbsd ${RAMDISK_S}
cp ${KERNOBJDIR}/INSTALL_PS2/netbsd netbsd.tmp
gdb --write -batch -x ${.CURDIR}/nocluster.gdb netbsd.tmp </dev/null
${MDSETIMAGE} -v netbsd.tmp ${RAMDISK_S}
${NM} netbsd.tmp > netbsd.INSTALL_PS2.symbols
${STRIP} netbsd.tmp
gzip -9 netbsd.tmp
mv netbsd.tmp.gz ${.TARGET}
KERNELS=netbsd.INSTALL.gz netbsd.INSTALL_TINY.gz netbsd.INSTALL_SMALL.gz \
netbsd.INSTALL_LAPTOP.gz netbsd.INSTALL_PS2.gz
KERNELSYMS=${KERNELS:S/.gz$/.symbols/}
# do the work
#
all: ${KERNELS}
release:
@ -70,3 +56,4 @@ clean cleandir distclean:
rm -f *.core netbsd.tmp ${KERNELS} ${KERNELSYMS}
.include <bsd.obj.mk>
.include <bsd.prog.mk>

View File

@ -1,47 +1,49 @@
# $NetBSD: Makefile,v 1.4 2001/10/21 23:23:20 jmc Exp $
# $NetBSD: Makefile,v 1.5 2002/02/03 16:22:24 lukem Exp $
TOP= ${.CURDIR}/..
.include "${TOP}/Makefile.inc"
.include "../Makefile.inc"
.include <bsd.kernobj.mk>
.include <bsd.own.mk>
MDEC= ${DESTDIR}/usr/mdec
MDSETIMAGE?= ${DESTDIR}/usr/sbin/mdsetimage
STRIP?= strip
# create ${RAMDISK_*} variables
#
RAMDISKS= RAMDISK_S ramdisk-rescuesmall \
RAMDISK_T ramdisk-rescuetiny
RAMDISK_T!= cd ${.CURDIR}/../ramdisk-rescuetiny/; \
printf "xxx: .MAKE\n\t@echo \$${.OBJDIR}/ramdisk-rescuetiny.fs\n" | \
${MAKE} -s -f-
RAMDISK_S!= cd ${.CURDIR}/../ramdisk-rescuesmall/; \
printf "xxx: .MAKE\n\t@echo \$${.OBJDIR}/ramdisk-rescuesmall.fs\n" | \
.for V F in ${RAMDISKS}
${V}!= cd ${.CURDIR}/../${F}/; \
printf "xxx: .MAKE\n\t@echo \$${.OBJDIR}/${F}.fs\n" | \
${MAKE} -s -f-
.endfor
netbsd.INSTALL_TINY.gz: .NOTMAIN ${KERNOBJDIR}/INSTALL_TINY/netbsd ${RAMDISK_T}
cp ${KERNOBJDIR}/INSTALL_TINY/netbsd netbsd.tmp
${MDSETIMAGE} -v netbsd.tmp ${RAMDISK_T}
nm netbsd.tmp > netbsd.INSTALL_TINY.symbols
# create netbsd.*.gz targets
#
# TARGETS is a list of:
# KERNEL_name fs-image
#
TARGETS= INSTALL_SMALL ${RAMDISK_S} \
INSTALL_TINY ${RAMDISK_T}
.for K R in ${TARGETS}
KERNELS+= netbsd.${K}.gz
KERNELSYMS+= netbsd.${K}.symbols
netbsd.${K}.gz: .NOTMAIN ${KERNOBJDIR}/${K}/netbsd ${R}
@echo "Populating ${K} with ${R}"
cp ${KERNOBJDIR}/${K}/netbsd netbsd.tmp
${MDSETIMAGE} -v netbsd.tmp ${R}
${NM} netbsd.tmp > netbsd.${K}.symbols
${STRIP} netbsd.tmp
gzip -9 netbsd.tmp
mv netbsd.tmp.gz ${.TARGET}
.endfor
netbsd.INSTALL_SMALL.gz: .NOTMAIN ${KERNOBJDIR}/INSTALL_SMALL/netbsd ${RAMDISK_S}
cp ${KERNOBJDIR}/INSTALL_SMALL/netbsd netbsd.tmp
${MDSETIMAGE} -v netbsd.tmp ${RAMDISK_S}
nm netbsd.tmp > netbsd.INSTALL_SMALL.symbols
${STRIP} netbsd.tmp
gzip -9 netbsd.tmp
mv netbsd.tmp.gz ${.TARGET}
KERNELS=netbsd.INSTALL_TINY.gz netbsd.INSTALL_SMALL.gz
# do the work
#
all: ${KERNELS}
release:
clean cleandir distclean:
rm -f *.core ${KERNELS} netbsd.INSTALL_TINY.symbols \
netbsd.INSTALL_SMALL.symbols
rm -f *.core netbsd.tmp ${KERNELS} ${KERNELSYMS}
.include <bsd.obj.mk>
.include <bsd.subdir.mk>
.include <bsd.prog.mk>

View File

@ -1,55 +0,0 @@
# $NetBSD: list2sh.awk,v 1.5 1996/10/09 00:13:36 jtc Exp $
BEGIN {
printf("cd ${CURDIR}\n");
printf("\n");
}
/^$/ || /^#/ {
print $0;
next;
}
$1 == "COPY" {
printf("echo '%s'\n", $0);
printf("rm -f ${TARGDIR}/%s\n", $3);
printf("cp %s ${TARGDIR}/%s\n", $2, $3);
next;
}
$1 == "LINK" {
printf("echo '%s'\n", $0);
printf("rm -f ${TARGDIR}/%s\n", $3);
printf("(cd ${TARGDIR}; ln %s %s)\n", $2, $3);
next;
}
$1 == "SYMLINK" {
printf("echo '%s'\n", $0);
printf("rm -f ${TARGDIR}/%s\n", $3);
printf("(cd ${TARGDIR}; ln -s %s %s)\n", $2, $3);
next;
}
$1 == "COPYDIR" {
printf("echo '%s'\n", $0);
printf("(cd ${TARGDIR}/%s && find . ! -name . | xargs /bin/rm -rf)\n",
$3);
printf("(cd %s && find . ! -name . | cpio -pdamu ${TARGDIR}/%s)\n", $2,
$3);
next;
}
$1 == "SPECIAL" {
printf("echo '%s'\n", $0);
printf("(cd ${TARGDIR};");
for (i = 2; i <= NF; i++)
printf(" %s", $i);
printf(")\n");
next;
}
{
printf("echo '%s'\n", $0);
printf("echo 'Unknown keyword \"%s\" at line %d of input.'\n", $1, NR);
printf("exit 1\n");
exit 1;
}
END {
printf("\n");
printf("exit 0\n");
exit 0;
}

View File

@ -1,87 +1,8 @@
# $NetBSD: Makefile,v 1.13 2001/11/19 05:31:00 jmc Exp $
# $NetBSD: Makefile,v 1.14 2002/02/03 16:22:24 lukem Exp $
TOP= ${.CURDIR}/..
WARNS=1
BOOTMODEL= big
IMAGE= ramdisk-${BOOTMODEL}.fs
IMAGESIZE= 2048k
IMAGEDEPENDS= disktab.preinstall
.include "${TOP}/Makefile.inc"
IMAGE= ramdisk-big.fs
AUXDEPENDS= dot.profile dot.hdprofile disktab.preinstall \
termcap.mini
CBIN= ramdiskbin
MOUNT_POINT?= /mnt
# DEV/RDEV file system device
VND?= vnd0
VND_DEV= /dev/${VND}a
VND_RDEV= /dev/r${VND}a
IMAGE?= xxx.fs
MDEC= ${DESTDIR}/usr/mdec
LISTS= list
CRUNCHCONF= ${CBIN}.conf
MTREECONF= mtree.conf
CRUNCHGEN?= crunchgen
MTREE?= mtree
RAMDISKSPC= 128
RAMDISKCYLS= 32
RAMDISKSIZE!= expr ${RAMDISKSPC} \* ${RAMDISKCYLS}
DBG?=-Os
realall: ${IMAGE}
${IMAGE}: ${CBIN} ${AUXDEPENDS} ${MTREECONF} ${LISTS}
rm -f ${IMAGE}.tmp
dd if=/dev/zero of=${IMAGE}.tmp count=${RAMDISKSIZE}
vnconfig -v -c ${VND} ${IMAGE}.tmp \
512/${RAMDISKSPC}/1/${RAMDISKCYLS}
-disklabel ${VND} >tmplabel
disklabel -r -R ${VND} tmplabel
newfs -B le -m 0 -o space -i 3950 -c 80 ${VND_RDEV}
mount ${VND_DEV} ${MOUNT_POINT}
${MTREE} -def ${.CURDIR}/${MTREECONF} -p ${MOUNT_POINT}/ -U
TOPDIR=${TOP} CURDIR=${.CURDIR} OBJDIR=${.OBJDIR} \
TARGDIR=${MOUNT_POINT} sh ${TOP}/runlist.sh ${.CURDIR}/${LISTS}
@echo ""
@df -i ${MOUNT_POINT}
@echo ""
umount ${MOUNT_POINT}
vnconfig -u ${VND}
mv -f ${IMAGE}.tmp ${IMAGE}
unconfig:
-umount -f ${MOUNT_POINT}
-vnconfig -u ${VND}
-/bin/rm -f ${IMAGE} ${IMAGE}.tmp
${CBIN}.mk ${CBIN}.cache ${CBIN}.c: ${CRUNCHCONF}
${CRUNCHGEN} -f -D ${TOP}/../../.. -L ${DESTDIR}/usr/lib ${.ALLSRC}
${CBIN}: ${CBIN}.mk ${CBIN}.cache ${CBIN}.c
${MAKE} -f ${CBIN}.mk all
# This is listed in ramdiskbin.conf but is built here.
${CBIN}: libhack.o
# Use stubs to eliminate some large stuff from libc
HACKSRC=${TOP}/../../utils/libhack
.include "${HACKSRC}/Makefile.inc"
# turn off small gethostby* temporarily
HACKOBJS:= getcap.o getgrent.o getnet.o getnetgr.o getpwent.o setlocale.o yplib.o
release:
clean cleandir distclean:
if [ -f ${CBIN}.mk ]; then ${MAKE} -f ${CBIN}.mk clean; fi; \
/bin/rm -f *.core ${IMAGE} ${IMAGE}.tmp ${CBIN} \
${CBIN}.mk ${CBIN}.cache *.o *.cro *.c tmplabel
.include <bsd.own.mk>
.include <bsd.obj.mk>
.include <bsd.subdir.mk>
.include <bsd.sys.mk>
.include <bsd.prog.mk>
.include "../common/Makefile.ramdisk"

View File

@ -1,62 +0,0 @@
# $NetBSD: dot.hdprofile,v 1.1 2000/09/27 16:04:15 fvdl Exp $
#
# Copyright (c) 1994 Christopher G. Demetriou
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. All advertising materials mentioning features or use of this software
# must display the following acknowledgement:
# This product includes software developed for the
# NetBSD Project. See http://www.netbsd.org/ for
# information about NetBSD.
# 4. The name of the author may not be used to endorse or promote products
# derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# <<Id: LICENSE,v 1.2 2000/06/14 15:57:33 cgd Exp>>
PATH=/sbin:/bin:/usr/bin:/usr/sbin:/
export PATH
TERM=pc3
export TERM
HOME=/
export HOME
umask 022
if [ "X${DONEPROFILE}" = "X" ]; then
DONEPROFILE=YES
export DONEPROFILE
echo "Checking filesystems..."
fsck -y
echo "Mounting root..."
mount -u /
# set up some sane defaults
echo 'erase ^?, werase ^W, kill ^U, intr ^C'
stty newcrt werase ^W intr ^C kill ^U erase ^? 9600
echo ''
TERMCAP=/.termcap ; export TERMCAP
[ -x /sysinst ] && /sysinst
fi

View File

@ -1,85 +0,0 @@
# $NetBSD: dot.profile,v 1.3 2001/07/30 22:43:36 jdolecek Exp $
#
# Copyright (c) 1997 Perry E. Metzger
# Copyright (c) 1994 Christopher G. Demetriou
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. All advertising materials mentioning features or use of this software
# must display the following acknowledgement:
# This product includes software developed for the
# NetBSD Project. See http://www.netbsd.org/ for
# information about NetBSD.
# 4. The name of the author may not be used to endorse or promote products
# derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# <<Id: LICENSE,v 1.2 2000/06/14 15:57:33 cgd Exp>>
PATH=/sbin:/bin:/usr/bin:/usr/sbin:/
export PATH
TERM=pc3
export TERM
HOME=/
export HOME
BLOCKSIZE=1k
export BLOCKSIZE
EDITOR=ed
export EDITOR
BOOTMODEL=big
export BOOTMODEL
umask 022
ROOTDEV=/dev/md0a
if [ "X${DONEPROFILE}" = "X" ]; then
DONEPROFILE=YES
export DONEPROFILE
# set up some sane defaults
echo 'erase ^?, werase ^W, kill ^U, intr ^C'
stty newcrt werase ^W intr ^C kill ^U erase ^? 9600
echo ''
# Create real /dev
echo 'Creating real /dev (this may take a while) ...'
mount -t mfs swap /dev
gzcat /MAKEDEV.gz > /dev/MAKEDEV
cd /dev
sh MAKEDEV all 2> /dev/null
cd ..
echo 'Done.'
# mount the ramdisk read write
mount -u $ROOTDEV /
# mount the kern_fs so that we can examine the dmesg state
mount -t kernfs /kern /kern
# pull in the functions that people will use from the shell prompt.
# . /.commonutils
# . /.instutils
dmesg() cat /kern/msgbuf
grep() sed -n "/$1/p"
# run the installation or upgrade script.
sysinst
fi

View File

@ -1,114 +1,98 @@
# $NetBSD: list,v 1.7 2001/08/18 16:03:48 tv Exp $
# $NetBSD: list,v 1.8 2002/02/03 16:22:24 lukem Exp $
#
SRCDIRS bin sbin usr.bin/less usr.bin usr.sbin gnu/usr.bin sys/arch/i386/stand
PROG sysinst
PROG bin/cat
PROG bin/chio
PROG bin/chmod
PROG bin/cp
PROG bin/dd
PROG bin/df
PROG bin/ed
PROG bin/ln
PROG bin/ls
PROG bin/mkdir
PROG bin/mt
PROG bin/mv
PROG bin/pax usr/bin/tar
PROG bin/pwd
PROG bin/rcmd
PROG bin/rm
PROG bin/sh
PROG bin/stty
PROG bin/sync
# XXX: test removed (builtin to sh)
PROG sbin/dhclient
PROG sbin/disklabel
PROG sbin/fdisk
PROG sbin/fsck
PROG sbin/fsck_ffs
PROG sbin/ifconfig
PROG sbin/init
PROG sbin/mbrlabel
PROG sbin/mknod
PROG sbin/mount
PROG sbin/mount_cd9660
PROG sbin/mount_ext2fs
PROG sbin/mount_ffs
PROG sbin/mount_kernfs
PROG sbin/mount_msdos
PROG sbin/mount_nfs
PROG sbin/mount_ntfs
PROG sbin/newfs sbin/mount_mfs
PROG sbin/ping
PROG sbin/ping6
PROG sbin/reboot sbin/halt
PROG sbin/restore sbin/rrestore
PROG sbin/route
PROG sbin/rtsol
PROG sbin/scsictl
PROG sbin/shutdown
PROG sbin/slattach
PROG sbin/swapctl
PROG sbin/umount
# XXX: restore added
PROG usr/bin/ftp
PROG usr/bin/gzip usr/bin/gzcat usr/bin/gunzip
PROG usr/bin/less usr/bin/more
PROG usr/bin/sed
PROG usr/bin/tip
PROG usr/mdec/installboot
PROG usr/sbin/bad144
PROG usr/sbin/chown usr/bin/chgrp
PROG usr/sbin/chroot
PROG usr/sbin/wiconfig
# init invokes the shell as -sh
ARGVLN sh -sh
SPECIAL dhclient srcdir distrib/utils/x_dhclient
SPECIAL ftp srcdir distrib/utils/x_ftp
SPECIAL ifconfig srcdir distrib/utils/x_ifconfig
SPECIAL ping srcdir distrib/utils/x_ping
SPECIAL ping6 srcdir distrib/utils/x_ping6
SPECIAL route srcdir distrib/utils/x_route
SPECIAL sh srcdir distrib/utils/x_sh
SPECIAL sysinst srcdir distrib/utils/sysinst/arch/i386
# libhack.o is built by Makefile & included Makefile.inc
LIBS libhack.o -lbz2 -ledit -lutil -lcurses -ltermcap -lrmt -lcrypt -ll -lm
# various files that we need in /etc for the install
COPY ${CURDIR}/../../../../etc/group etc/group
COPY ${CURDIR}/../../../../etc/master.passwd etc/master.passwd
COPY ${CURDIR}/../../../../etc/protocols etc/protocols
COPY ${CURDIR}/../../../../etc/netconfig etc/netconfig
COPY ${CURDIR}/../../../../etc/services etc/services
COPY ${CURDIR}/../../../../usr.sbin/dhcp/clientscript/dhclient-script sbin/dhclient-script
SPECIAL pwd_mkdb -p -d ./ etc/master.passwd
SPECIAL /bin/rm etc/spwd.db
SPECIAL /bin/rm etc/pwd.db
# copy the crunched binary, link to it, and kill it
COPY ${OBJDIR}/ramdiskbin ramdiskbin
LINK ramdiskbin sysinst
LINK ramdiskbin bin/cat
LINK ramdiskbin bin/chio
LINK ramdiskbin bin/chmod
LINK ramdiskbin bin/cp
LINK ramdiskbin bin/dd
LINK ramdiskbin bin/df
LINK ramdiskbin bin/ed
LINK ramdiskbin bin/ln
LINK ramdiskbin bin/ls
LINK ramdiskbin bin/mkdir
LINK ramdiskbin bin/mt
LINK ramdiskbin bin/mv
LINK ramdiskbin bin/pax
LINK ramdiskbin bin/pwd
LINK ramdiskbin bin/rcmd
LINK ramdiskbin bin/rm
LINK ramdiskbin bin/sh
LINK ramdiskbin bin/stty
LINK ramdiskbin bin/sync
LINK ramdiskbin sbin/cd9660
LINK ramdiskbin sbin/dhclient
LINK ramdiskbin sbin/dump
LINK ramdiskbin sbin/disklabel
LINK ramdiskbin sbin/fdisk
LINK ramdiskbin sbin/ffs
LINK ramdiskbin sbin/fsck
LINK ramdiskbin sbin/fsck_ffs
LINK ramdiskbin sbin/halt
LINK ramdiskbin sbin/ifconfig
LINK ramdiskbin sbin/init
LINK ramdiskbin sbin/kernfs
LINK ramdiskbin sbin/mbrlabel
LINK ramdiskbin sbin/mknod
LINK ramdiskbin sbin/mount
LINK ramdiskbin sbin/mount_cd9660
LINK ramdiskbin sbin/mount_ext2fs
LINK ramdiskbin sbin/mount_ffs
LINK ramdiskbin sbin/mount_mfs
LINK ramdiskbin sbin/mount_kernfs
LINK ramdiskbin sbin/mount_msdos
LINK ramdiskbin sbin/mount_nfs
LINK ramdiskbin sbin/mount_ntfs
LINK ramdiskbin sbin/msdos
LINK ramdiskbin sbin/newfs
LINK ramdiskbin sbin/nfs
LINK ramdiskbin sbin/ntfs
LINK ramdiskbin sbin/ping
LINK ramdiskbin sbin/ping6
LINK ramdiskbin sbin/rdump
LINK ramdiskbin sbin/reboot
LINK ramdiskbin sbin/restore
LINK ramdiskbin sbin/route
LINK ramdiskbin sbin/rrestore
LINK ramdiskbin sbin/rtsol
LINK ramdiskbin sbin/scsictl
LINK ramdiskbin sbin/shutdown
LINK ramdiskbin sbin/slattach
LINK ramdiskbin sbin/swapctl
LINK ramdiskbin sbin/umount
LINK ramdiskbin usr/bin/chgrp
LINK ramdiskbin usr/bin/ftp
LINK ramdiskbin usr/bin/gunzip
LINK ramdiskbin usr/bin/gzcat
LINK ramdiskbin usr/bin/gzip
LINK ramdiskbin usr/bin/less
LINK ramdiskbin usr/bin/more
LINK ramdiskbin usr/bin/sed
LINK ramdiskbin usr/bin/tar
LINK ramdiskbin usr/bin/tip
LINK ramdiskbin usr/mdec/installboot
LINK ramdiskbin usr/sbin/bad144
LINK ramdiskbin usr/sbin/chown
LINK ramdiskbin usr/sbin/chroot
LINK ramdiskbin usr/sbin/wiconfig
SPECIAL /bin/rm ramdiskbin
# make some devices
SPECIAL cd dev; sh ${CURDIR}/../../../../etc/etc.i386/MAKEDEV std
SPECIAL gzip -9 -c ${CURDIR}/../../../../etc/etc.i386/MAKEDEV > MAKEDEV.gz
COPY ${_SRC_TOP_}/usr.sbin/dhcp/clientscript/dhclient-script sbin/dhclient-script
# we need the boot block in /usr/mdec + the MBR copy
COPY ${DESTDIR}/usr/mdec/biosboot_com0.sym usr/mdec/biosboot_com0.sym
COPY ${DESTDIR}/usr/mdec/biosboot.sym usr/mdec/biosboot.sym
COPY ${DESTDIR}/usr/mdec/mbr usr/mdec/mbr
COPY ${DESTDIR}/usr/mdec/mbr_bootsel usr/mdec/mbr_bootsel
# and the common installation tools
COPY ${CURDIR}/termcap.mini usr/share/misc/termcap
# the disktab explanation file
COPY ${CURDIR}/disktab.preinstall etc/disktab.preinstall
COPY ${CURDIR}/disktab.preinstall etc/disktab.preinstall
#the lists of obsolete files used by sysinst
SPECIAL sh ${CURDIR}/../../../../distrib/sets/makeobsolete -b -s ${CURDIR}/../../../../distrib/sets -t ./dist
# and the installation tools
COPY ${CURDIR}/dot.profile .profile
# the lists of obsolete files used by sysinst
CMD sh ${_SRC_TOP_}/distrib/sets/makeobsolete -b -s ${_SRC_TOP_}/distrib/sets -t ./dist

View File

@ -1,108 +0,0 @@
# $NetBSD: mtree.conf,v 1.2 2000/12/24 23:50:48 jmc 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
..
# ./var
var
# ./var/db
db
# ./var/db
..
# ./var
run
# ./var/run
..
# ./var/log
log
# ./var/log
..
# ./var/spool
spool
# ./var/spool/lock
lock
# ./var/spool/lock
..
# ./var/spool
..
# ./var
..

View File

@ -1,52 +0,0 @@
# $NetBSD: ramdiskbin.conf,v 1.6 2001/05/26 16:01:03 christos Exp $
#
# ramdiskbin.conf - unified binary for the install ramdisk
#
srcdirs bin sbin usr.bin/less usr.bin usr.sbin gnu/usr.bin sys/arch/i386/stand
progs bad144 cat chio chmod chown chroot cp dd df disklabel ed
progs fsck fsck_ffs ftp gzip ifconfig wiconfig init installboot less
progs ln ls mkdir mknod
progs mount mount_cd9660 mount_ext2fs mount_ffs mount_msdos mount_ntfs
progs mount_nfs mount_kernfs mt mv newfs ping pwd rcmd reboot rm
progs route scsictl sed sh shutdown slattach stty swapctl sync test
progs tip umount
progs sysinst pax
progs fdisk mbrlabel
progs ping6 rtsol
progs dhclient
special sysinst srcdir distrib/utils/sysinst/arch/i386
special init srcdir distrib/utils/init_s
special dd srcdir distrib/utils/x_dd
special ftp srcdir distrib/utils/x_ftp
special ifconfig srcdir distrib/utils/x_ifconfig
special route srcdir distrib/utils/x_route
special sh srcdir distrib/utils/x_sh
special ping srcdir distrib/utils/x_ping
special ping6 srcdir distrib/utils/x_ping6
special dhclient srcdir distrib/utils/x_dhclient
# "special" gzip is actually larger assuming nothing else uses -lz..
#special gzip srcdir distrib/utils/x_gzip
ln pax tar
ln chown chgrp
ln gzip gzcat gunzip
ln less more
ln sh -sh # init invokes the shell this way
ln test [
ln mount_cd9660 cd9660
ln mount_ffs ffs
ln mount_msdos msdos
ln mount_nfs nfs
ln mount_kernfs kernfs
ln mount_ntfs ntfs
ln reboot halt
ln newfs mount_mfs
# libhack.o is built by Makefile & included Makefile.inc
libs libhack.o -lbz2 -ledit -lutil -lcurses -ltermcap -lrmt -lcrypt -ll -lm

View File

@ -1,85 +1,7 @@
# $NetBSD: Makefile,v 1.16 2001/12/02 01:43:12 jmc Exp $
# $NetBSD: Makefile,v 1.17 2002/02/03 16:22:25 lukem Exp $
TOP= ${.CURDIR}/..
WARNS=1
BOOTMODEL= small
IMAGE= ramdisk-rescue${BOOTMODEL}.fs
IMAGESIZE= 1320k
.include "${TOP}/Makefile.inc"
IMAGE= ramdisk-rescuesmall.fs
AUXDEPENDS= dot.profile termcap.mini
CBIN= ramdiskbin
MOUNT_POINT?= /mnt
# DEV/RDEV file system device
VND?= vnd0
VND_DEV= /dev/${VND}a
VND_RDEV= /dev/r${VND}a
IMAGE?= xxx.fs
MDEC= ${DESTDIR}/usr/mdec
LISTS= list
CRUNCHCONF= ${CBIN}.conf
MTREECONF= mtree.conf
CRUNCHGEN?= crunchgen
MTREE?= mtree
RAMDISKSPC= 165
RAMDISKCYLS= 16
RAMDISKSIZE!= expr ${RAMDISKSPC} \* ${RAMDISKCYLS}
DBG?=-Os
realall: ${IMAGE}
${IMAGE}: ${CBIN} ${AUXDEPENDS} ${MTREECONF} ${LISTS}
rm -f ${IMAGE}.tmp
dd if=/dev/zero of=${IMAGE}.tmp count=${RAMDISKSIZE}
vnconfig -v -c ${VND} ${IMAGE}.tmp 512/${RAMDISKSPC}/1/${RAMDISKCYLS}
-disklabel ${VND} >tmplabel
disklabel -r -R ${VND} tmplabel
newfs -B le -m 0 -o space -i 32768 -c 80 ${VND_RDEV}
mount ${VND_DEV} ${MOUNT_POINT}
${MTREE} -def ${.CURDIR}/${MTREECONF} -p ${MOUNT_POINT}/ -U
TOPDIR=${TOP} CURDIR=${.CURDIR} OBJDIR=${.OBJDIR} \
TARGDIR=${MOUNT_POINT} sh ${TOP}/runlist.sh ${.CURDIR}/${LISTS}
@echo ""
@df -i ${MOUNT_POINT}
@echo ""
umount ${MOUNT_POINT}
vnconfig -u ${VND}
mv -f ${IMAGE}.tmp ${IMAGE}
unconfig:
-umount -f ${MOUNT_POINT}
-vnconfig -u ${VND}
-/bin/rm -f ${IMAGE}.tmp
${CBIN}.mk ${CBIN}.cache ${CBIN}.c: ${CRUNCHCONF}
${CRUNCHGEN} -f -D ${TOP}/../../.. -L ${DESTDIR}/usr/lib ${.ALLSRC}
${CBIN}: ${CBIN}.mk ${CBIN}.cache ${CBIN}.c
${MAKE} -f ${CBIN}.mk all
# This is listed in ramdiskbin.conf but is built here.
${CBIN}: libhack.o
# Use stubs to eliminate some large stuff from libc
HACKSRC=${TOP}/../../utils/libhack
.include "${HACKSRC}/Makefile.inc"
# turn off small gethostby*
HACKOBJS:= getcap.o getgrent.o getnet.o getnetgr.o getpwent.o setlocale.o yplib.o
release:
clean cleandir distclean:
if [ -f ${CBIN}.mk ]; then ${MAKE} -f ${CBIN}.mk clean; fi; \
/bin/rm -f ${AUXCLEAN} *.core ${IMAGE} ${CBIN} ${CBIN}.mk ${CBIN}.cache \
*.o *.cro *.c tmplabel
.include <bsd.own.mk>
.include <bsd.obj.mk>
.include <bsd.subdir.mk>
.include <bsd.sys.mk>
.include <bsd.prog.mk>
.include "../common/Makefile.ramdisk"

View File

@ -1,72 +0,0 @@
# $NetBSD: dot.profile,v 1.3 2001/07/30 22:43:36 jdolecek Exp $
#
# Copyright (c) 1994 Christopher G. Demetriou
# Copyright (c) 1997 Perry E. Metzger
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. All advertising materials mentioning features or use of this software
# must display the following acknowledgement:
# This product includes software developed by Christopher G. Demetriou.
# 4. The name of the author may not be used to endorse or promote products
# derived from this software without specific prior written permission
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
PATH=/sbin:/bin:/usr/bin:/usr/sbin:/
export PATH
TERM=pc3
export TERM
HOME=/
export HOME
BLOCKSIZE=1k
export BLOCKSIZE
EDITOR=ed
export EDITOR
umask 022
ROOTDEV=/dev/md0a
if [ "X${DONEPROFILE}" = "X" ]; then
DONEPROFILE=YES
export DONEPROFILE
# set up some sane defaults
echo 'erase ^?, werase ^W, kill ^U, intr ^C'
stty newcrt werase ^W intr ^C kill ^U erase ^? 9600
echo ''
# Create real /dev
echo 'Creating real /dev (this may take a while) ...'
mount -t mfs swap /dev
gzcat /MAKEDEV.gz > /dev/MAKEDEV
cd /dev
sh MAKEDEV all 2> /dev/null
cd ..
echo 'Done.'
# mount the ramdisk read write
mount -u $ROOTDEV /
echo "This image contains utilities which may be needed"
echo "to get you out of a pinch."
fi

View File

@ -1,95 +1,78 @@
# $NetBSD: list,v 1.3 2001/01/24 18:18:57 jmc Exp $
# $NetBSD: list,v 1.4 2002/02/03 16:22:25 lukem Exp $
#
# various files that we need in /etc for the install
COPY ${CURDIR}/../../../../etc/group etc/group
COPY ${CURDIR}/../../../../etc/master.passwd etc/master.passwd
COPY ${CURDIR}/../../../../etc/protocols etc/protocols
COPY ${CURDIR}/../../../../etc/netconfig etc/netconfig
COPY ${CURDIR}/../../../../etc/services etc/services
SRCDIRS bin sbin usr.bin usr.sbin gnu/usr.bin sys/arch/i386/stand
SPECIAL pwd_mkdb -p -d ./ etc/master.passwd
SPECIAL /bin/rm etc/spwd.db
SPECIAL /bin/rm etc/pwd.db
PROG bin/cat
PROG bin/chio
PROG bin/chmod
PROG bin/cp
PROG bin/dd
PROG bin/df
PROG bin/ed
PROG bin/ln
PROG bin/ls
PROG bin/mkdir
PROG bin/mt
PROG bin/mv
PROG bin/pax usr/bin/tar
PROG bin/pwd
PROG bin/rcmd
PROG bin/rm
PROG bin/sh
PROG bin/stty
PROG bin/sync
# XXX: added: chio
# copy the crunched binary, link to it, and kill it
COPY ${OBJDIR}/ramdiskbin ramdiskbin
LINK ramdiskbin bin/cat
LINK ramdiskbin bin/chio
LINK ramdiskbin bin/chmod
LINK ramdiskbin bin/cp
LINK ramdiskbin bin/dd
LINK ramdiskbin bin/df
LINK ramdiskbin bin/ed
LINK ramdiskbin bin/ln
LINK ramdiskbin bin/ls
LINK ramdiskbin bin/mkdir
LINK ramdiskbin bin/mt
LINK ramdiskbin bin/mv
LINK ramdiskbin bin/pax
LINK ramdiskbin bin/pwd
LINK ramdiskbin bin/rcmd
LINK ramdiskbin bin/rm
LINK ramdiskbin bin/sh
LINK ramdiskbin bin/stty
LINK ramdiskbin bin/sync
LINK ramdiskbin sbin/disklabel
LINK ramdiskbin sbin/dump
LINK ramdiskbin sbin/fdisk
LINK ramdiskbin sbin/fsck
LINK ramdiskbin sbin/fsck_ffs
LINK ramdiskbin sbin/halt
LINK ramdiskbin sbin/ifconfig
LINK ramdiskbin sbin/init
LINK ramdiskbin sbin/mbrlabel
LINK ramdiskbin sbin/mknod
LINK ramdiskbin sbin/mount
LINK ramdiskbin sbin/mount_cd9660
LINK ramdiskbin sbin/mount_ffs
LINK ramdiskbin sbin/mount_mfs
LINK ramdiskbin sbin/mount_kernfs
LINK ramdiskbin sbin/mount_msdos
LINK ramdiskbin sbin/mount_nfs
LINK ramdiskbin sbin/mount_ntfs
LINK ramdiskbin sbin/newfs
LINK ramdiskbin sbin/ping
LINK ramdiskbin sbin/rdump
LINK ramdiskbin sbin/reboot
LINK ramdiskbin sbin/restore
LINK ramdiskbin sbin/route
LINK ramdiskbin sbin/rrestore
LINK ramdiskbin sbin/scsictl
LINK ramdiskbin sbin/shutdown
LINK ramdiskbin sbin/slattach
LINK ramdiskbin sbin/swapctl
LINK ramdiskbin sbin/umount
LINK ramdiskbin usr/bin/chgrp
LINK ramdiskbin usr/bin/ftp
LINK ramdiskbin usr/bin/gunzip
LINK ramdiskbin usr/bin/gzcat
LINK ramdiskbin usr/bin/gzip
LINK ramdiskbin usr/bin/less
LINK ramdiskbin usr/bin/more
LINK ramdiskbin usr/bin/sed
LINK ramdiskbin usr/bin/tar
LINK ramdiskbin usr/bin/tip
LINK ramdiskbin usr/mdec/installboot
LINK ramdiskbin usr/sbin/bad144
LINK ramdiskbin usr/sbin/chown
LINK ramdiskbin usr/sbin/chroot
LINK ramdiskbin usr/sbin/wiconfig
SPECIAL /bin/rm ramdiskbin
PROG sbin/disklabel
PROG sbin/fdisk
PROG sbin/fsck
PROG sbin/fsck_ffs
PROG sbin/ifconfig
PROG sbin/init
PROG sbin/mbrlabel
PROG sbin/mknod
PROG sbin/mount
PROG sbin/mount_cd9660
PROG sbin/mount_ffs
PROG sbin/mount_kernfs
PROG sbin/mount_msdos
PROG sbin/mount_nfs
PROG sbin/newfs sbin/mount_mfs
PROG sbin/ping
PROG sbin/reboot sbin/halt
PROG sbin/restore sbin/rrestore
PROG sbin/route
PROG sbin/scsictl
PROG sbin/swapctl
PROG sbin/umount
# XXX: added: mbrlabel mount_kernfs scsictl
# make some devices
SPECIAL cd dev; sh ${CURDIR}/../../../../etc/etc.i386/MAKEDEV std
SPECIAL gzip -9 -c ${CURDIR}/../../../../etc/etc.i386/MAKEDEV > MAKEDEV.gz
PROG usr/bin/ftp
PROG usr/bin/gzip usr/bin/gzcat usr/bin/gunzip
PROG usr/bin/more usr/bin/less
PROG usr/bin/sed
PROG usr/bin/tip
# XXX: added: sed
# we need the boot block in /usr/mdec + the MBR copy
COPY ${DESTDIR}/usr/mdec/biosboot.sym usr/mdec/biosboot.sym
COPY ${DESTDIR}/usr/mdec/mbr usr/mdec/mbr
COPY ${DESTDIR}/usr/mdec/mbr_bootsel usr/mdec/mbr_bootsel
PROG usr/mdec/installboot
# and the common installation tools
COPY ${CURDIR}/termcap.mini usr/share/misc/termcap
PROG usr/sbin/bad144
PROG usr/sbin/chown usr/bin/chgrp
PROG usr/sbin/chroot
# and the shell startup file
COPY ${CURDIR}/dot.profile .profile
# init invokes the shell as -sh
ARGVLN sh -sh
SPECIAL ed srcdir distrib/utils/x_ed
SPECIAL ftp srcdir distrib/utils/x_ftp
SPECIAL ifconfig srcdir distrib/utils/x_ifconfig
SPECIAL more srcdir distrib/utils/more
SPECIAL mount srcdir distrib/utils/x_mount
SPECIAL ping srcdir distrib/utils/x_ping
SPECIAL route srcdir distrib/utils/x_route
SPECIAL sh srcdir distrib/utils/x_sh
SPECIAL umount srcdir distrib/utils/x_umount
# libhack.o is built by Makefile & included Makefile.inc
LIBS libhack.o -lbz2 -ltermcap -lutil -lrmt -ll -lm

View File

@ -1,94 +0,0 @@
# $NetBSD: mtree.conf,v 1.2 2000/12/24 23:50:48 jmc 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
..
# ./var
var
# ./var/spool
spool
# ./var/spool/lock
lock
# ./var/spool/lock
..
# ./var/spool
..
# ./var
..

View File

@ -1,39 +0,0 @@
# $NetBSD: ramdiskbin.conf,v 1.3 2001/01/24 18:18:57 jmc Exp $
#
# ramdiskbin.conf - unified binary for the install ramdisk
#
srcdirs bin sbin usr.bin usr.sbin gnu/usr.bin sys/arch/i386/stand
progs bad144 cat chmod chown chroot cp dd df disklabel dump ed
progs fsck fsck_ffs ftp gzip ifconfig init installboot
progs ln ls mkdir mknod more
progs mount mount_cd9660 mount_ffs mount_msdos
progs mount_nfs mt mv newfs ping pwd rcmd reboot restore rm
progs route sh stty swapctl sync
progs umount
progs pax
progs fdisk
special init srcdir distrib/utils/init_s
special dd srcdir distrib/utils/x_dd
special ftp srcdir distrib/utils/x_ftp
special ifconfig srcdir distrib/utils/x_ifconfig
special more srcdir distrib/utils/more
special route srcdir distrib/utils/x_route
special sh srcdir distrib/utils/x_sh
special ping srcdir distrib/utils/x_ping
ln pax tar
ln chown chgrp
ln gzip gzcat gunzip
ln more less
ln sh -sh # init invokes the shell this way
ln reboot halt
ln dump rdump
ln restore rrestore
ln newfs mount_mfs
# libhack.o is built by Makefile & included Makefile.inc
libs libhack.o -lbz2 -ltermcap -lutil -lrmt -lcrypt -ll -lm

View File

@ -1,61 +0,0 @@
# $NetBSD: termcap.mini,v 1.1 2000/09/27 16:04:16 fvdl Exp $
#
# Copyright (c) 1980, 1985, 1989 The Regents of the University of California.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. All advertising materials mentioning features or use of this software
# must display the following acknowledgement:
# This product includes software developed by the University of
# California, Berkeley and its contributors.
# 4. Neither the name of the University nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
# @(#)termcap.src 5.109 (Berkeley) 3/8/93
#
pc3|ibmpc3|IBM PC 386BSD Console:\
:DO=\E[%dB:K1=\E[H:K2=\E[E:K3=\E[I:K4=\E[F:K5=\E[G:LE=\E[%dD:\
:RI=\E[%dC:UP=\E[%dA:am:bl=^G:bs:cb=\E[1K:cd=\E[J:ce=\E[K:cl=\E[H\E[J:\
:cm=\E[%i%d;%dH:co#80:cr=^M:do=^J:ho=\E[H:is=\E[m:k0=\E[V:k1=\E[M:\
:k2=\E[N:k3=\E[O:k4=\E[P:k5=\E[Q:k6=\E[R:k7=\E[S:k8=\E[T:k9=\E[U:\
:kD=\177:kH=\E[F:kN=\E[G:kP=\E[I:kb=\177:kd=\E[B:kh=\E[H:kl=\E[D:\
:kr=\E[C:ku=\E[A:le=^H:li#25:ms:nd=\E[C:rs=\E[m\E[x\E[14r:se=\E[m:\
:sf=\E[S:so=\E[7m:sr=\E[T:ta=^I:te=\E[m:ti=\E[m:up=\E[A:km:pt:\
:AL=\E[%dL:DL=\E[%dM:SF=\E[%dS:SR=\E[%dT:al=\E[L:dl=\E[M:
vt100|vt100-am|dec vt100 (w/advanced video):\
:am:bs:ms:xn:xo:\
:co#80:it#8:li#24:vt#3:\
:@8=\EOM:DO=\E[%dB:K1=\EOq:K2=\EOr:K3=\EOs:K4=\EOp:K5=\EOn:\
:LE=\E[%dD:RA=\E[?7l:RI=\E[%dC:SA=\E[?7h:UP=\E[%dA:\
:ac=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~:\
:ae=\E(B:as=\E(0:bl=^G:cb=\E[1K:cd=\E[J:ce=\E[K:cl=\E[H\E[J:\
:cm=\E[%i%d;%dH:cr=^M:cs=\E[%i%d;%dr:ct=\E[3g:do=^J:\
:eA=\E(B:ho=\E[H:k0=\EOy:k1=\EOP:k2=\EOQ:k3=\EOR:\
:k4=\EOS:k5=\EOt:k6=\EOu:k7=\EOv:k8=\EOl:k9=\EOw:k;=\EOx:\
:kb=^H:kd=\EOB:ke=\E[?1l\E>:kl=\EOD:kr=\EOC:ks=\E[?1h\E=:\
:ku=\EOA:le=^H:mb=\E[5m:md=\E[1m:me=\E[m\017:mr=\E[7m:\
:nd=\E[C:r2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h:rc=\E8:\
:..sa=\E[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;m%?%p9%t\016%e\017%;:\
:sc=\E7:se=\E[m:sf=^J:so=\E[7m:sr=\EM:st=\EH:ta=^I:ue=\E[m:\
:up=\E[A:us=\E[4m:

View File

@ -1,85 +1,7 @@
# $NetBSD: Makefile,v 1.15 2001/12/02 01:43:12 jmc Exp $
# $NetBSD: Makefile,v 1.16 2002/02/03 16:22:26 lukem Exp $
TOP= ${.CURDIR}/..
WARNS=1
BOOTMODEL= tiny
IMAGE= ramdisk-rescue${BOOTMODEL}.fs
IMAGESIZE= 1344k
.include "${TOP}/Makefile.inc"
IMAGE= ramdisk-rescuetiny.fs
AUXDEPENDS= dot.profile termcap.mini
CBIN= ramdiskbin
MOUNT_POINT?= /mnt
# DEV/RDEV file system device
VND?= vnd0
VND_DEV= /dev/${VND}a
VND_RDEV= /dev/r${VND}a
IMAGE?= xxx.fs
MDEC= ${DESTDIR}/usr/mdec
LISTS= list
CRUNCHCONF= ${CBIN}.conf
MTREECONF= mtree.conf
CRUNCHGEN?= crunchgen
MTREE?= mtree
RAMDISKSPC= 128
RAMDISKCYLS= 21
RAMDISKSIZE!= expr ${RAMDISKSPC} \* ${RAMDISKCYLS}
DBG?=-Os
realall: ${IMAGE}
${IMAGE}: ${CBIN} ${AUXDEPENDS} ${MTREECONF} ${LISTS}
rm -f ${IMAGE}.tmp
dd if=/dev/zero of=${IMAGE}.tmp count=${RAMDISKSIZE}
vnconfig -v -c ${VND} ${IMAGE}.tmp 512/${RAMDISKSPC}/1/${RAMDISKCYLS}
-disklabel ${VND} >tmplabel
disklabel -r -R ${VND} tmplabel
newfs -B le -m 0 -o space -i 4800 -c 80 ${VND_RDEV}
mount ${VND_DEV} ${MOUNT_POINT}
${MTREE} -def ${.CURDIR}/${MTREECONF} -p ${MOUNT_POINT}/ -U
TOPDIR=${TOP} CURDIR=${.CURDIR} OBJDIR=${.OBJDIR} \
TARGDIR=${MOUNT_POINT} sh ${TOP}/runlist.sh ${.CURDIR}/${LISTS}
@echo ""
@df -i ${MOUNT_POINT}
@echo ""
umount ${MOUNT_POINT}
vnconfig -u ${VND}
mv -f ${IMAGE}.tmp ${IMAGE}
unconfig:
-umount -f ${MOUNT_POINT}
-vnconfig -u ${VND}
-/bin/rm -f ${IMAGE}
${CBIN}.mk ${CBIN}.cache ${CBIN}.c: ${CRUNCHCONF}
${CRUNCHGEN} -f -D ${TOP}/../../.. -L ${DESTDIR}/usr/lib ${.ALLSRC}
${CBIN}: ${CBIN}.mk ${CBIN}.cache ${CBIN}.c
${MAKE} -f ${CBIN}.mk all
# This is listed in ramdiskbin.conf but is built here.
${CBIN}: libhack.o
# Use stubs to eliminate some large stuff from libc
HACKSRC=${TOP}/../../utils/libhack
.include "${HACKSRC}/Makefile.inc"
# turn off small gethostby*
HACKOBJS:= getcap.o getgrent.o getnet.o getnetgr.o getpwent.o setlocale.o yplib.o
release:
clean cleandir distclean:
if [ -f ${CBIN}.mk ]; then ${MAKE} -f ${CBIN}.mk clean; fi; \
/bin/rm -f ${AUXCLEAN} *.core ${IMAGE} ${CBIN} ${CBIN}.mk ${CBIN}.cache \
*.o *.cro *.c ${IMAGE}.tmp tmplabel
.include <bsd.own.mk>
.include <bsd.obj.mk>
.include <bsd.subdir.mk>
.include <bsd.sys.mk>
.include <bsd.prog.mk>
.include "../common/Makefile.ramdisk"

View File

@ -1,72 +0,0 @@
# $NetBSD: dot.profile,v 1.1 2000/09/27 16:04:16 fvdl Exp $
#
# Copyright (c) 1994 Christopher G. Demetriou
# Copyright (c) 1997 Perry E. Metzger
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. All advertising materials mentioning features or use of this software
# must display the following acknowledgement:
# This product includes software developed by Christopher G. Demetriou.
# 4. The name of the author may not be used to endorse or promote products
# derived from this software without specific prior written permission
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
PATH=/sbin:/bin:/usr/bin:/usr/sbin:/
export PATH
TERM=pc3
export TERM
HOME=/
export HOME
BLOCKSIZE=1k
export BLOCKSIZE
EDITOR=ed
export EDITOR
umask 022
ROOTDEV=/dev/md0a
if [ "X${DONEPROFILE}" = "X" ]; then
DONEPROFILE=YES
export DONEPROFILE
# set up some sane defaults
echo 'erase ^?, werase ^W, kill ^U, intr ^C'
stty newcrt werase ^W intr ^C kill ^U erase ^? 9600
echo ''
# mount the ramdisk read write
mount -u $ROOTDEV /
# mount the kern_fs so that we can examine the dmesg state
mount -t kernfs /kern /kern
# pull in the functions that people will use from the shell prompt.
# . /.commonutils
# . /.instutils
dmesg() cat /kern/msgbuf
grep() sed -n "/$1/p"
echo "This image contains utilities which may be needed"
echo "to get you out of a pinch."
fi

View File

@ -1,95 +1,74 @@
# $NetBSD: list,v 1.4 2001/11/08 07:40:01 jmc Exp $
# $NetBSD: list,v 1.5 2002/02/03 16:22:26 lukem Exp $
# various files that we need in /etc for the install
COPY ${CURDIR}/../../../../etc/group etc/group
COPY ${CURDIR}/../../../../etc/master.passwd etc/master.passwd
COPY ${CURDIR}/../../../../etc/protocols etc/protocols
COPY ${CURDIR}/../../../../etc/netconfig etc/netconfig
COPY ${CURDIR}/../../../../etc/services etc/services
SRCDIRS bin sbin usr.bin usr.sbin gnu/usr.bin sys/arch/i386/stand
SPECIAL pwd_mkdb -p -d ./ etc/master.passwd
SPECIAL /bin/rm etc/spwd.db
SPECIAL /bin/rm etc/pwd.db
PROG bin/cat
PROG bin/chmod
PROG bin/cp
PROG bin/dd
PROG bin/df
PROG bin/ed
PROG bin/ln
PROG bin/ls
PROG bin/mkdir
PROG bin/mt
PROG bin/mv
PROG bin/pax usr/bin/tar
PROG bin/pwd
PROG bin/rcmd
PROG bin/rm
PROG bin/sh
PROG bin/stty
PROG bin/sync
# copy the crunched binary, link to it, and kill it
COPY ${OBJDIR}/ramdiskbin ramdiskbin
LINK ramdiskbin bin/cat
LINK ramdiskbin bin/chmod
LINK ramdiskbin bin/cp
LINK ramdiskbin bin/dd
LINK ramdiskbin bin/df
LINK ramdiskbin bin/ed
LINK ramdiskbin bin/ln
LINK ramdiskbin bin/ls
LINK ramdiskbin bin/mkdir
LINK ramdiskbin bin/mt
LINK ramdiskbin bin/mv
LINK ramdiskbin bin/pax
LINK ramdiskbin bin/pwd
LINK ramdiskbin bin/rcmd
LINK ramdiskbin bin/rm
LINK ramdiskbin bin/sh
LINK ramdiskbin bin/stty
LINK ramdiskbin bin/sync
LINK ramdiskbin sbin/disklabel
LINK ramdiskbin sbin/dump
LINK ramdiskbin sbin/fdisk
LINK ramdiskbin sbin/fsck
LINK ramdiskbin sbin/fsck_ffs
LINK ramdiskbin sbin/halt
LINK ramdiskbin sbin/ifconfig
LINK ramdiskbin sbin/init
LINK ramdiskbin sbin/kernfs
LINK ramdiskbin sbin/mbrlabel
LINK ramdiskbin sbin/mknod
LINK ramdiskbin sbin/mount
LINK ramdiskbin sbin/mount_cd9660
LINK ramdiskbin sbin/mount_ext2fs
LINK ramdiskbin sbin/mount_ffs
LINK ramdiskbin sbin/mount_kernfs
LINK ramdiskbin sbin/mount_msdos
LINK ramdiskbin sbin/mount_nfs
LINK ramdiskbin sbin/mount_ntfs
LINK ramdiskbin sbin/msdos
LINK ramdiskbin sbin/newfs
LINK ramdiskbin sbin/ping
LINK ramdiskbin sbin/rdump
LINK ramdiskbin sbin/reboot
LINK ramdiskbin sbin/restore
LINK ramdiskbin sbin/route
LINK ramdiskbin sbin/rrestore
LINK ramdiskbin sbin/rtsol
LINK ramdiskbin sbin/scsictl
LINK ramdiskbin sbin/shutdown
LINK ramdiskbin sbin/slattach
LINK ramdiskbin sbin/swapctl
LINK ramdiskbin sbin/umount
LINK ramdiskbin usr/bin/chgrp
LINK ramdiskbin usr/bin/ftp
LINK ramdiskbin usr/bin/gunzip
LINK ramdiskbin usr/bin/gzcat
LINK ramdiskbin usr/bin/gzip
LINK ramdiskbin usr/bin/less
LINK ramdiskbin usr/bin/more
LINK ramdiskbin usr/bin/sed
LINK ramdiskbin usr/bin/tar
LINK ramdiskbin usr/bin/tip
LINK ramdiskbin usr/mdec/installboot
LINK ramdiskbin usr/sbin/bad144
LINK ramdiskbin usr/sbin/chown
LINK ramdiskbin usr/sbin/wiconfig
SPECIAL /bin/rm ramdiskbin
PROG sbin/disklabel
PROG sbin/fdisk
PROG sbin/fsck
PROG sbin/fsck_ffs
PROG sbin/ifconfig
PROG sbin/init
PROG sbin/mbrlabel
PROG sbin/mknod
PROG sbin/mount
PROG sbin/mount_cd9660
PROG sbin/mount_ffs
PROG sbin/mount_kernfs
PROG sbin/mount_msdos
PROG sbin/mount_nfs
PROG sbin/newfs sbin/mount_mfs
PROG sbin/ping
PROG sbin/reboot sbin/halt
PROG sbin/restore sbin/rrestore
PROG sbin/route
PROG sbin/swapctl
PROG sbin/umount
# XXX removed: dump sysctl
# make some devices
SPECIAL cd dev; sh ${CURDIR}/../../../../etc/etc.i386/MAKEDEV std md0 fd0 fd1 wd0 wd1 wd2 wd3 cd0 cd1 pty0 ttyv0
PROG usr/bin/ftp
PROG usr/bin/gzip usr/bin/gzcat usr/bin/gunzip
PROG usr/bin/more usr/bin/less
PROG usr/bin/sed
PROG usr/bin/tip
# XXX added: sed tip
# we need the boot block in /usr/mdec + the MBR copy
COPY ${DESTDIR}/usr/mdec/biosboot.sym usr/mdec/biosboot.sym
COPY ${DESTDIR}/usr/mdec/mbr usr/mdec/mbr
COPY ${DESTDIR}/usr/mdec/mbr_bootsel usr/mdec/mbr_bootsel
PROG usr/mdec/installboot
# and the common installation tools
COPY ${CURDIR}/termcap.mini usr/share/misc/termcap
PROG usr/sbin/bad144
PROG usr/sbin/chown usr/bin/chgrp
PROG usr/sbin/chroot
# and the shell startup file
COPY ${CURDIR}/dot.profile .profile
# init invokes the shell as -sh
ARGVLN sh -sh
SPECIAL ed srcdir distrib/utils/x_ed
SPECIAL ftp srcdir distrib/utils/x_ftp
SPECIAL ifconfig srcdir distrib/utils/x_ifconfig
SPECIAL more srcdir distrib/utils/more
SPECIAL mount srcdir distrib/utils/x_mount
SPECIAL ping srcdir distrib/utils/x_ping
SPECIAL route srcdir distrib/utils/x_route
SPECIAL sh srcdir distrib/utils/x_sh
SPECIAL umount srcdir distrib/utils/x_umount
# libhack.o is built by Makefile & included Makefile.inc
LIBS libhack.o -lbz2 -ltermcap -lutil -lrmt -ll -lm

View File

@ -1,94 +0,0 @@
# $NetBSD: mtree.conf,v 1.2 2000/12/24 23:50:48 jmc 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
..
# ./var
var
# ./var/spool
spool
# ./var/spool/lock
lock
# ./var/spool/lock
..
# ./var/spool
..
# ./var
..

View File

@ -1,41 +0,0 @@
# $NetBSD: ramdiskbin.conf,v 1.5 2001/12/02 01:44:08 jmc Exp $
#
# ramdiskbin.conf - unified binary for the install ramdisk
#
srcdirs bin sbin usr.bin usr.sbin gnu/usr.bin sys/arch/i386/stand
progs bad144 cat chmod chown cp dd df disklabel dump ed
progs fsck fsck_ffs ftp gzip ifconfig init installboot
progs ln ls mkdir mknod more
progs mount mount_cd9660 mount_ffs mount_msdos
progs mount_nfs mount_kernfs mt mv newfs ping pwd rcmd reboot restore rm
progs route scsictl sh sysctl stty swapctl sync
progs umount
progs pax
progs fdisk mbrlabel
special init srcdir distrib/utils/init_s
special dd srcdir distrib/utils/x_dd
special ed srcdir distrib/utils/x_ed
special ftp srcdir distrib/utils/x_ftp
special ifconfig srcdir distrib/utils/x_ifconfig
special more srcdir distrib/utils/more
special route srcdir distrib/utils/x_route
special sh srcdir distrib/utils/x_sh
special ping srcdir distrib/utils/x_ping
special mount srcdir distrib/utils/x_mount
special umount srcdir distrib/utils/x_umount
ln pax tar
ln chown chgrp
ln gzip gzcat gunzip
ln more less
ln sh -sh # init invokes the shell this way
ln reboot halt
ln dump rdump
ln restore rrestore
# libhack.o is built by Makefile & included Makefile.inc
libs libhack.o -lbz2 -lutil -ltermcap -lrmt -lcrypt -ll -lm

View File

@ -1,61 +0,0 @@
# $NetBSD: termcap.mini,v 1.1 2000/09/27 16:04:16 fvdl Exp $
#
# Copyright (c) 1980, 1985, 1989 The Regents of the University of California.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. All advertising materials mentioning features or use of this software
# must display the following acknowledgement:
# This product includes software developed by the University of
# California, Berkeley and its contributors.
# 4. Neither the name of the University nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
# @(#)termcap.src 5.109 (Berkeley) 3/8/93
#
pc3|ibmpc3|IBM PC 386BSD Console:\
:DO=\E[%dB:K1=\E[H:K2=\E[E:K3=\E[I:K4=\E[F:K5=\E[G:LE=\E[%dD:\
:RI=\E[%dC:UP=\E[%dA:am:bl=^G:bs:cb=\E[1K:cd=\E[J:ce=\E[K:cl=\E[H\E[J:\
:cm=\E[%i%d;%dH:co#80:cr=^M:do=^J:ho=\E[H:is=\E[m:k0=\E[V:k1=\E[M:\
:k2=\E[N:k3=\E[O:k4=\E[P:k5=\E[Q:k6=\E[R:k7=\E[S:k8=\E[T:k9=\E[U:\
:kD=\177:kH=\E[F:kN=\E[G:kP=\E[I:kb=\177:kd=\E[B:kh=\E[H:kl=\E[D:\
:kr=\E[C:ku=\E[A:le=^H:li#25:ms:nd=\E[C:rs=\E[m\E[x\E[14r:se=\E[m:\
:sf=\E[S:so=\E[7m:sr=\E[T:ta=^I:te=\E[m:ti=\E[m:up=\E[A:km:pt:\
:AL=\E[%dL:DL=\E[%dM:SF=\E[%dS:SR=\E[%dT:al=\E[L:dl=\E[M:
vt100|vt100-am|dec vt100 (w/advanced video):\
:am:bs:ms:xn:xo:\
:co#80:it#8:li#24:vt#3:\
:@8=\EOM:DO=\E[%dB:K1=\EOq:K2=\EOr:K3=\EOs:K4=\EOp:K5=\EOn:\
:LE=\E[%dD:RA=\E[?7l:RI=\E[%dC:SA=\E[?7h:UP=\E[%dA:\
:ac=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~:\
:ae=\E(B:as=\E(0:bl=^G:cb=\E[1K:cd=\E[J:ce=\E[K:cl=\E[H\E[J:\
:cm=\E[%i%d;%dH:cr=^M:cs=\E[%i%d;%dr:ct=\E[3g:do=^J:\
:eA=\E(B:ho=\E[H:k0=\EOy:k1=\EOP:k2=\EOQ:k3=\EOR:\
:k4=\EOS:k5=\EOt:k6=\EOu:k7=\EOv:k8=\EOl:k9=\EOw:k;=\EOx:\
:kb=^H:kd=\EOB:ke=\E[?1l\E>:kl=\EOD:kr=\EOC:ks=\E[?1h\E=:\
:ku=\EOA:le=^H:mb=\E[5m:md=\E[1m:me=\E[m\017:mr=\E[7m:\
:nd=\E[C:r2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h:rc=\E8:\
:..sa=\E[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;m%?%p9%t\016%e\017%;:\
:sc=\E7:se=\E[m:sf=^J:so=\E[7m:sr=\EM:st=\EH:ta=^I:ue=\E[m:\
:up=\E[A:us=\E[4m:

View File

@ -1,86 +1,7 @@
# $NetBSD: Makefile,v 1.15 2001/12/02 01:43:38 jmc Exp $
# $NetBSD: Makefile,v 1.16 2002/02/03 16:22:27 lukem Exp $
TOP= ${.CURDIR}/..
WARNS=1
BOOTMODEL= small
IMAGE= ramdisk-${BOOTMODEL}.fs
IMAGESIZE= 1344k
.include "${TOP}/Makefile.inc"
IMAGE= ramdisk-small.fs
AUXDEPENDS= dot.profile disktab.preinstall termcap.mini
CBIN= ramdiskbin
MOUNT_POINT?= /mnt
# DEV/RDEV file system device
VND?= vnd0
VND_DEV= /dev/${VND}a
VND_RDEV= /dev/r${VND}a
IMAGE?= xxx.fs
MDEC= ${DESTDIR}/usr/mdec
LISTS= list
CRUNCHCONF= ${CBIN}.conf
MTREECONF= mtree.conf
CRUNCHGEN?= crunchgen
MTREE?= mtree
RAMDISKSPC= 170
RAMDISKCYLS= 16
RAMDISKSIZE!= expr ${RAMDISKSPC} \* ${RAMDISKCYLS}
DBG?=-Os
realall: ${IMAGE}
${IMAGE}: ${CBIN} ${AUXDEPENDS} ${MTREECONF} ${LISTS}
rm -f ${IMAGE}.tmp
dd if=/dev/zero of=${IMAGE}.tmp count=${RAMDISKSIZE}
vnconfig -v -c ${VND} ${IMAGE}.tmp \
512/${RAMDISKSPC}/1/${RAMDISKCYLS}
-disklabel ${VND} >tmplabel
disklabel -r -R ${VND} tmplabel
newfs -B le -m 0 -o space -i 16384 -c 80 ${VND_RDEV}
mount ${VND_DEV} ${MOUNT_POINT}
${MTREE} -def ${.CURDIR}/${MTREECONF} -p ${MOUNT_POINT}/ -U
TOPDIR=${TOP} CURDIR=${.CURDIR} OBJDIR=${.OBJDIR} \
TARGDIR=${MOUNT_POINT} sh ${TOP}/runlist.sh ${.CURDIR}/${LISTS}
@echo ""
@df -i ${MOUNT_POINT}
@echo ""
umount ${MOUNT_POINT}
vnconfig -u ${VND}
mv -f ${IMAGE}.tmp ${IMAGE}
unconfig:
-umount -f ${MOUNT_POINT}
-vnconfig -u ${VND}
-/bin/rm -f ${IMAGE} ${IMAGE}.tmp
${CBIN}.mk ${CBIN}.cache ${CBIN}.c: ${CRUNCHCONF}
${CRUNCHGEN} -f -D ${TOP}/../../.. -L ${DESTDIR}/usr/lib ${.ALLSRC}
${CBIN}: ${CBIN}.mk ${CBIN}.cache ${CBIN}.c
${MAKE} -f ${CBIN}.mk all
# This is listed in ramdiskbin.conf but is built here.
${CBIN}: libhack.o
# Use stubs to eliminate some large stuff from libc
HACKSRC=${TOP}/../../utils/libhack
.include "${HACKSRC}/Makefile.inc"
# turn off small gethostby* temporarily
HACKOBJS:= getcap.o getgrent.o getnet.o getnetgr.o getpwent.o setlocale.o yplib.o
release:
clean cleandir distclean:
if [ -f ${CBIN}.mk ]; then ${MAKE} -f ${CBIN}.mk clean; fi; \
/bin/rm -f *.core ${IMAGE} ${IMAGE}.tmp ${CBIN} \
${CBIN}.mk ${CBIN}.cache *.o *.cro *.c tmplabel
.include <bsd.own.mk>
.include <bsd.obj.mk>
.include <bsd.subdir.mk>
.include <bsd.sys.mk>
.include <bsd.prog.mk>
.include "../common/Makefile.ramdisk"

View File

@ -1,31 +0,0 @@
# $NetBSD: disktab.preinstall,v 1.1 2000/09/27 16:04:17 fvdl Exp $
#
# Disk geometry and partition layout tables.
# Key:
# dt controller type
# ty type of disk (fixed, removeable, simulated)
# d[0-4] drive-type-dependent parameters
# ns #sectors/track
# nt #tracks/cylinder
# nc #cylinders/disk
# sc #sectors/cylinder, nc*nt default
# su #sectors/unit, sc*nc default
# se sector size, DEV_BSIZE default
# rm rpm, 3600 default
# sf supports bad144-style bad sector forwarding
# sk sector skew per track, default 0
# cs sector skew per cylinder, default 0
# hs headswitch time, default 0
# ts one-cylinder seek time, default 0
# il sector interleave (n:1), 1 default
# bs boot block size, default BBSIZE
# sb superblock size, default SBSIZE
# o[a-h] partition offsets in sectors
# p[a-h] partition sizes in sectors
# b[a-h] partition block sizes in bytes
# f[a-h] partition fragment sizes in bytes
# t[a-h] partition types (filesystem, swap, etc)
#
# All partition sizes reserve space for bad sector tables.
# (5 cylinders needed for maintenance + replacement sectors)
#

View File

@ -1,62 +0,0 @@
# $NetBSD: dot.hdprofile,v 1.1 2000/09/27 16:04:17 fvdl Exp $
#
# Copyright (c) 1994 Christopher G. Demetriou
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. All advertising materials mentioning features or use of this software
# must display the following acknowledgement:
# This product includes software developed for the
# NetBSD Project. See http://www.netbsd.org/ for
# information about NetBSD.
# 4. The name of the author may not be used to endorse or promote products
# derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# <<Id: LICENSE,v 1.2 2000/06/14 15:57:33 cgd Exp>>
PATH=/sbin:/bin:/usr/bin:/usr/sbin:/
export PATH
TERM=pc3
export TERM
HOME=/
export HOME
umask 022
if [ "X${DONEPROFILE}" = "X" ]; then
DONEPROFILE=YES
export DONEPROFILE
echo "Checking filesystems..."
fsck -y
echo "Mounting root..."
mount -u /
# set up some sane defaults
echo 'erase ^?, werase ^W, kill ^U, intr ^C'
stty newcrt werase ^W intr ^C kill ^U erase ^? 9600
echo ''
TERMCAP=/.termcap ; export TERMCAP
[ -x /sysinst ] && /sysinst
fi

View File

@ -1,88 +1,68 @@
# $NetBSD: list,v 1.6 2001/01/24 18:18:57 jmc Exp $
# $NetBSD: list,v 1.7 2002/02/03 16:22:27 lukem Exp $
# various files that we need in /etc for the install
COPY ${CURDIR}/../../../../etc/group etc/group
COPY ${CURDIR}/../../../../etc/master.passwd etc/master.passwd
COPY ${CURDIR}/../../../../etc/protocols etc/protocols
COPY ${CURDIR}/../../../../etc/netconfig etc/netconfig
COPY ${CURDIR}/../../../../etc/services etc/services
SRCDIRS bin sbin usr.bin usr.sbin gnu/usr.bin sys/arch/i386/stand
SPECIAL pwd_mkdb -p -d ./ etc/master.passwd
SPECIAL /bin/rm etc/spwd.db
SPECIAL /bin/rm etc/pwd.db
PROG sysinst
# copy the crunched binary, link to it, and kill it
COPY ${OBJDIR}/ramdiskbin ramdiskbin
LINK ramdiskbin sysinst
LINK ramdiskbin bin/cat
LINK ramdiskbin bin/chio
LINK ramdiskbin bin/chmod
LINK ramdiskbin bin/cp
LINK ramdiskbin bin/dd
LINK ramdiskbin bin/df
LINK ramdiskbin bin/ed
LINK ramdiskbin bin/ln
LINK ramdiskbin bin/ls
LINK ramdiskbin bin/mkdir
LINK ramdiskbin bin/mt
LINK ramdiskbin bin/mv
LINK ramdiskbin bin/pax
LINK ramdiskbin bin/pwd
LINK ramdiskbin bin/rcmd
LINK ramdiskbin bin/rm
LINK ramdiskbin bin/sh
LINK ramdiskbin bin/stty
LINK ramdiskbin bin/sync
LINK ramdiskbin sbin/disklabel
LINK ramdiskbin sbin/fsck
LINK ramdiskbin sbin/fsck_ffs
LINK ramdiskbin sbin/halt
LINK ramdiskbin sbin/ifconfig
LINK ramdiskbin sbin/init
LINK ramdiskbin sbin/kernfs
LINK ramdiskbin sbin/mknod
LINK ramdiskbin sbin/mount
LINK ramdiskbin sbin/mount_cd9660
LINK ramdiskbin sbin/mount_ffs
LINK ramdiskbin sbin/mount_mfs
LINK ramdiskbin sbin/mount_kernfs
LINK ramdiskbin sbin/mount_msdos
LINK ramdiskbin sbin/mount_nfs
LINK ramdiskbin sbin/msdos
LINK ramdiskbin sbin/newfs
LINK ramdiskbin sbin/ping
LINK ramdiskbin sbin/reboot
LINK ramdiskbin sbin/route
LINK ramdiskbin sbin/swapctl
LINK ramdiskbin sbin/umount
LINK ramdiskbin usr/bin/chgrp
LINK ramdiskbin usr/bin/ftp
LINK ramdiskbin usr/bin/gunzip
LINK ramdiskbin usr/bin/gzcat
LINK ramdiskbin usr/bin/gzip
LINK ramdiskbin usr/bin/sed
LINK ramdiskbin usr/bin/tar
LINK ramdiskbin usr/bin/tip
LINK ramdiskbin usr/mdec/installboot
LINK ramdiskbin usr/sbin/bad144
LINK ramdiskbin usr/sbin/chown
LINK ramdiskbin usr/sbin/chroot
SPECIAL /bin/rm ramdiskbin
PROG bin/cat
PROG bin/chmod
PROG bin/cp
PROG bin/ln
PROG bin/ls
PROG bin/mkdir
PROG bin/mv
PROG bin/pax usr/bin/tar
PROG bin/pwd
PROG bin/rm
PROG bin/sh
PROG bin/stty
# make some devices
SPECIAL cd dev; sh ${CURDIR}/../../../../etc/etc.i386/MAKEDEV std
SPECIAL gzip -9 -c ${CURDIR}/../../../../etc/etc.i386/MAKEDEV > MAKEDEV.gz
PROG sbin/disklabel
PROG sbin/fsck
PROG sbin/fsck_ffs
PROG sbin/ifconfig
PROG sbin/init
PROG sbin/mknod
PROG sbin/mount
PROG sbin/mount_cd9660
PROG sbin/mount_ffs
PROG sbin/mount_kernfs
PROG sbin/mount_msdos
PROG sbin/mount_nfs
PROG sbin/newfs sbin/mount_mfs
PROG sbin/ping
PROG sbin/reboot sbin/halt
PROG sbin/route
PROG sbin/swapctl
PROG sbin/umount
# we need the boot block in /usr/mdec + the MBR copy
COPY ${DESTDIR}/usr/mdec/biosboot.sym usr/mdec/biosboot.sym
COPY ${DESTDIR}/usr/mdec/mbr usr/mdec/mbr
COPY ${DESTDIR}/usr/mdec/mbr_bootsel usr/mdec/mbr_bootsel
PROG usr/bin/ftp
PROG usr/bin/gzip usr/bin/gzcat usr/bin/gunzip
PROG usr/bin/more usr/bin/less
PROG usr/bin/sed
# XXX: added more
# and the common installation tools
COPY ${CURDIR}/termcap.mini usr/share/misc/termcap
PROG usr/mdec/installboot
PROG usr/sbin/bad144
PROG usr/sbin/chown usr/bin/chgrp
PROG usr/sbin/chroot
# init invokes the shell as -sh
ARGVLN sh -sh
SPECIAL ftp srcdir distrib/utils/x_ftp
SPECIAL ifconfig srcdir distrib/utils/x_ifconfig
SPECIAL more srcdir distrib/utils/more
SPECIAL mount srcdir distrib/utils/x_mount
SPECIAL ping srcdir distrib/utils/x_ping
SPECIAL route srcdir distrib/utils/x_route
SPECIAL sh srcdir distrib/utils/x_sh
SPECIAL sysinst srcdir distrib/utils/sysinst/arch/i386
SPECIAL umount srcdir distrib/utils/x_umount
# libhack.o is built by Makefile & included Makefile.inc
LIBS libhack.o -lbz2 -lutil -lcurses -ltermcap -lcrypt -ll -lm
# the lists of obsolete files used by sysinst
SPECIAL sh ${CURDIR}/../../../../distrib/sets/makeobsolete -b -s ${CURDIR}/../../../../distrib/sets -t ./dist
# and the installation tools
COPY ${CURDIR}/dot.profile .profile
CMD sh ${_SRC_TOP_}/distrib/sets/makeobsolete -b -s ${_SRC_TOP_}/distrib/sets -t ./dist

View File

@ -1,107 +0,0 @@
# $NetBSD: mtree.conf,v 1.2 2000/12/24 23:50:49 jmc 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
..
# ./var
var
# ./var/db
db
# ./var/db
..
# ./var
run
# ./var/run
..
# ./var/log
log
# ./var/log
..
# ./var
spool
# ./var/spool
lock
# ./var/spool/lock
..
# ./var/spool
..
# ./var
..

View File

@ -1,38 +0,0 @@
# $NetBSD: ramdiskbin.conf,v 1.7 2001/06/12 03:26:08 chs Exp $
#
# ramdiskbin.conf - unified binary for the install ramdisk
#
srcdirs bin sbin usr.bin usr.sbin gnu/usr.bin sys/arch/i386/stand
progs bad144 cat chmod chown cp disklabel
progs fsck fsck_ffs ftp gzip ifconfig init installboot
progs ln ls mkdir mknod
progs mount mount_cd9660 mount_ffs mount_msdos
progs mount_nfs mount_kernfs mv newfs ping pwd reboot rm
progs route sed sh stty swapctl
progs umount
progs sysinst pax
special init srcdir distrib/utils/init_s
special sysinst srcdir distrib/utils/sysinst/arch/i386
special ftp srcdir distrib/utils/x_ftp
special ifconfig srcdir distrib/utils/x_ifconfig
special route srcdir distrib/utils/x_route
special sh srcdir distrib/utils/x_sh
special ping srcdir distrib/utils/x_ping
special mount srcdir distrib/utils/x_mount
special umount srcdir distrib/utils/x_umount
# "special" gzip is actually larger assuming nothing else uses -lz..
#special gzip srcdir distrib/utils/x_gzip
ln pax tar
ln chown chgrp
ln gzip gzcat gunzip
ln sh -sh # init invokes the shell this way
ln reboot halt
ln newfs mount_mfs
# libhack.o is built by Makefile & included Makefile.inc
libs libhack.o -lbz2 -lutil -lcurses -ltermcap -lcrypt -ll -lm

View File

@ -1,61 +0,0 @@
# $NetBSD: termcap.mini,v 1.1 2000/09/27 16:04:17 fvdl Exp $
#
# Copyright (c) 1980, 1985, 1989 The Regents of the University of California.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. All advertising materials mentioning features or use of this software
# must display the following acknowledgement:
# This product includes software developed by the University of
# California, Berkeley and its contributors.
# 4. Neither the name of the University nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
# @(#)termcap.src 5.109 (Berkeley) 3/8/93
#
pc3|ibmpc3|IBM PC 386BSD Console:\
:DO=\E[%dB:K1=\E[H:K2=\E[E:K3=\E[I:K4=\E[F:K5=\E[G:LE=\E[%dD:\
:RI=\E[%dC:UP=\E[%dA:am:bl=^G:bs:cb=\E[1K:cd=\E[J:ce=\E[K:cl=\E[H\E[J:\
:cm=\E[%i%d;%dH:co#80:cr=^M:do=^J:ho=\E[H:is=\E[m:k0=\E[V:k1=\E[M:\
:k2=\E[N:k3=\E[O:k4=\E[P:k5=\E[Q:k6=\E[R:k7=\E[S:k8=\E[T:k9=\E[U:\
:kD=\177:kH=\E[F:kN=\E[G:kP=\E[I:kb=\177:kd=\E[B:kh=\E[H:kl=\E[D:\
:kr=\E[C:ku=\E[A:le=^H:li#25:ms:nd=\E[C:rs=\E[m\E[x\E[14r:se=\E[m:\
:sf=\E[S:so=\E[7m:sr=\E[T:ta=^I:te=\E[m:ti=\E[m:up=\E[A:km:pt:\
:AL=\E[%dL:DL=\E[%dM:SF=\E[%dS:SR=\E[%dT:al=\E[L:dl=\E[M:
vt100|vt100-am|dec vt100 (w/advanced video):\
:am:bs:ms:xn:xo:\
:co#80:it#8:li#24:vt#3:\
:@8=\EOM:DO=\E[%dB:K1=\EOq:K2=\EOr:K3=\EOs:K4=\EOp:K5=\EOn:\
:LE=\E[%dD:RA=\E[?7l:RI=\E[%dC:SA=\E[?7h:UP=\E[%dA:\
:ac=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~:\
:ae=\E(B:as=\E(0:bl=^G:cb=\E[1K:cd=\E[J:ce=\E[K:cl=\E[H\E[J:\
:cm=\E[%i%d;%dH:cr=^M:cs=\E[%i%d;%dr:ct=\E[3g:do=^J:\
:eA=\E(B:ho=\E[H:k0=\EOy:k1=\EOP:k2=\EOQ:k3=\EOR:\
:k4=\EOS:k5=\EOt:k6=\EOu:k7=\EOv:k8=\EOl:k9=\EOw:k;=\EOx:\
:kb=^H:kd=\EOB:ke=\E[?1l\E>:kl=\EOD:kr=\EOC:ks=\E[?1h\E=:\
:ku=\EOA:le=^H:mb=\E[5m:md=\E[1m:me=\E[m\017:mr=\E[7m:\
:nd=\E[C:r2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h:rc=\E8:\
:..sa=\E[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;m%?%p9%t\016%e\017%;:\
:sc=\E7:se=\E[m:sf=^J:so=\E[7m:sr=\EM:st=\EH:ta=^I:ue=\E[m:\
:up=\E[A:us=\E[4m:

View File

@ -1,86 +1,7 @@
# $NetBSD: Makefile,v 1.17 2001/12/02 01:43:38 jmc Exp $
# $NetBSD: Makefile,v 1.18 2002/02/03 16:22:28 lukem Exp $
TOP= ${.CURDIR}/..
WARNS=1
BOOTMODEL= tiny
IMAGE= ramdisk-${BOOTMODEL}.fs
IMAGESIZE= 1344k
.include "${TOP}/Makefile.inc"
IMAGE= ramdisk-tiny.fs
AUXDEPENDS= dot.profile disktab.preinstall termcap.mini
CBIN= ramdiskbin
MOUNT_POINT?= /mnt
# DEV/RDEV file system device
VND?= vnd0
VND_DEV= /dev/${VND}a
VND_RDEV= /dev/r${VND}a
IMAGE?= xxx.fs
MDEC= ${DESTDIR}/usr/mdec
LISTS= list
CRUNCHCONF= ${CBIN}.conf
MTREECONF= mtree.conf
MTREE?= mtree
CRUNCHGEN?= crunchgen
RAMDISKSPC= 128
RAMDISKCYLS= 21
RAMDISKSIZE!= expr ${RAMDISKSPC} \* ${RAMDISKCYLS}
DBG?=-Os
realall: ${IMAGE}
${IMAGE}: ${CBIN} ${AUXDEPENDS} ${MTREECONF} ${LISTS}
rm -f ${IMAGE}.tmp
dd if=/dev/zero of=${IMAGE}.tmp count=${RAMDISKSIZE}
vnconfig -v -c ${VND} ${IMAGE}.tmp \
512/${RAMDISKSPC}/1/${RAMDISKCYLS}
-disklabel ${VND} >tmplabel
disklabel -r -R ${VND} tmplabel
newfs -B le -m 0 -o space -i 3950 -c 80 ${VND_RDEV}
mount ${VND_DEV} ${MOUNT_POINT}
${MTREE} -def ${.CURDIR}/${MTREECONF} -p ${MOUNT_POINT}/ -U
TOPDIR=${TOP} CURDIR=${.CURDIR} OBJDIR=${.OBJDIR} \
TARGDIR=${MOUNT_POINT} sh ${TOP}/runlist.sh ${.CURDIR}/${LISTS}
@echo ""
@df -i ${MOUNT_POINT}
@echo ""
umount ${MOUNT_POINT}
vnconfig -u ${VND}
mv -f ${IMAGE}.tmp ${IMAGE}
unconfig:
-umount -f ${MOUNT_POINT}
-vnconfig -u ${VND}
-/bin/rm -f ${IMAGE} ${IMAGE}.tmp
${CBIN}.mk ${CBIN}.cache ${CBIN}.c: ${CRUNCHCONF}
${CRUNCHGEN} -f -D ${TOP}/../../.. -L ${DESTDIR}/usr/lib ${.ALLSRC}
${CBIN}: ${CBIN}.mk ${CBIN}.cache ${CBIN}.c
${MAKE} -f ${CBIN}.mk all
# This is listed in ramdiskbin.conf but is built here.
${CBIN}: libhack.o
# Use stubs to eliminate some large stuff from libc
HACKSRC=${TOP}/../../utils/libhack
.include "${HACKSRC}/Makefile.inc"
# turn off small gethostby* temporarily
HACKOBJS:= getcap.o getgrent.o getnet.o getnetgr.o getpwent.o setlocale.o yplib.o
release:
clean cleandir distclean:
if [ -f ${CBIN}.mk ]; then ${MAKE} -f ${CBIN}.mk clean; fi; \
/bin/rm -f *.core ${IMAGE} ${CBIN} ${CBIN}.mk ${CBIN}.cache \
*.o *.cro *.c tmplabel
.include <bsd.own.mk>
.include <bsd.obj.mk>
.include <bsd.subdir.mk>
.include <bsd.sys.mk>
.include <bsd.prog.mk>
.include "../common/Makefile.ramdisk"

View File

@ -1,31 +0,0 @@
# $NetBSD: disktab.preinstall,v 1.2 2000/09/27 16:04:17 fvdl Exp $
#
# Disk geometry and partition layout tables.
# Key:
# dt controller type
# ty type of disk (fixed, removeable, simulated)
# d[0-4] drive-type-dependent parameters
# ns #sectors/track
# nt #tracks/cylinder
# nc #cylinders/disk
# sc #sectors/cylinder, nc*nt default
# su #sectors/unit, sc*nc default
# se sector size, DEV_BSIZE default
# rm rpm, 3600 default
# sf supports bad144-style bad sector forwarding
# sk sector skew per track, default 0
# cs sector skew per cylinder, default 0
# hs headswitch time, default 0
# ts one-cylinder seek time, default 0
# il sector interleave (n:1), 1 default
# bs boot block size, default BBSIZE
# sb superblock size, default SBSIZE
# o[a-h] partition offsets in sectors
# p[a-h] partition sizes in sectors
# b[a-h] partition block sizes in bytes
# f[a-h] partition fragment sizes in bytes
# t[a-h] partition types (filesystem, swap, etc)
#
# All partition sizes reserve space for bad sector tables.
# (5 cylinders needed for maintenance + replacement sectors)
#

View File

@ -1,73 +0,0 @@
# $NetBSD: dot.profile,v 1.4 2000/09/27 16:04:17 fvdl Exp $
#
# Copyright (c) 1997 Perry E. Metzger
# Copyright (c) 1994 Christopher G. Demetriou
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. All advertising materials mentioning features or use of this software
# must display the following acknowledgement:
# This product includes software developed for the
# NetBSD Project. See http://www.netbsd.org/ for
# information about NetBSD.
# 4. The name of the author may not be used to endorse or promote products
# derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# <<Id: LICENSE,v 1.2 2000/06/14 15:57:33 cgd Exp>>
PATH=/sbin:/bin:/usr/bin:/usr/sbin:/
export PATH
TERM=pc3
export TERM
HOME=/
export HOME
BLOCKSIZE=1k
export BLOCKSIZE
EDITOR=ed
export EDITOR
BOOTMODEL=tiny
export BOOTMODEL
umask 022
ROOTDEV=/dev/md0a
if [ "X${DONEPROFILE}" = "X" ]; then
DONEPROFILE=YES
export DONEPROFILE
# set up some sane defaults
echo 'erase ^?, werase ^W, kill ^U, intr ^C'
stty newcrt werase ^W intr ^C kill ^U erase ^? 9600
echo ''
# mount the ramdisk read write
mount -u $ROOTDEV /
# mount the kern_fs so that we can examine the dmesg state
mount -t kernfs /kern /kern
# pull in the functions that people will use from the shell prompt.
dmesg() cat /kern/msgbuf
# run the installation or upgrade script.
sysinst
fi

View File

@ -1,80 +1,65 @@
# $NetBSD: list,v 1.5 2001/01/24 18:16:43 jmc Exp $
# $NetBSD: list,v 1.6 2002/02/03 16:22:28 lukem Exp $
# various files that we need in /etc for the install
COPY ${CURDIR}/../../../../etc/group etc/group
COPY ${CURDIR}/../../../../etc/master.passwd etc/master.passwd
COPY ${CURDIR}/../../../../etc/protocols etc/protocols
COPY ${CURDIR}/../../../../etc/netconfig etc/netconfig
COPY ${CURDIR}/../../../../etc/services etc/services
SRCDIRS bin sbin usr.bin usr.sbin gnu/usr.bin sys/arch/i386/stand
SPECIAL pwd_mkdb -p -d ./ etc/master.passwd
SPECIAL /bin/rm etc/spwd.db
SPECIAL /bin/rm etc/pwd.db
PROG sysinst
# copy the crunched binary, link to it, and kill it
COPY ${OBJDIR}/ramdiskbin ramdiskbin
LINK ramdiskbin sysinst
LINK ramdiskbin bin/cat
LINK ramdiskbin bin/chmod
LINK ramdiskbin bin/cp
LINK ramdiskbin bin/ln
LINK ramdiskbin bin/ls
LINK ramdiskbin bin/mkdir
LINK ramdiskbin bin/mv
LINK ramdiskbin bin/pax
LINK ramdiskbin bin/pwd
LINK ramdiskbin bin/rm
LINK ramdiskbin bin/sh
LINK ramdiskbin bin/stty
LINK ramdiskbin sbin/disklabel
LINK ramdiskbin sbin/fsck
LINK ramdiskbin sbin/fsck_ffs
LINK ramdiskbin sbin/halt
LINK ramdiskbin sbin/ifconfig
LINK ramdiskbin sbin/init
LINK ramdiskbin sbin/kernfs
LINK ramdiskbin sbin/mknod
LINK ramdiskbin sbin/mount
LINK ramdiskbin sbin/mount_cd9660
LINK ramdiskbin sbin/mount_ffs
LINK ramdiskbin sbin/mount_kernfs
LINK ramdiskbin sbin/mount_msdos
LINK ramdiskbin sbin/mount_nfs
LINK ramdiskbin sbin/msdos
LINK ramdiskbin sbin/newfs
LINK ramdiskbin sbin/ping
LINK ramdiskbin sbin/reboot
LINK ramdiskbin sbin/route
LINK ramdiskbin sbin/swapctl
LINK ramdiskbin sbin/umount
LINK ramdiskbin usr/bin/chgrp
LINK ramdiskbin usr/bin/ftp
LINK ramdiskbin usr/bin/gunzip
LINK ramdiskbin usr/bin/gzcat
LINK ramdiskbin usr/bin/gzip
LINK ramdiskbin usr/bin/less
LINK ramdiskbin usr/bin/more
LINK ramdiskbin usr/bin/sed
LINK ramdiskbin usr/bin/tar
LINK ramdiskbin usr/mdec/installboot
LINK ramdiskbin usr/sbin/bad144
LINK ramdiskbin usr/sbin/chown
LINK ramdiskbin usr/sbin/chroot
SPECIAL /bin/rm ramdiskbin
PROG bin/cat
PROG bin/chmod
PROG bin/cp
PROG bin/ln
PROG bin/ls
PROG bin/mkdir
PROG bin/mv
PROG bin/pax usr/bin/tar
PROG bin/pwd
PROG bin/rm
PROG bin/sh
PROG bin/stty
# make some devices
SPECIAL cd dev; sh ${CURDIR}/../../../../etc/etc.i386/MAKEDEV std md0 fd0 fd1 wd0 wd1 wd2 wd3 cd0 cd1 pty0 ttyv0
PROG sbin/disklabel
PROG sbin/fsck
PROG sbin/fsck_ffs
PROG sbin/ifconfig
PROG sbin/init
PROG sbin/mknod
PROG sbin/mount
PROG sbin/mount_cd9660
PROG sbin/mount_ffs
PROG sbin/mount_kernfs
PROG sbin/mount_msdos
PROG sbin/mount_nfs
PROG sbin/newfs sbin/mount_mfs
PROG sbin/ping
PROG sbin/reboot sbin/halt
PROG sbin/route
PROG sbin/swapctl
PROG sbin/umount
# we need the boot block in /usr/mdec + the MBR copy
COPY ${DESTDIR}/usr/mdec/biosboot.sym usr/mdec/biosboot.sym
COPY ${DESTDIR}/usr/mdec/mbr usr/mdec/mbr
COPY ${DESTDIR}/usr/mdec/mbr_bootsel usr/mdec/mbr_bootsel
PROG usr/bin/ftp
PROG usr/bin/gzip usr/bin/gzcat usr/bin/gunzip
PROG usr/bin/sed
# and the common installation tools
COPY ${CURDIR}/termcap.mini usr/share/misc/termcap
PROG usr/mdec/installboot
PROG usr/sbin/bad144
PROG usr/sbin/chown usr/bin/chgrp
PROG usr/sbin/chroot
# init invokes the shell as -sh
ARGVLN sh -sh
SPECIAL ftp srcdir distrib/utils/x_ftp
SPECIAL ifconfig srcdir distrib/utils/x_ifconfig
SPECIAL mount srcdir distrib/utils/x_mount
SPECIAL ping srcdir distrib/utils/x_ping
SPECIAL route srcdir distrib/utils/x_route
SPECIAL sh srcdir distrib/utils/x_sh
SPECIAL sysinst srcdir distrib/utils/sysinst/arch/i386
SPECIAL umount srcdir distrib/utils/x_umount
# libhack.o is built by Makefile & included Makefile.inc
LIBS libhack.o -lbz2 -lutil -lcurses -ltermcap -lcrypt -ll -lm
# the lists of obsolete files used by sysinst
SPECIAL sh ${CURDIR}/../../../../distrib/sets/makeobsolete -b -s ${CURDIR}/../../../../distrib/sets -t ./dist
# and the installation tools
COPY ${CURDIR}/dot.profile .profile
CMD sh ${_SRC_TOP_}/distrib/sets/makeobsolete -b -s ${_SRC_TOP_}/distrib/sets -t ./dist

View File

@ -1,94 +0,0 @@
# $NetBSD: mtree.conf,v 1.2 2000/12/24 23:50:49 jmc 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
..
# ./var
var
# ./var/spool
spool
# ./var/spool/lock
lock
# ./var/spool/lock
..
# ./var/spool
..
# ./var
..

View File

@ -1,37 +0,0 @@
# $NetBSD: ramdiskbin.conf,v 1.4 2001/04/29 15:20:55 fvdl Exp $
#
# ramdiskbin.conf - unified binary for the install ramdisk
#
srcdirs bin sbin usr.bin usr.sbin gnu/usr.bin sys/arch/i386/stand
progs bad144 cat chmod chown chroot cp disklabel
progs fsck fsck_ffs ftp gzip ifconfig init installboot
progs ln ls mkdir mknod
progs mount mount_cd9660 mount_ffs mount_msdos
progs mount_nfs mount_kernfs mv newfs ping pwd reboot rm
progs route sed sh stty swapctl
progs umount
progs sysinst pax
special init srcdir distrib/utils/init_s
special sysinst srcdir distrib/utils/sysinst/arch/i386
special ftp srcdir distrib/utils/x_ftp
special ifconfig srcdir distrib/utils/x_ifconfig
special route srcdir distrib/utils/x_route
special sh srcdir distrib/utils/x_sh
special ping srcdir distrib/utils/x_ping
special mount srcdir distrib/utils/x_mount
special umount srcdir distrib/utils/x_umount
# "special" gzip is actually larger assuming nothing else uses -lz..
#special gzip srcdir distrib/utils/x_gzip
ln pax tar
ln chown chgrp
ln gzip gzcat gunzip
ln sh -sh # init invokes the shell this way
ln reboot halt
# libhack.o is built by Makefile & included Makefile.inc
libs libhack.o -lbz2 -lutil -lcurses -ltermcap -lcrypt -ll -lm

View File

@ -1,61 +0,0 @@
# $NetBSD: termcap.mini,v 1.1 2000/06/12 18:51:18 he Exp $
#
# Copyright (c) 1980, 1985, 1989 The Regents of the University of California.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. All advertising materials mentioning features or use of this software
# must display the following acknowledgement:
# This product includes software developed by the University of
# California, Berkeley and its contributors.
# 4. Neither the name of the University nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
# @(#)termcap.src 5.109 (Berkeley) 3/8/93
#
pc3|ibmpc3|IBM PC 386BSD Console:\
:DO=\E[%dB:K1=\E[H:K2=\E[E:K3=\E[I:K4=\E[F:K5=\E[G:LE=\E[%dD:\
:RI=\E[%dC:UP=\E[%dA:am:bl=^G:bs:cb=\E[1K:cd=\E[J:ce=\E[K:cl=\E[H\E[J:\
:cm=\E[%i%d;%dH:co#80:cr=^M:do=^J:ho=\E[H:is=\E[m:k0=\E[V:k1=\E[M:\
:k2=\E[N:k3=\E[O:k4=\E[P:k5=\E[Q:k6=\E[R:k7=\E[S:k8=\E[T:k9=\E[U:\
:kD=\177:kH=\E[F:kN=\E[G:kP=\E[I:kb=\177:kd=\E[B:kh=\E[H:kl=\E[D:\
:kr=\E[C:ku=\E[A:le=^H:li#25:ms:nd=\E[C:rs=\E[m\E[x\E[14r:se=\E[m:\
:sf=\E[S:so=\E[7m:sr=\E[T:ta=^I:te=\E[m:ti=\E[m:up=\E[A:km:pt:\
:AL=\E[%dL:DL=\E[%dM:SF=\E[%dS:SR=\E[%dT:al=\E[L:dl=\E[M:
vt100|vt100-am|dec vt100 (w/advanced video):\
:am:bs:ms:xn:xo:\
:co#80:it#8:li#24:vt#3:\
:@8=\EOM:DO=\E[%dB:K1=\EOq:K2=\EOr:K3=\EOs:K4=\EOp:K5=\EOn:\
:LE=\E[%dD:RA=\E[?7l:RI=\E[%dC:SA=\E[?7h:UP=\E[%dA:\
:ac=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~:\
:ae=\E(B:as=\E(0:bl=^G:cb=\E[1K:cd=\E[J:ce=\E[K:cl=\E[H\E[J:\
:cm=\E[%i%d;%dH:cr=^M:cs=\E[%i%d;%dr:ct=\E[3g:do=^J:\
:eA=\E(B:ho=\E[H:k0=\EOy:k1=\EOP:k2=\EOQ:k3=\EOR:\
:k4=\EOS:k5=\EOt:k6=\EOu:k7=\EOv:k8=\EOl:k9=\EOw:k;=\EOx:\
:kb=^H:kd=\EOB:ke=\E[?1l\E>:kl=\EOD:kr=\EOC:ks=\E[?1h\E=:\
:ku=\EOA:le=^H:mb=\E[5m:md=\E[1m:me=\E[m\017:mr=\E[7m:\
:nd=\E[C:r2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h:rc=\E8:\
:..sa=\E[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;m%?%p9%t\016%e\017%;:\
:sc=\E7:se=\E[m:sf=^J:so=\E[7m:sr=\EM:st=\EH:ta=^I:ue=\E[m:\
:up=\E[A:us=\E[4m:

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.3 2000/09/27 16:04:17 fvdl Exp $
# $NetBSD: Makefile,v 1.4 2002/02/03 16:22:29 lukem Exp $
TOP= ${.CURDIR}/..
@ -11,11 +11,9 @@ KERN!= cd ${KDIR}; \
printf "xxx: .MAKE\n\t@echo \$${.OBJDIR}/netbsd.${KNAME}.gz\n" | \
${MAKE} -s -f-
DISKTYPE= floppy5
DISKSIZE= 2400
BLOCK8K= 149
.include "${TOP}/bootfloppy-common/Makefile.inc"
.include "${TOP}/common/Makefile.bootfloppy"
${KERN}:
cd ${KDIR}; ${MAKE}

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.3 2000/09/27 16:04:18 fvdl Exp $
# $NetBSD: Makefile,v 1.4 2002/02/03 16:22:29 lukem Exp $
TOP= ${.CURDIR}/..
@ -11,11 +11,9 @@ KERN!= cd ${KDIR}; \
printf "xxx: .MAKE\n\t@echo \$${.OBJDIR}/netbsd.${KNAME}.gz\n" | \
${MAKE} -s -f-
DISKTYPE= floppy5
DISKSIZE= 2400
BLOCK8K= 149
.include "${TOP}/bootfloppy-common/Makefile.inc"
.include "${TOP}/common/Makefile.bootfloppy"
${KERN}:
cd ${KDIR}; ${MAKE}

View File

@ -1,13 +0,0 @@
# $NetBSD: runlist.sh,v 1.2 1996/10/09 00:13:36 jtc Exp $
if [ "X$1" = "X-d" ]; then
SHELLCMD=cat
shift
else
SHELLCMD="sh -e"
fi
( while [ "X$1" != "X" ]; do
cat $1
shift
done ) | awk -f ${TOPDIR}/list2sh.awk | ${SHELLCMD}