Added sun2 distrib files.
This commit is contained in:
parent
20b5680c6f
commit
75c4ef5d8d
|
@ -0,0 +1,8 @@
|
||||||
|
# $NetBSD: md.sun2,v 1.1 2001/05/18 00:16:36 fredette Exp $
|
||||||
|
./sbin/edlabel base-sysutil-bin
|
||||||
|
./usr/mdec/bootxx base-sysutil-bin
|
||||||
|
./usr/mdec/bootyy base-sysutil-bin
|
||||||
|
./usr/mdec/installboot base-sysutil-bin
|
||||||
|
./usr/mdec/netboot base-sysutil-bin
|
||||||
|
./usr/mdec/tapeboot base-sysutil-bin
|
||||||
|
./usr/mdec/ufsboot base-sysutil-bin
|
|
@ -0,0 +1,58 @@
|
||||||
|
# $NetBSD: md.sun2,v 1.1 2001/05/18 00:16:37 fredette Exp $
|
||||||
|
./usr/include/sun2 comp-c-include
|
||||||
|
./usr/include/sun2/_G_config.h comp-c-include
|
||||||
|
./usr/include/sun2/ansi.h comp-c-include
|
||||||
|
./usr/include/sun2/aout_machdep.h comp-c-include
|
||||||
|
./usr/include/sun2/asm.h comp-c-include
|
||||||
|
./usr/include/sun2/autoconf.h comp-c-include
|
||||||
|
./usr/include/sun2/bswap.h comp-c-include
|
||||||
|
./usr/include/sun2/cdefs.h comp-c-include
|
||||||
|
./usr/include/sun2/cg2reg.h comp-c-include
|
||||||
|
./usr/include/sun2/cpu.h comp-c-include
|
||||||
|
./usr/include/sun2/db_machdep.h comp-c-include
|
||||||
|
./usr/include/sun2/disklabel.h comp-c-include
|
||||||
|
./usr/include/sun2/dvma.h comp-c-include
|
||||||
|
./usr/include/sun2/eeprom.h comp-c-include
|
||||||
|
./usr/include/sun2/elf_machdep.h comp-c-include
|
||||||
|
./usr/include/sun2/endian.h comp-c-include
|
||||||
|
./usr/include/sun2/endian_machdep.h comp-c-include
|
||||||
|
./usr/include/sun2/fbio.h comp-c-include
|
||||||
|
./usr/include/sun2/float.h comp-c-include
|
||||||
|
./usr/include/sun2/frame.h comp-c-include
|
||||||
|
./usr/include/sun2/idprom.h comp-c-include
|
||||||
|
./usr/include/sun2/ieee.h comp-c-include
|
||||||
|
./usr/include/sun2/ieeefp.h comp-c-include
|
||||||
|
./usr/include/sun2/int_const.h comp-c-include
|
||||||
|
./usr/include/sun2/int_fmtio.h comp-c-include
|
||||||
|
./usr/include/sun2/int_limits.h comp-c-include
|
||||||
|
./usr/include/sun2/int_mwgwtypes.h comp-c-include
|
||||||
|
./usr/include/sun2/int_types.h comp-c-include
|
||||||
|
./usr/include/sun2/kbd.h comp-c-include
|
||||||
|
./usr/include/sun2/kbio.h comp-c-include
|
||||||
|
./usr/include/sun2/kcore.h comp-c-include
|
||||||
|
./usr/include/sun2/leds.h comp-c-include
|
||||||
|
./usr/include/sun2/limits.h comp-c-include
|
||||||
|
./usr/include/sun2/lock.h comp-c-include
|
||||||
|
./usr/include/sun2/math.h comp-c-include
|
||||||
|
./usr/include/sun2/mon.h comp-c-include
|
||||||
|
./usr/include/sun2/param.h comp-c-include
|
||||||
|
./usr/include/sun2/pcb.h comp-c-include
|
||||||
|
./usr/include/sun2/pmap.h comp-c-include
|
||||||
|
./usr/include/sun2/proc.h comp-c-include
|
||||||
|
./usr/include/sun2/profile.h comp-c-include
|
||||||
|
./usr/include/sun2/psl.h comp-c-include
|
||||||
|
./usr/include/sun2/pte.h comp-c-include
|
||||||
|
./usr/include/sun2/ptrace.h comp-c-include
|
||||||
|
./usr/include/sun2/reg.h comp-c-include
|
||||||
|
./usr/include/sun2/setjmp.h comp-c-include
|
||||||
|
./usr/include/sun2/signal.h comp-c-include
|
||||||
|
./usr/include/sun2/stdarg.h comp-c-include
|
||||||
|
./usr/include/sun2/svr4_machdep.h comp-c-include
|
||||||
|
./usr/include/sun2/trap.h comp-c-include
|
||||||
|
./usr/include/sun2/types.h comp-c-include
|
||||||
|
./usr/include/sun2/varargs.h comp-c-include
|
||||||
|
./usr/include/sun2/vmparam.h comp-c-include
|
||||||
|
./usr/include/sun2/vuid_event.h comp-c-include
|
||||||
|
./usr/include/sun2/z8530var.h comp-c-include
|
||||||
|
./usr/sbin/dbsym comp-sysutil-bin
|
||||||
|
./usr/include/ieeefp.h comp-c-include
|
|
@ -0,0 +1,5 @@
|
||||||
|
# $NetBSD: md.sun2,v 1.1 2001/05/18 00:16:37 fredette Exp $
|
||||||
|
./etc/fstab.nfs etc-sys-etc
|
||||||
|
./etc/fstab.sd0 etc-sys-etc
|
||||||
|
#./etc/ld.so.conf etc-sys-etc
|
||||||
|
./etc/ttyaction etc-sys-etc
|
|
@ -0,0 +1,10 @@
|
||||||
|
# $NetBSD: md.sun2,v 1.1 2001/05/18 00:16:37 fredette Exp $
|
||||||
|
#./usr/X11R6/bin/X
|
||||||
|
#./usr/X11R6/bin/Xsun
|
||||||
|
#./usr/X11R6/bin/XsunMono
|
||||||
|
#./usr/X11R6/bin/constype
|
||||||
|
#./usr/X11R6/bin/kbd_mode
|
||||||
|
#./usr/X11R6/man/cat1/Xsun.0
|
||||||
|
#./usr/X11R6/man/cat1/XsunMono.0
|
||||||
|
#./usr/X11R6/man/cat1/constype.0
|
||||||
|
#./usr/X11R6/man/cat1/kbd_mode.0
|
|
@ -0,0 +1,33 @@
|
||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# Here is a generic script that makes a Sun2 boot tape using
|
||||||
|
# the files in this directory. The tape layout is:
|
||||||
|
#
|
||||||
|
# segment 0: tapeboot
|
||||||
|
# segment 1: netbsd (RAMDISK)
|
||||||
|
# segment 3: miniroot image
|
||||||
|
#
|
||||||
|
# $NetBSD: MakeBootTape,v 1.1 2001/05/18 00:16:38 fredette Exp $
|
||||||
|
|
||||||
|
T=${1:-/dev/nrst0}
|
||||||
|
|
||||||
|
# Entertain...
|
||||||
|
set -x
|
||||||
|
|
||||||
|
# Make sure we start at the beginning.
|
||||||
|
mt -f $T rewind
|
||||||
|
|
||||||
|
# Segment 1 is the tapeboot program.
|
||||||
|
dd if=tapeboot of=$T obs=8k conv=sync
|
||||||
|
|
||||||
|
# Segment 2 is the Sun2 ramdisk kernel.
|
||||||
|
gzip -d -c ../../binary/kernel/netbsd.RAMDISK.gz |
|
||||||
|
dd of=$T obs=8k conv=sync
|
||||||
|
|
||||||
|
# Segment 4 is the miniroot image, unzipped!
|
||||||
|
gzip -d -c ../miniroot/miniroot.gz |
|
||||||
|
dd of=$T obs=8k
|
||||||
|
|
||||||
|
# Done!
|
||||||
|
mt -f $T rewind
|
||||||
|
|
|
@ -0,0 +1,26 @@
|
||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# Here is a generic script that makes a Sun2 boot tape using
|
||||||
|
# the files in ../binary
|
||||||
|
#
|
||||||
|
# $NetBSD: MakeInstTape,v 1.1 2001/05/18 00:16:38 fredette Exp $
|
||||||
|
|
||||||
|
T=${1:-/dev/nrst0}
|
||||||
|
|
||||||
|
# Remember, skip "etc" for an upgrade.
|
||||||
|
sets="etc base comp games man misc text"
|
||||||
|
|
||||||
|
# Entertain...
|
||||||
|
set -x
|
||||||
|
|
||||||
|
# Make sure we start at the beginning.
|
||||||
|
mt -f $T rewind
|
||||||
|
|
||||||
|
# Write each *.tgz file into a tape segment.
|
||||||
|
for f in $sets
|
||||||
|
do
|
||||||
|
dd if=../../binary/sets/${f}.tgz of=$T obs=8k conv=sync
|
||||||
|
done
|
||||||
|
|
||||||
|
# Done!
|
||||||
|
mt -f $T rewind
|
|
@ -0,0 +1,16 @@
|
||||||
|
# $NetBSD: Makefile,v 1.1 2001/05/18 00:16:38 fredette Exp $
|
||||||
|
|
||||||
|
SUBDIR= ramdisk miniroot
|
||||||
|
TARGETS= all release
|
||||||
|
|
||||||
|
release:
|
||||||
|
-mkdir -p ${RELEASEDIR}/installation/netboot
|
||||||
|
cp -p ${DESTDIR}/usr/mdec/netboot \
|
||||||
|
${RELEASEDIR}/installation/netboot/
|
||||||
|
-mkdir -p ${RELEASEDIR}/installation/tapeimage
|
||||||
|
cp -p ${DESTDIR}/usr/mdec/tapeboot \
|
||||||
|
${RELEASEDIR}/installation/tapeimage/
|
||||||
|
cp -p MakeBootTape MakeInstTape \
|
||||||
|
${RELEASEDIR}/installation/tapeimage/
|
||||||
|
|
||||||
|
.include <bsd.subdir.mk>
|
|
@ -0,0 +1,11 @@
|
||||||
|
# $NetBSD: Makefile.inc,v 1.1 2001/05/18 00:16:38 fredette Exp $
|
||||||
|
|
||||||
|
.include "../../Makefile.inc"
|
||||||
|
|
||||||
|
REV!=sh ${BSDSRCDIR}/sys/conf/osrelease.sh -s
|
||||||
|
|
||||||
|
LDSTATIC= -static # only static compilation makes sense here
|
||||||
|
|
||||||
|
# Where to find kernel images...
|
||||||
|
.include <bsd.kernobj.mk>
|
||||||
|
SRCSYSDIR?= ${BSDSRCDIR}/sys
|
|
@ -0,0 +1,23 @@
|
||||||
|
# $NetBSD: Make.crunch,v 1.1 2001/05/18 00:16:38 fredette Exp $
|
||||||
|
#
|
||||||
|
# This is included by subdirectories building a crunched binary.
|
||||||
|
# Assume the following are already defined: TOP, CBIN
|
||||||
|
|
||||||
|
CBIN?= xxx-crunched
|
||||||
|
CRUNCHCONF= ${TOP}/common/${CBIN}.conf
|
||||||
|
CRUNCHGEN?= crunchgen
|
||||||
|
STRIP?= strip
|
||||||
|
|
||||||
|
CLEANFILES+= ${CBIN} ${CBIN}.c ${CBIN}.cache ${CBIN}.mk ${CBIN}.syms
|
||||||
|
CLEANFILES+= *.lo *_stub.o *_stub.c
|
||||||
|
|
||||||
|
# Keep a copy that is not stripped so I can debug...
|
||||||
|
${CBIN}: ${CBIN}.mk ${CBIN}.cache ${CBIN}.c
|
||||||
|
-rm -f ${CBIN}
|
||||||
|
${MAKE} -f ${CBIN}.mk all STRIP=true
|
||||||
|
cp -p ${CBIN} ${CBIN}.syms
|
||||||
|
${STRIP} ${CBIN}
|
||||||
|
|
||||||
|
${CBIN}.mk ${CBIN}.cache ${CBIN}.c: ${CRUNCHCONF}
|
||||||
|
${CRUNCHGEN} -D ${BSDSRCDIR} -L ${DESTDIR}/usr/lib ${CRUNCHCONF}
|
||||||
|
|
|
@ -0,0 +1,42 @@
|
||||||
|
#
|
||||||
|
# $NetBSD: Make.fsimage,v 1.1 2001/05/18 00:16:38 fredette Exp $
|
||||||
|
#
|
||||||
|
|
||||||
|
# TOP is assumed to be defined by Makefile including this one.
|
||||||
|
# These will be defined by it too:
|
||||||
|
|
||||||
|
IMAGE?= xxx-${REV}
|
||||||
|
CBIN?= xxx-crunched
|
||||||
|
|
||||||
|
TREE?= ${.CURDIR}/${CBIN}.tree
|
||||||
|
LISTS?= ${.CURDIR}/${CBIN}.list
|
||||||
|
|
||||||
|
MOUNT_POINT?= /mnt
|
||||||
|
DISKTYPE?= xxx-disktype
|
||||||
|
BDEV?= /dev/md0a
|
||||||
|
CDEV?= /dev/md0a
|
||||||
|
|
||||||
|
IMAGE_DEPS?= ${CBIN}
|
||||||
|
CLEANFILES+= ${IMAGE}.fs
|
||||||
|
|
||||||
|
# These are all the parameters for the root fs:
|
||||||
|
NBLKS?= 512
|
||||||
|
# args: old fmt, minfree, opt, ...
|
||||||
|
NEWFSARGS?= -O -m 0 -o space
|
||||||
|
|
||||||
|
do_mount:
|
||||||
|
-newfs -B be ${NEWFSARGS} -s ${NBLKS} ${CDEV} ${DISKTYPE}
|
||||||
|
mount ${BDEV} ${MOUNT_POINT}
|
||||||
|
|
||||||
|
do_files:
|
||||||
|
mtree -def ${TREE} -p ${MOUNT_POINT}/ -u
|
||||||
|
TOPDIR=${TOP} CURDIR=${.CURDIR} \
|
||||||
|
OBJDIR=${.OBJDIR} TARGDIR=${MOUNT_POINT} \
|
||||||
|
sh ${TOP}/common/RunList.sh ${LISTS}
|
||||||
|
|
||||||
|
do_umount:
|
||||||
|
@echo ""
|
||||||
|
@df -i ${MOUNT_POINT}
|
||||||
|
@echo ""
|
||||||
|
-umount ${MOUNT_POINT}
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
#
|
||||||
|
# $NetBSD: Make.static,v 1.1 2001/05/18 00:16:38 fredette Exp $
|
||||||
|
#
|
||||||
|
# This is logically appended to some other makefile, i.e.
|
||||||
|
# using: make -f Makefile -f $(OUTDIR)/Make.static ...
|
||||||
|
STRIP_CMD=strip
|
||||||
|
|
||||||
|
${OUTDIR}/${PROG} : ${OBJS} ${LIBC} ${DPADD}
|
||||||
|
${CC} -static ${LDFLAGS} -o ${OUTDIR}/${PROG} ${OBJS} ${LDADD}
|
||||||
|
${STRIP_CMD} ${OUTDIR}/${PROG}
|
||||||
|
|
|
@ -0,0 +1,44 @@
|
||||||
|
# $NetBSD: RunList.awk,v 1.1 2001/05/18 00:16:38 fredette Exp $
|
||||||
|
|
||||||
|
BEGIN {
|
||||||
|
printf("cd ${CURDIR}\n");
|
||||||
|
printf("\n");
|
||||||
|
}
|
||||||
|
/^$/ || /^#/ {
|
||||||
|
print $0;
|
||||||
|
next;
|
||||||
|
}
|
||||||
|
$1 == "COPY" {
|
||||||
|
printf("echo '%s'\n", $0);
|
||||||
|
printf("cp %s ${TARGDIR}/%s\n", $2, $3);
|
||||||
|
next;
|
||||||
|
}
|
||||||
|
$1 == "LINK" {
|
||||||
|
printf("echo '%s'\n", $0);
|
||||||
|
printf("(cd ${TARGDIR}; ln %s %s)\n", $2, $3);
|
||||||
|
next;
|
||||||
|
}
|
||||||
|
$1 == "SYMLINK" {
|
||||||
|
printf("echo '%s'\n", $0);
|
||||||
|
printf("(cd ${TARGDIR}; rm -f %s; ln -s %s %s)\n", $3, $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;
|
||||||
|
}
|
|
@ -0,0 +1,14 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# $NetBSD: RunList.sh,v 1.1 2001/05/18 00:16:38 fredette Exp $
|
||||||
|
|
||||||
|
if [ "X$1" = "X-d" ]; then
|
||||||
|
SHELLCMD=cat
|
||||||
|
shift
|
||||||
|
else
|
||||||
|
SHELLCMD="sh -e"
|
||||||
|
fi
|
||||||
|
|
||||||
|
cat "$@" |
|
||||||
|
awk -f ${TOPDIR}/common/RunList.awk |
|
||||||
|
${SHELLCMD}
|
|
@ -0,0 +1,229 @@
|
||||||
|
# $NetBSD: install.md,v 1.1 2001/05/18 00:16:38 fredette Exp $
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# Copyright (c) 1996 The NetBSD Foundation, Inc.
|
||||||
|
# All rights reserved.
|
||||||
|
#
|
||||||
|
# This code is derived from software contributed to The NetBSD Foundation
|
||||||
|
# by Jason R. Thorpe.
|
||||||
|
#
|
||||||
|
# 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 NetBSD
|
||||||
|
# Foundation, Inc. and its contributors.
|
||||||
|
# 4. Neither the name of The NetBSD Foundation 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 NETBSD FOUNDATION, INC. 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 FOUNDATION 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.
|
||||||
|
#
|
||||||
|
|
||||||
|
#
|
||||||
|
# machine dependent section of installation/upgrade script.
|
||||||
|
#
|
||||||
|
|
||||||
|
# Machine-dependent install sets
|
||||||
|
# MDSETS="xbin xman xinc xcon" XXX
|
||||||
|
MDSETS=""
|
||||||
|
|
||||||
|
md_set_term() {
|
||||||
|
if [ ! -z "$TERM" ]; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
echo -n "Specify terminal type [sun]: "
|
||||||
|
getresp "sun"
|
||||||
|
TERM="$resp"
|
||||||
|
export TERM
|
||||||
|
}
|
||||||
|
|
||||||
|
__mount_kernfs() {
|
||||||
|
# Make sure kernfs is mounted.
|
||||||
|
if [ ! -d /kern -o ! -e /kern/msgbuf ]; then
|
||||||
|
mkdir /kern > /dev/null 2>&1
|
||||||
|
/sbin/mount_kernfs /kern /kern
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
md_makerootwritable() {
|
||||||
|
# Just remount the root device read-write.
|
||||||
|
if [ ! -e /tmp/root_writable ]; then
|
||||||
|
echo "Remounting root read-write..."
|
||||||
|
__mount_kernfs
|
||||||
|
mount -u /kern/rootdev /
|
||||||
|
swapctl -a /kern/rootdev
|
||||||
|
cp /dev/null /tmp/root_writable
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
md_get_diskdevs() {
|
||||||
|
# return available disk devices
|
||||||
|
__mount_kernfs
|
||||||
|
sed -n -e '/^sd[0-9] /s/ .*//p' \
|
||||||
|
-e '/^xd[0-9] /s/ .*//p' \
|
||||||
|
-e '/^xy[0-9] /s/ .*//p' \
|
||||||
|
< /kern/msgbuf | sort -u
|
||||||
|
}
|
||||||
|
|
||||||
|
md_get_cddevs() {
|
||||||
|
# return available CDROM devices
|
||||||
|
__mount_kernfs
|
||||||
|
sed -n -e '/^cd[0-9] /s/ .*//p' \
|
||||||
|
< /kern/msgbuf | sort -u
|
||||||
|
}
|
||||||
|
|
||||||
|
md_get_ifdevs() {
|
||||||
|
# return available network devices
|
||||||
|
__mount_kernfs
|
||||||
|
sed -n -e '/^ie[0-9] /s/ .*//p' \
|
||||||
|
-e '/^le[0-9] /s/ .*//p' \
|
||||||
|
< /kern/msgbuf | sort -u
|
||||||
|
}
|
||||||
|
|
||||||
|
md_get_partition_range() {
|
||||||
|
# return an expression describing the valid partition id's
|
||||||
|
echo '[a-h]'
|
||||||
|
}
|
||||||
|
|
||||||
|
md_installboot() {
|
||||||
|
# install the boot block on disk $1
|
||||||
|
echo "Installing boot block..."
|
||||||
|
( cd /usr/mdec ;\
|
||||||
|
cp -p ./ufsboot /mnt/ufsboot ;\
|
||||||
|
sync ; sleep 1 ; sync ;\
|
||||||
|
./installboot -v /mnt/ufsboot bootxx /dev/r${1}a )
|
||||||
|
echo "done."
|
||||||
|
}
|
||||||
|
|
||||||
|
md_native_fstype() {
|
||||||
|
}
|
||||||
|
|
||||||
|
md_native_fsopts() {
|
||||||
|
}
|
||||||
|
|
||||||
|
md_prep_disklabel() {
|
||||||
|
# $1 is the root disk
|
||||||
|
echo -n "Do you wish to edit the disklabel on ${1}? [y]"
|
||||||
|
getresp "y"
|
||||||
|
case "$resp" in
|
||||||
|
y*|Y*) ;;
|
||||||
|
*) return ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# display example
|
||||||
|
cat << \__md_prep_disklabel_1
|
||||||
|
Here is an example of what the partition information will look like once
|
||||||
|
you have entered the disklabel editor. Disk partition sizes and offsets
|
||||||
|
are in sector (most likely 512 bytes) units. Make sure all partitions
|
||||||
|
start on a cylinder boundary (c/t/s == XXX/0/0).
|
||||||
|
|
||||||
|
[Example]
|
||||||
|
partition start (c/t/s) nblks (c/t/s) type
|
||||||
|
|
||||||
|
a (root) 0 (0/00/00) 31392 (109/00/00) 4.2BSD
|
||||||
|
b (swap) 31392 (109/00/00) 73440 (255/00/00) swap
|
||||||
|
c (disk) 0 (0/00/00) 1070496 (3717/00/00) unused
|
||||||
|
d (user) 104832 (364/00/00) 30528 (106/00/00) 4.2BSD
|
||||||
|
e (user) 135360 (470/00/00) 40896 (142/00/00) 4.2BSD
|
||||||
|
f (user) 176256 (612/00/00) 92160 (320/00/00) 4.2BSD
|
||||||
|
g (user) 268416 (932/00/00) 802080 (2785/00/00) 4.2BSD
|
||||||
|
|
||||||
|
[End of example]
|
||||||
|
|
||||||
|
Hit the <return> key when you have read this...
|
||||||
|
|
||||||
|
__md_prep_disklabel_1
|
||||||
|
getresp ""
|
||||||
|
edlabel /dev/r${1}c
|
||||||
|
}
|
||||||
|
|
||||||
|
md_copy_kernel() {
|
||||||
|
set -- `sysctl -n hw.model`
|
||||||
|
echo -n "Copying $1 kernel..."
|
||||||
|
cp -p /netbsd.$1 /mnt/netbsd
|
||||||
|
echo "done."
|
||||||
|
}
|
||||||
|
|
||||||
|
md_welcome_banner() {
|
||||||
|
if [ "$MODE" = "install" ]; then
|
||||||
|
echo ""
|
||||||
|
echo "Welcome to the NetBSD/sun2 ${VERSION} installation program."
|
||||||
|
cat << \__welcome_banner_1
|
||||||
|
|
||||||
|
This program is designed to help you put NetBSD on your disk,
|
||||||
|
in a simple and rational way. You'll be asked several questions,
|
||||||
|
and it would probably be useful to have your disk's hardware
|
||||||
|
manual, the installation notes, and a calculator handy.
|
||||||
|
__welcome_banner_1
|
||||||
|
|
||||||
|
else
|
||||||
|
echo ""
|
||||||
|
echo "Welcome to the NetBSD/sun2 ${VERSION} upgrade program."
|
||||||
|
cat << \__welcome_banner_2
|
||||||
|
|
||||||
|
This program is designed to help you upgrade your NetBSD system in a
|
||||||
|
simple and rational way.
|
||||||
|
|
||||||
|
As a reminder, installing the `etc' binary set is NOT recommended.
|
||||||
|
Once the rest of your system has been upgraded, you should manually
|
||||||
|
merge any changes to files in the `etc' set into those files which
|
||||||
|
already exist on your system.
|
||||||
|
__welcome_banner_2
|
||||||
|
fi
|
||||||
|
|
||||||
|
cat << \__welcome_banner_3
|
||||||
|
|
||||||
|
As with anything which modifies your disk's contents, this
|
||||||
|
program can cause SIGNIFICANT data loss, and you are advised
|
||||||
|
to make sure your data is backed up before beginning the
|
||||||
|
installation process.
|
||||||
|
|
||||||
|
Default answers are displayed in brackets after the questions.
|
||||||
|
You can hit Control-C at any time to quit, but if you do so at a
|
||||||
|
prompt, you may have to hit return. Also, quitting in the middle of
|
||||||
|
installation may leave your system in an inconsistent state.
|
||||||
|
|
||||||
|
__welcome_banner_3
|
||||||
|
}
|
||||||
|
|
||||||
|
md_not_going_to_install() {
|
||||||
|
cat << \__not_going_to_install_1
|
||||||
|
|
||||||
|
OK, then. Enter `halt' at the prompt to halt the machine. Once the
|
||||||
|
machine has halted, power-cycle the system to load new boot code.
|
||||||
|
|
||||||
|
__not_going_to_install_1
|
||||||
|
}
|
||||||
|
|
||||||
|
md_congrats() {
|
||||||
|
local what;
|
||||||
|
if [ "$MODE" = "install" ]; then
|
||||||
|
what="installed";
|
||||||
|
else
|
||||||
|
what="upgraded";
|
||||||
|
fi
|
||||||
|
cat << __congratulations_1
|
||||||
|
|
||||||
|
CONGRATULATIONS! You have successfully $what NetBSD!
|
||||||
|
To boot the installed system, enter halt at the command prompt. Once the
|
||||||
|
system has halted, reset the machine and boot from the disk.
|
||||||
|
|
||||||
|
__congratulations_1
|
||||||
|
}
|
|
@ -0,0 +1,38 @@
|
||||||
|
#
|
||||||
|
# $NetBSD: mini_bin.list,v 1.1 2001/05/18 00:16:38 fredette Exp $
|
||||||
|
#
|
||||||
|
# miniroot files from /bin:
|
||||||
|
# Extras not in ../../miniroot/list:
|
||||||
|
# date ps rmdir
|
||||||
|
|
||||||
|
COPY ${DESTDIR}/bin/cat bin
|
||||||
|
COPY ${DESTDIR}/bin/chmod bin
|
||||||
|
COPY ${DESTDIR}/bin/cp bin
|
||||||
|
COPY ${DESTDIR}/bin/date bin
|
||||||
|
COPY ${DESTDIR}/bin/dd bin
|
||||||
|
COPY ${DESTDIR}/bin/df bin
|
||||||
|
COPY ${DESTDIR}/bin/ed bin
|
||||||
|
COPY ${DESTDIR}/bin/expr bin
|
||||||
|
COPY ${DESTDIR}/bin/hostname bin
|
||||||
|
COPY ${DESTDIR}/bin/kill bin
|
||||||
|
COPY ${DESTDIR}/bin/ln bin
|
||||||
|
COPY ${DESTDIR}/bin/ls bin
|
||||||
|
COPY ${DESTDIR}/bin/mkdir bin
|
||||||
|
COPY ${DESTDIR}/bin/mt bin
|
||||||
|
COPY ${DESTDIR}/bin/mv bin
|
||||||
|
COPY ${DESTDIR}/bin/pax bin
|
||||||
|
COPY ${DESTDIR}/bin/ps bin
|
||||||
|
COPY ${DESTDIR}/bin/pwd bin
|
||||||
|
COPY ${DESTDIR}/bin/rm bin
|
||||||
|
COPY ${DESTDIR}/bin/rmdir bin
|
||||||
|
COPY ${DESTDIR}/bin/sh bin
|
||||||
|
COPY ${DESTDIR}/bin/sleep bin
|
||||||
|
COPY ${DESTDIR}/bin/stty bin
|
||||||
|
COPY ${DESTDIR}/bin/sync bin
|
||||||
|
|
||||||
|
COPY ${DESTDIR}/bin/test bin
|
||||||
|
LINK bin/test bin/[
|
||||||
|
|
||||||
|
# new, combined pax,tar,cpio
|
||||||
|
LINK bin/pax usr/bin/tar
|
||||||
|
|
|
@ -0,0 +1,38 @@
|
||||||
|
#
|
||||||
|
# $NetBSD: mini_sbin.list,v 1.1 2001/05/18 00:16:39 fredette Exp $
|
||||||
|
#
|
||||||
|
# miniroot files from /sbin:
|
||||||
|
# Extras not in ../../miniroot/list:
|
||||||
|
# disklabel dmesg edlabel mount_kernfs restore
|
||||||
|
|
||||||
|
COPY ${DESTDIR}/sbin/dmesg sbin
|
||||||
|
COPY ${DESTDIR}/sbin/edlabel sbin
|
||||||
|
|
||||||
|
COPY ${DESTDIR}/sbin/fsck sbin
|
||||||
|
COPY ${DESTDIR}/sbin/fsck_ffs sbin
|
||||||
|
|
||||||
|
COPY ${DESTDIR}/sbin/ifconfig sbin
|
||||||
|
COPY ${DESTDIR}/sbin/init sbin
|
||||||
|
COPY ${DESTDIR}/sbin/mknod sbin
|
||||||
|
|
||||||
|
COPY ${DESTDIR}/sbin/mount sbin
|
||||||
|
COPY ${DESTDIR}/sbin/mount_cd9660 sbin
|
||||||
|
COPY ${DESTDIR}/sbin/mount_ffs sbin
|
||||||
|
COPY ${DESTDIR}/sbin/mount_kernfs sbin
|
||||||
|
COPY ${DESTDIR}/sbin/mount_nfs sbin
|
||||||
|
|
||||||
|
COPY ${DESTDIR}/sbin/newfs sbin
|
||||||
|
COPY ${DESTDIR}/sbin/ping sbin
|
||||||
|
COPY ${DESTDIR}/sbin/reboot sbin
|
||||||
|
LINK sbin/reboot sbin/halt
|
||||||
|
|
||||||
|
COPY ${DESTDIR}/sbin/restore sbin
|
||||||
|
LINK sbin/restore sbin/rrestore
|
||||||
|
|
||||||
|
COPY ${DESTDIR}/sbin/route sbin
|
||||||
|
COPY ${DESTDIR}/sbin/shutdown sbin
|
||||||
|
COPY ${DESTDIR}/sbin/slattach sbin
|
||||||
|
COPY ${DESTDIR}/sbin/swapctl sbin
|
||||||
|
COPY ${DESTDIR}/sbin/sysctl sbin
|
||||||
|
COPY ${DESTDIR}/sbin/umount sbin
|
||||||
|
|
|
@ -0,0 +1,45 @@
|
||||||
|
#
|
||||||
|
# $NetBSD: mini_usr.list,v 1.1 2001/05/18 00:16:39 fredette Exp $
|
||||||
|
#
|
||||||
|
# miniroot files from /usr:
|
||||||
|
|
||||||
|
# Shared library stuff...
|
||||||
|
# libcurses: vi
|
||||||
|
# libedit: ftp
|
||||||
|
# libtermcap: ftp, less, vi
|
||||||
|
# libutil: rdate
|
||||||
|
SPECIAL cd usr; ln -s lib libexec
|
||||||
|
#COPY ${DESTDIR}/usr/libexec/ld.so usr/lib
|
||||||
|
#COPY ${DESTDIR}/usr/lib/libc.so.12.70 usr/lib
|
||||||
|
#COPY ${DESTDIR}/usr/lib/libcurses.so.4.1 usr/lib
|
||||||
|
#COPY ${DESTDIR}/usr/lib/libedit.so.2.5 usr/lib
|
||||||
|
#COPY ${DESTDIR}/usr/lib/libtermcap.so.0.4 usr/lib
|
||||||
|
#COPY ${DESTDIR}/usr/lib/libutil.so.5.4 usr/lib
|
||||||
|
|
||||||
|
# usr.sbin:
|
||||||
|
COPY ${DESTDIR}/usr/sbin/chown usr/sbin
|
||||||
|
COPY ${DESTDIR}/usr/sbin/rdate usr/sbin
|
||||||
|
|
||||||
|
# usr.bin:
|
||||||
|
|
||||||
|
LINK usr/sbin/chown usr/bin/chgrp
|
||||||
|
|
||||||
|
COPY ${DESTDIR}/usr/bin/chflags usr/bin
|
||||||
|
COPY ${DESTDIR}/usr/bin/cksum usr/bin
|
||||||
|
COPY ${DESTDIR}/usr/bin/cmp usr/bin
|
||||||
|
COPY ${DESTDIR}/usr/bin/ftp usr/bin
|
||||||
|
COPY ${DESTDIR}/usr/bin/less usr/bin
|
||||||
|
LINK usr/bin/less usr/bin/more
|
||||||
|
COPY ${DESTDIR}/usr/bin/rsh usr/bin
|
||||||
|
COPY ${DESTDIR}/usr/bin/sed usr/bin
|
||||||
|
COPY ${DESTDIR}/usr/bin/tip usr/bin
|
||||||
|
COPY ${DESTDIR}/usr/bin/vi usr/bin
|
||||||
|
|
||||||
|
# gnu/usr.bin:
|
||||||
|
COPY ${DESTDIR}/usr/bin/gzip usr/bin
|
||||||
|
LINK usr/bin/gzip usr/bin/gunzip
|
||||||
|
LINK usr/bin/gzip usr/bin/gzcat
|
||||||
|
|
||||||
|
# install.md still uses sort
|
||||||
|
COPY ${DESTDIR}/usr/bin/sort usr/bin
|
||||||
|
|
|
@ -0,0 +1,52 @@
|
||||||
|
#
|
||||||
|
# $NetBSD: miniroot.list,v 1.1 2001/05/18 00:16:39 fredette Exp $
|
||||||
|
#
|
||||||
|
|
||||||
|
# These are scripts:
|
||||||
|
COPY ${DESTDIR}/usr/bin/false bin
|
||||||
|
COPY ${DESTDIR}/usr/bin/true bin
|
||||||
|
|
||||||
|
# From usr/mdec:
|
||||||
|
COPY ${DESTDIR}/usr/mdec/bootxx usr/mdec
|
||||||
|
COPY ${DESTDIR}/usr/mdec/bootyy usr/mdec
|
||||||
|
COPY ${DESTDIR}/usr/mdec/installboot usr/mdec
|
||||||
|
COPY ${DESTDIR}/usr/mdec/netboot usr/mdec
|
||||||
|
COPY ${DESTDIR}/usr/mdec/tapeboot usr/mdec
|
||||||
|
COPY ${DESTDIR}/usr/mdec/ufsboot usr/mdec
|
||||||
|
LINK usr/mdec/ufsboot ufsboot
|
||||||
|
|
||||||
|
# various files that we need in /etc for the install
|
||||||
|
COPY ${DESTDIR}/etc/group etc
|
||||||
|
COPY ${DESTDIR}/etc/master.passwd etc
|
||||||
|
COPY ${DESTDIR}/etc/netconfig etc
|
||||||
|
COPY ${DESTDIR}/etc/passwd etc
|
||||||
|
COPY ${DESTDIR}/etc/protocols etc
|
||||||
|
COPY ${DESTDIR}/etc/pwd.db etc
|
||||||
|
COPY ${DESTDIR}/etc/services etc
|
||||||
|
COPY ${DESTDIR}/etc/spwd.db etc
|
||||||
|
|
||||||
|
# some /etc files get special handling (for MFS /tmp yuck)
|
||||||
|
COPY ${DESTDIR}/etc/disktab etc/disktab.shadow
|
||||||
|
SYMLINK /tmp/disktab.shadow etc/disktab
|
||||||
|
COPY ${TOPDIR}/common/mr.fstab tmp/fstab.shadow
|
||||||
|
SYMLINK /tmp/fstab.shadow etc/fstab
|
||||||
|
SYMLINK /tmp/resolv.conf.shadow etc/resolv.conf
|
||||||
|
SYMLINK /tmp/hosts etc/hosts
|
||||||
|
|
||||||
|
# copy the MAKEDEV script and make some devices
|
||||||
|
COPY ${DESTDIR}/dev/MAKEDEV dev
|
||||||
|
COPY ${DESTDIR}/dev/MAKEDEV.local dev
|
||||||
|
SPECIAL cd dev; sh MAKEDEV std md0 cd0 st0 st1 sd0 sd1 sd2 xd0 xy0 fd0
|
||||||
|
|
||||||
|
# copy the miniroot installation tools
|
||||||
|
COPY ${TOPDIR}/common/mr.profile .profile
|
||||||
|
COPY ${TOPDIR}/common/mr.termcap usr/share/misc/termcap
|
||||||
|
|
||||||
|
COPY ${TOPDIR}/common/install.md install.md
|
||||||
|
COPY ${OBJDIR}/install.sub install.sub
|
||||||
|
SPECIAL chmod 644 install.md install.sub
|
||||||
|
|
||||||
|
COPY ${TOPDIR}/../miniroot/install.sh install
|
||||||
|
COPY ${TOPDIR}/../miniroot/upgrade.sh upgrade
|
||||||
|
SPECIAL chmod 755 install upgrade
|
||||||
|
|
|
@ -0,0 +1,106 @@
|
||||||
|
#
|
||||||
|
# $NetBSD: miniroot.tree,v 1.1 2001/05/18 00:16:39 fredette Exp $
|
||||||
|
#
|
||||||
|
|
||||||
|
/set type=dir uname=root gname=wheel mode=0755
|
||||||
|
# .
|
||||||
|
.
|
||||||
|
|
||||||
|
# ./bin
|
||||||
|
bin
|
||||||
|
# ./bin
|
||||||
|
..
|
||||||
|
|
||||||
|
# ./dev
|
||||||
|
dev
|
||||||
|
# ./dev
|
||||||
|
..
|
||||||
|
|
||||||
|
# ./etc
|
||||||
|
etc
|
||||||
|
# ./etc
|
||||||
|
..
|
||||||
|
|
||||||
|
# ./kern
|
||||||
|
kern
|
||||||
|
# ./kern
|
||||||
|
..
|
||||||
|
|
||||||
|
# ./mnt
|
||||||
|
mnt
|
||||||
|
# ./mnt
|
||||||
|
..
|
||||||
|
|
||||||
|
# ./mnt2
|
||||||
|
mnt2
|
||||||
|
# ./mnt2
|
||||||
|
..
|
||||||
|
|
||||||
|
# ./proc
|
||||||
|
proc
|
||||||
|
# ./proc
|
||||||
|
..
|
||||||
|
|
||||||
|
# ./sbin
|
||||||
|
sbin
|
||||||
|
# ./sbin
|
||||||
|
..
|
||||||
|
|
||||||
|
# ./tmp
|
||||||
|
tmp
|
||||||
|
# ./tmp
|
||||||
|
..
|
||||||
|
|
||||||
|
# ./usr
|
||||||
|
usr
|
||||||
|
|
||||||
|
# ./usr/bin
|
||||||
|
bin
|
||||||
|
# ./usr/bin
|
||||||
|
..
|
||||||
|
|
||||||
|
# ./usr/lib
|
||||||
|
lib
|
||||||
|
# ./usr/lib
|
||||||
|
..
|
||||||
|
|
||||||
|
# ./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/tmp
|
||||||
|
tmp mode=01777
|
||||||
|
|
||||||
|
# ./var/tmp/vi.recover
|
||||||
|
vi.recover mode=01777
|
||||||
|
# ./var/tmp/vi.recover
|
||||||
|
..
|
||||||
|
|
||||||
|
# ./var/tmp
|
||||||
|
..
|
||||||
|
|
||||||
|
# ./var
|
||||||
|
..
|
|
@ -0,0 +1,5 @@
|
||||||
|
#
|
||||||
|
# $NetBSD: mr.disktab,v 1.1 2001/05/18 00:16:39 fredette Exp $
|
||||||
|
#
|
||||||
|
# Disk geometry and partition layout tables.
|
||||||
|
# (empty on the miniroot)
|
|
@ -0,0 +1,9 @@
|
||||||
|
#!/bin/sh
|
||||||
|
# $NetBSD: mr.etc.rc,v 1.1 2001/05/18 00:16:39 fredette Exp $
|
||||||
|
|
||||||
|
# This is run by /sbin/init as:
|
||||||
|
# /bin/sh /etc/rc
|
||||||
|
# Just force init to go single-user...
|
||||||
|
|
||||||
|
echo "/etc/rc: miniroot forces single-user mode..."
|
||||||
|
exit 1
|
|
@ -0,0 +1,5 @@
|
||||||
|
# $NetBSD: mr.fstab,v 1.1 2001/05/18 00:16:39 fredette Exp $
|
||||||
|
#
|
||||||
|
/kern /kern kernfs ro 0 0
|
||||||
|
/kern/rootdev / ffs rw 1 1
|
||||||
|
/kern/rootdev none swap sw 0 0
|
|
@ -0,0 +1,54 @@
|
||||||
|
# $NetBSD: mr.profile,v 1.1 2001/05/18 00:16:39 fredette Exp $
|
||||||
|
#
|
||||||
|
# Copyright (c) 1995 Jason R. Thorpe
|
||||||
|
# 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/sbin:/usr/bin:/
|
||||||
|
export PATH
|
||||||
|
TERM=ansi
|
||||||
|
export TERM
|
||||||
|
|
||||||
|
umask 022
|
||||||
|
|
||||||
|
# set up some sane defaults
|
||||||
|
echo intr '^C' kill '^U' erase '^?' werase '^W' newcrt
|
||||||
|
stty intr '^C' kill '^U' erase '^?' werase '^W' newcrt
|
||||||
|
|
||||||
|
# get the terminal type?
|
||||||
|
# (nah, ansi is good enough)
|
||||||
|
|
||||||
|
# run the installation script.
|
||||||
|
echo 'To install NetBSD, enter the command: install'
|
||||||
|
echo 'Otherwise, enter the command: halt'
|
||||||
|
# /install XXX - Not yet...
|
||||||
|
|
|
@ -0,0 +1,91 @@
|
||||||
|
#
|
||||||
|
# $NetBSD: mr.termcap,v 1.1 2001/05/18 00:16:39 fredette Exp $
|
||||||
|
#
|
||||||
|
|
||||||
|
#
|
||||||
|
# Customized for installation on Sun machines.
|
||||||
|
#
|
||||||
|
|
||||||
|
dumb:\
|
||||||
|
:am:\
|
||||||
|
:co#80:\
|
||||||
|
:bl=^G:cr=^M:do=^J:sf=^J:
|
||||||
|
unknown:\
|
||||||
|
:gn:\
|
||||||
|
:tc=dumb:
|
||||||
|
other|none of the above, but not exactly unknown:\
|
||||||
|
:am:gn:\
|
||||||
|
:co#80:\
|
||||||
|
:cl=^M^J:do=^J:ho=^M:
|
||||||
|
|
||||||
|
arpanet|bussiplexer|dialup|ethernet|network|net|patch|plugboard|switch|network switch or dialup:\
|
||||||
|
:tc=unknown:
|
||||||
|
lpr|printer|print|printing|line printer:\
|
||||||
|
:hc:os:\
|
||||||
|
:co#132:li#66:\
|
||||||
|
:bl=^G:cr=^M:do=^J:ff=^L:le=^H:sf=^J:
|
||||||
|
|
||||||
|
#### ANSI terminals and terminal emulators
|
||||||
|
#
|
||||||
|
# See near the end of this file for details on ANSI conformance.
|
||||||
|
# Don't mess with these entries! Lots of other entries depend on them!
|
||||||
|
#
|
||||||
|
|
||||||
|
# (ansi: changed ":pt:" to ":it#8:" -- esr)
|
||||||
|
ansi|any ansi terminal with pessimistic assumptions:\
|
||||||
|
:am:bs:\
|
||||||
|
:co#80:it#8:li#24:\
|
||||||
|
:ce=\E[K:cl=\E[;H\E[2J:cm=\E[%i%d;%dH:do=\E[B:\
|
||||||
|
:ho=\E[H:le=\E[D:nd=\E[C:up=\E[A:
|
||||||
|
#
|
||||||
|
vt100|dec-vt100|vt100-am|vt100am|dec vt100:\
|
||||||
|
:bl=^G:cr=^M:it#8:\
|
||||||
|
:do=^J:co#80:li#24:cl=50\E[;H\E[2J:sf=2*\ED:\
|
||||||
|
:le=^H:bs:am:cm=5\E[%i%d;%dH:nd=2\E[C:up=2\E[A:cb=3\E[1K:\
|
||||||
|
:ce=3\E[K:cd=50\E[J:so=2\E[7m:se=2\E[m:us=2\E[4m:ue=2\E[m:\
|
||||||
|
:md=2\E[1m:mr=2\E[7m:mb=2\E[5m:me=2\E[m:is=\E[1;24r\E[24;1H:\
|
||||||
|
:if=/usr/share/tabset/vt100:\
|
||||||
|
:rs=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h:ks=\E[?1h\E=:ke=\E[?1l\E>:\
|
||||||
|
:ku=\EOA:kd=\EOB:kr=\EOC:kl=\EOD:kb=^H:\
|
||||||
|
:ho=\E[H:k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:pt:sr=2*\EM:vt#3:xn:\
|
||||||
|
:sc=\E7:rc=\E8:cs=\E[%i%d;%dr:
|
||||||
|
#
|
||||||
|
sun|Sun Microsystems Workstation console:\
|
||||||
|
:am:bs:km:mi:ms:pt:\
|
||||||
|
:co#80:it#8:li#34:\
|
||||||
|
:AL=\E[%dL:DC=\E[%dP:DL=\E[%dM:IC=\E[%d@:al=\E[L:\
|
||||||
|
:bl=^G:cd=\E[J:ce=\E[K:cl=^L:cm=\E[%i%d;%dH:cr=^M:\
|
||||||
|
:dc=\E[P:dl=\E[M:do=\E[B:ei=:ic=\E[@:im=:is=\E[1r:\
|
||||||
|
:k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:kd=\E[B:kh=\E[H:\
|
||||||
|
:kl=\E[D:kr=\E[C:ku=\E[A:le=^H:nd=\E[C:rs=\E[1r:\
|
||||||
|
:se=\E[m:sf=^J:so=\E[7m:ta=^I:up=\E[A:
|
||||||
|
#
|
||||||
|
xterm|vs100|xterm terminal emulator (X11R6 Window System):\
|
||||||
|
:am:bs:km:mi:ms:pt:xn:xo:\
|
||||||
|
:co#80:it#8:li#65:\
|
||||||
|
:@7=\E[[:AL=\E[%dL:DC=\E[%dP:DL=\E[%dM:F1=\E[23~:\
|
||||||
|
:F2=\E[24~:IC=\E[%d@:LE=\E[%dD:UP=\E[%dA:\
|
||||||
|
:ac=++\054\054..00II--``aaffgghhjjkkllmmnnooqqssttuuvvwwxx~~:\
|
||||||
|
:ae=\E(B:al=\E[L:as=\E(0:bl=^G:cd=\E[J:ce=\E[K:\
|
||||||
|
:cl=\E[H\E[2J:cm=\E[%i%d;%dH:cr=^M:cs=\E[%i%d;%dr:\
|
||||||
|
:ct=\E[3k:dc=\E[P:dl=\E[M:do=^J:ei=\E[4l:ho=\E[H:\
|
||||||
|
:ic=\E[@:im=\E[4h:\
|
||||||
|
:is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;3;4;6l\E[4l:\
|
||||||
|
:k1=\E[11~:k2=\E[12~:k3=\E[13~:k4=\E[14~:k5=\E[15~:\
|
||||||
|
:k6=\E[17~:k7=\E[18~:k8=\E[19~:k9=\E[20~:k;=\E[21~:\
|
||||||
|
:kI=\E[2~:kN=\E[6~:kP=\E[5~:kb=^H:kd=\EOB:\
|
||||||
|
:ke=\E[?1l\E>:kh=\E[@:kl=\EOD:kr=\EOC:ks=\E[?1h\E=:\
|
||||||
|
:ku=\EOA:le=^H:md=\E[1m:me=\E[m:mr=\E[7m:nd=\E[C:\
|
||||||
|
:r2=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;3;4;6l\E[4l\E<:\
|
||||||
|
:rc=\E8:sc=\E7:se=\E[m:sf=^J:so=\E[7m:sr=\EM:ta=^I:\
|
||||||
|
:te=\E[2J\E[?47l\E8:ti=\E7\E[?47h:u6=\E[%d;%dR:\
|
||||||
|
:u7=\E[6n:u8=\E[?1;2c:u9=\E[c:ue=\E[m:up=\E[A:\
|
||||||
|
:us=\E[4m:
|
||||||
|
xterm24|vs100-24|xterm terminal emulator (24 lines) (X11R6 window system):\
|
||||||
|
:co#80:li#24:\
|
||||||
|
:tc=xterm:
|
||||||
|
xterm25|vs100-25|xterm terminal emulator (25 lines) (X11R6 window system):\
|
||||||
|
:co#80:li#24:\
|
||||||
|
:tc=xterm:
|
||||||
|
xterms|vs100s|xterm terminal emulator (small) (X11R6 window system):\
|
||||||
|
:tc=xterm24:
|
|
@ -0,0 +1,26 @@
|
||||||
|
# $NetBSD: ramdisk.list,v 1.1 2001/05/18 00:16:39 fredette Exp $
|
||||||
|
|
||||||
|
# various files that we need in /etc for the install
|
||||||
|
|
||||||
|
COPY ${TOPDIR}/common/rd.disktab etc/disktab
|
||||||
|
COPY ${TOPDIR}/common/rd.fstab etc/fstab
|
||||||
|
COPY ${TOPDIR}/common/rd.protocols etc/protocols
|
||||||
|
COPY ${TOPDIR}/common/rd.services etc/services
|
||||||
|
COPY ${TOPDIR}/common/rd.passwd etc/passwd
|
||||||
|
COPY ${TOPDIR}/common/rd.sshrc .sshrc
|
||||||
|
COPY ${TOPDIR}/common/rd.welcome .welcome
|
||||||
|
|
||||||
|
COPY ${DESTDIR}/etc/netconfig etc/netconfig
|
||||||
|
|
||||||
|
# Fake /usr
|
||||||
|
SPECIAL ln -s . usr
|
||||||
|
|
||||||
|
# Shell lacks pipe support, so use this.
|
||||||
|
SPECIAL mkfifo dev/pipe
|
||||||
|
|
||||||
|
# copy the MAKEDEV script and make some devices
|
||||||
|
# Using a hacked MAKEDEV to conserve inodes...
|
||||||
|
# No block devices, and only partitions a-d.
|
||||||
|
COPY ${TOPDIR}/common/rd.MAKEDEV dev/MAKEDEV
|
||||||
|
SPECIAL cd dev; sh MAKEDEV std md0 cd0 st0 st1 sd0 sd1 sd2 xd0 xy0 fd0
|
||||||
|
SPECIAL /bin/rm dev/MAKEDEV
|
|
@ -0,0 +1,39 @@
|
||||||
|
#
|
||||||
|
# $NetBSD: ramdisk.tree,v 1.1 2001/05/18 00:16:39 fredette Exp $
|
||||||
|
#
|
||||||
|
|
||||||
|
/set type=dir uname=root gname=wheel mode=0755
|
||||||
|
# .
|
||||||
|
.
|
||||||
|
|
||||||
|
# ./bin
|
||||||
|
bin
|
||||||
|
# ./bin
|
||||||
|
..
|
||||||
|
|
||||||
|
# ./dev
|
||||||
|
dev
|
||||||
|
# ./dev
|
||||||
|
..
|
||||||
|
|
||||||
|
# ./etc
|
||||||
|
etc
|
||||||
|
# ./etc
|
||||||
|
..
|
||||||
|
|
||||||
|
# ./mnt
|
||||||
|
mnt
|
||||||
|
# ./mnt
|
||||||
|
..
|
||||||
|
|
||||||
|
# ./sbin
|
||||||
|
sbin
|
||||||
|
# ./sbin
|
||||||
|
..
|
||||||
|
|
||||||
|
# ./tmp
|
||||||
|
tmp
|
||||||
|
# ./tmp
|
||||||
|
..
|
||||||
|
|
||||||
|
# ./usr will be a link to root
|
|
@ -0,0 +1,261 @@
|
||||||
|
#!/bin/sh -
|
||||||
|
#
|
||||||
|
# $NetBSD: rd.MAKEDEV,v 1.1 2001/05/18 00:16:39 fredette Exp $
|
||||||
|
#
|
||||||
|
# Copyright (c) 1990 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.
|
||||||
|
#
|
||||||
|
# @(#)MAKEDEV 5.5 (Berkeley) 5/28/91
|
||||||
|
#
|
||||||
|
# Device "make" file. Valid arguments:
|
||||||
|
# std standard devices
|
||||||
|
# local configuration specific devices
|
||||||
|
# Tapes:
|
||||||
|
# st* SCSI tape
|
||||||
|
# Disks:
|
||||||
|
# sd* Sun SCSI disks
|
||||||
|
# fd* Floppies
|
||||||
|
# vnd* "file" pseudo-disks
|
||||||
|
# ccd* concatenated disk driver
|
||||||
|
# raid* RAIDframe disk driver
|
||||||
|
# md* memory pseudo-disk devices
|
||||||
|
# Pseudo terminals:
|
||||||
|
# pty* set of 16 master and slave pseudo terminals
|
||||||
|
# Special purpose devices:
|
||||||
|
# bwtwo* monochromatic frame buffer
|
||||||
|
# cgtwo* 8-bit VME bus color frame buffer
|
||||||
|
# bpf* packet filter
|
||||||
|
# lkm loadable kernel modules interface
|
||||||
|
# tun* network tunnel driver
|
||||||
|
# random Random number generator
|
||||||
|
# scsibus* SCSI busses, see scsictl(8), scsi(4)
|
||||||
|
|
||||||
|
# XXX - Keep /usr/etc so SunOS can find chown
|
||||||
|
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/etc
|
||||||
|
umask 77
|
||||||
|
|
||||||
|
# set this to echo for Echo-Only debugging
|
||||||
|
eo=
|
||||||
|
|
||||||
|
# mk name b/c major minor [mode] [group]
|
||||||
|
mk() {
|
||||||
|
$eo rm -f $1
|
||||||
|
$eo mknod $1 $2 $3 $4
|
||||||
|
$eo chmod ${5-666} $1
|
||||||
|
test -n "$6" && $eo chgrp $6 $1
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
for arg
|
||||||
|
do
|
||||||
|
|
||||||
|
unit=`expr $arg : '[a-z][a-z]*\([0-9][0-9]*\)'`
|
||||||
|
[ "$unit" ] || unit=0
|
||||||
|
|
||||||
|
case $arg in
|
||||||
|
|
||||||
|
all)
|
||||||
|
sh $0 std fd pty0
|
||||||
|
sh $0 bwtwo0 cgtwo0
|
||||||
|
sh $0 raid0 raid1 raid2 raid3
|
||||||
|
sh $0 sd0 sd1 sd2 sd3 sd4 sd5 sd6
|
||||||
|
sh $0 cd0 cd1 st0 st1 st2 fd0
|
||||||
|
sh $0 xd0 xd1 xd2 xd3
|
||||||
|
sh $0 xy0 xy1 xy2 xy3
|
||||||
|
sh $0 bpf0 bpf1 bpf2 bpf3 bpf4 bpf5 bpf6 bpf7
|
||||||
|
sh $0 tun0 tun1
|
||||||
|
sh $0 lkm random
|
||||||
|
sh $0 scsibus0 scsibus1 scsibus2 scsibus3
|
||||||
|
sh $0 local
|
||||||
|
;;
|
||||||
|
|
||||||
|
std)
|
||||||
|
mk console c 0 0 622
|
||||||
|
mk kd c 1 0 622
|
||||||
|
mk tty c 2 0
|
||||||
|
|
||||||
|
mk mem c 3 0 640 kmem
|
||||||
|
mk kmem c 3 1 640 kmem
|
||||||
|
mk null c 3 2
|
||||||
|
mk zero c 3 12
|
||||||
|
mk leds c 3 13
|
||||||
|
mk drum c 7 0 640 kmem
|
||||||
|
|
||||||
|
mk ttya c 12 0
|
||||||
|
mk ttyb c 12 1
|
||||||
|
mk mouse c 13 0
|
||||||
|
mk klog c 16 0 600
|
||||||
|
mk fb c 22 0
|
||||||
|
mk kbd c 29 0
|
||||||
|
mk stdin c 23 0
|
||||||
|
mk stdout c 23 1
|
||||||
|
mk stderr c 23 2
|
||||||
|
;;
|
||||||
|
|
||||||
|
fd)
|
||||||
|
rm -f fd/*
|
||||||
|
mkdir fd > /dev/null 2>&1
|
||||||
|
n=0
|
||||||
|
while [ $n -lt 64 ]; do
|
||||||
|
mk fd/$n c 23 $n 666
|
||||||
|
n=$(($n + 1))
|
||||||
|
done
|
||||||
|
chown -R root.wheel fd
|
||||||
|
chmod 755 fd
|
||||||
|
;;
|
||||||
|
|
||||||
|
bpf*)
|
||||||
|
mk bpf$unit c 36 $unit 600
|
||||||
|
;;
|
||||||
|
|
||||||
|
tun*)
|
||||||
|
mk tun$unit c 24 $unit 600
|
||||||
|
;;
|
||||||
|
|
||||||
|
pty*)
|
||||||
|
class=${arg#pty}
|
||||||
|
case $unit in
|
||||||
|
0) name=p;;
|
||||||
|
1) name=q;;
|
||||||
|
2) name=r;;
|
||||||
|
3) name=s;;
|
||||||
|
4) name=t;;
|
||||||
|
5) name=u;;
|
||||||
|
6) name=v;;
|
||||||
|
7) name=w;;
|
||||||
|
8) name=x;;
|
||||||
|
9) name=y;;
|
||||||
|
10) name=z;;
|
||||||
|
11) name=P;;
|
||||||
|
12) name=Q;;
|
||||||
|
13) name=R;;
|
||||||
|
14) name=S;;
|
||||||
|
15) name=T;;
|
||||||
|
*) echo "$0: $i: pty unit must be between 0 and 15"
|
||||||
|
continue ;;
|
||||||
|
esac
|
||||||
|
rm -f tty$name[0-9a-f] pty$name[0-9a-f]
|
||||||
|
for j in 0 1 2 3 4 5 6 7 8 9 a b c d e f
|
||||||
|
do
|
||||||
|
case $j in
|
||||||
|
[0-9]) jn=$j ;;
|
||||||
|
a) jn=10 ;;
|
||||||
|
b) jn=11 ;;
|
||||||
|
c) jn=12 ;;
|
||||||
|
d) jn=13 ;;
|
||||||
|
e) jn=14 ;;
|
||||||
|
f) jn=15 ;;
|
||||||
|
esac
|
||||||
|
unit=$(($class * 16 + $jn))
|
||||||
|
mknod tty$name$j c 20 $unit
|
||||||
|
mknod pty$name$j c 21 $unit
|
||||||
|
done
|
||||||
|
chgrp wheel tty$name? pty$name?
|
||||||
|
chmod 666 tty$name? pty$name?
|
||||||
|
;;
|
||||||
|
|
||||||
|
ccd*|cd*|fd*|sd*|xd*|xy*|vnd*|raid*)
|
||||||
|
case $arg in
|
||||||
|
ccd*) name=ccd; blk=9; chr=33;;
|
||||||
|
cd*) name=cd; blk=18; chr=58;;
|
||||||
|
fd*) name=fd; blk=16; chr=54;;
|
||||||
|
raid*) name=raid; blk=25; chr=82;;
|
||||||
|
sd*) name=sd; blk=7; chr=17;;
|
||||||
|
xd*) name=xd; blk=10; chr=42;;
|
||||||
|
xy*) name=xy; blk=3; chr=9 ;;
|
||||||
|
vnd*) name=vnd; blk=5; chr=19;;
|
||||||
|
esac
|
||||||
|
case $unit in
|
||||||
|
[0-7]) offset=$(($unit * 8));;
|
||||||
|
*) echo bad unit for $name in: $arg;;
|
||||||
|
esac
|
||||||
|
for part in a.0 b.1 c.2 d.3 # e.4 f.5 g.6 h.7
|
||||||
|
do
|
||||||
|
(
|
||||||
|
tmp="$IFS" ; IFS="$IFS."
|
||||||
|
set -- $part
|
||||||
|
IFS="$tmp" ; unset tmp
|
||||||
|
minor=$(($offset + $2))
|
||||||
|
# mk $name$unit$1 b $blk $minor 640 operator
|
||||||
|
mk r$name$unit$1 c $chr $minor 640 operator
|
||||||
|
)
|
||||||
|
done
|
||||||
|
;;
|
||||||
|
|
||||||
|
st*)
|
||||||
|
name=st; blk=11; chr=18;
|
||||||
|
mk r$name$unit c $chr $(($unit * 16 + 0)) 660 operator
|
||||||
|
mk nr$name$unit c $chr $(($unit * 16 + 1)) 660 operator
|
||||||
|
mk er$name$unit c $chr $(($unit * 16 + 2)) 660 operator
|
||||||
|
mk enr$name$unit c $chr $(($unit * 16 + 3)) 660 operator
|
||||||
|
;;
|
||||||
|
|
||||||
|
bwtwo*)
|
||||||
|
mk bwtwo$unit c 27 $unit
|
||||||
|
;;
|
||||||
|
|
||||||
|
cgtwo*)
|
||||||
|
mk cgtwo$unit c 31 $unit
|
||||||
|
;;
|
||||||
|
|
||||||
|
md*)
|
||||||
|
name=md; blk=13; chr=52;
|
||||||
|
mk md${unit}a b $blk $(($unit * 8 + 0)) 640 operator
|
||||||
|
mk md${unit}c b $blk $(($unit * 8 + 2)) 640 operator
|
||||||
|
# mk rmd${unit}a c $chr $(($unit * 8 + 0)) 640 operator
|
||||||
|
# mk rmd${unit}c c $chr $(($unit * 8 + 2)) 640 operator
|
||||||
|
;;
|
||||||
|
|
||||||
|
lkm)
|
||||||
|
mk lkm c 72 0 640 kmem
|
||||||
|
;;
|
||||||
|
|
||||||
|
random)
|
||||||
|
mk random c 80 0 444
|
||||||
|
mk urandom c 80 1
|
||||||
|
;;
|
||||||
|
|
||||||
|
scsibus*)
|
||||||
|
mk scsibus${unit} c 81 $unit 644 wheel
|
||||||
|
;;
|
||||||
|
|
||||||
|
local)
|
||||||
|
umask 0
|
||||||
|
sh $0.local all
|
||||||
|
umask 77
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo $arg: unknown device
|
||||||
|
;;
|
||||||
|
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
# $NetBSD: rd.disktab,v 1.1 2001/05/18 00:16:39 fredette Exp $
|
||||||
|
# The ramdisk has no need for disktab (yet)
|
|
@ -0,0 +1,2 @@
|
||||||
|
# $NetBSD: rd.fstab,v 1.1 2001/05/18 00:16:39 fredette Exp $
|
||||||
|
/dev/md0a / ufs rw 1 1
|
|
@ -0,0 +1 @@
|
||||||
|
root::0:0:NetBSD RAM-disk root:/root:/bin/sh
|
|
@ -0,0 +1,6 @@
|
||||||
|
#
|
||||||
|
# etc/protocols (ramdisk version)
|
||||||
|
# $NetBSD: rd.protocols,v 1.1 2001/05/18 00:16:39 fredette Exp $
|
||||||
|
#
|
||||||
|
ip 0 IP
|
||||||
|
icmp 1 ICMP
|
|
@ -0,0 +1,56 @@
|
||||||
|
#
|
||||||
|
# etc/services (ramdisk version)
|
||||||
|
# $NetBSD: rd.services,v 1.1 2001/05/18 00:16:39 fredette Exp $
|
||||||
|
#
|
||||||
|
tcpmux 1/tcp
|
||||||
|
echo 7/tcp
|
||||||
|
echo 7/udp
|
||||||
|
discard 9/tcp sink null
|
||||||
|
discard 9/udp sink null
|
||||||
|
systat 11/tcp users
|
||||||
|
daytime 13/tcp
|
||||||
|
daytime 13/udp
|
||||||
|
netstat 15/tcp
|
||||||
|
chargen 19/tcp ttytst source
|
||||||
|
chargen 19/udp ttytst source
|
||||||
|
ftp-data 20/tcp
|
||||||
|
ftp 21/tcp
|
||||||
|
telnet 23/tcp
|
||||||
|
smtp 25/tcp mail
|
||||||
|
time 37/tcp timserver
|
||||||
|
time 37/udp timserver
|
||||||
|
nameserver 42/tcp name # IEN 116
|
||||||
|
whois 43/tcp nicname
|
||||||
|
domain 53/tcp nameserver
|
||||||
|
domain 53/udp nameserver
|
||||||
|
bootps 67/udp
|
||||||
|
bootpc 68/udp
|
||||||
|
tftp 69/udp
|
||||||
|
#
|
||||||
|
rje 77/tcp netrjs
|
||||||
|
finger 79/tcp
|
||||||
|
link 87/tcp ttylink
|
||||||
|
kerberos 88/tcp krb5 # Kerberos v5
|
||||||
|
kerberos 88/udp
|
||||||
|
supdup 95/tcp
|
||||||
|
# 100 - reserved
|
||||||
|
hostnames 101/tcp hostname
|
||||||
|
iso-tsap 102/tcp tsap
|
||||||
|
#
|
||||||
|
sunrpc 111/tcp
|
||||||
|
sunrpc 111/udp
|
||||||
|
|
||||||
|
#
|
||||||
|
# UNIX specific services
|
||||||
|
#
|
||||||
|
exec 512/tcp
|
||||||
|
biff 512/udp comsat
|
||||||
|
login 513/tcp
|
||||||
|
who 513/udp whod
|
||||||
|
shell 514/tcp cmd
|
||||||
|
syslog 514/udp
|
||||||
|
printer 515/tcp spooler
|
||||||
|
talk 517/udp
|
||||||
|
ntalk 518/udp
|
||||||
|
route 520/udp router routed
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
# .sshrc
|
||||||
|
# $NetBSD: rd.sshrc,v 1.1 2001/05/18 00:16:40 fredette Exp $
|
||||||
|
path /sbin:/bin
|
||||||
|
run cat /.welcome
|
|
@ -0,0 +1,23 @@
|
||||||
|
|
||||||
|
Welcome to the NetBSD/sun2 RAMDISK root!
|
||||||
|
|
||||||
|
This environment is designed to do only three things:
|
||||||
|
1: Partititon your disk (use the command: edlabel /dev/rsd0c)
|
||||||
|
2: Copy a miniroot image into the swap partition (/dev/rsd0b)
|
||||||
|
3: Reboot (using the swap partition, i.e. /dev/sd?b).
|
||||||
|
|
||||||
|
Copying the miniroot can be done several ways, allowing
|
||||||
|
the source of the miniroot image to be on any of these:
|
||||||
|
boot tape, NFS server, TFTP server, rsh server
|
||||||
|
|
||||||
|
The easiest is loading from tape, which is done as follows:
|
||||||
|
mt -f /dev/nrst0 rewind
|
||||||
|
mt -f /dev/nrst0 fsf 2
|
||||||
|
dd bs=32k if=/dev/nrst0 of=/dev/rsd0b
|
||||||
|
(For help with other methods, please see the install notes.)
|
||||||
|
|
||||||
|
To reboot using the swap partition, first use "halt",
|
||||||
|
then at the PROM monitor prompt use a command like:
|
||||||
|
b sd(,,1) -s
|
||||||
|
|
||||||
|
To view this message again, type: cat /.welcome
|
|
@ -0,0 +1,85 @@
|
||||||
|
#
|
||||||
|
# $NetBSD: rd_bin.conf,v 1.1 2001/05/18 00:16:40 fredette Exp $
|
||||||
|
#
|
||||||
|
# common/rd_bin.conf - unified binary for the ramdisk.
|
||||||
|
#
|
||||||
|
# The ramdisk root has to stay small enough so the kernel
|
||||||
|
# can be loaded in less than one megabyte of ram, including
|
||||||
|
# uninitialized data (bss). Otherwise it will not work on
|
||||||
|
# the Sun2/50. This is not too hard, because the ONLY
|
||||||
|
# tools needed in this root are those that one might use
|
||||||
|
# to initialize the disk label and copy a miniroot image
|
||||||
|
# into the swap partiton. Everything else is done after
|
||||||
|
# the machine is rebooted from the miniroot.
|
||||||
|
#
|
||||||
|
# Note that the "ln" directives below are not really about
|
||||||
|
# filesystem links, but rather the ability of the resulting
|
||||||
|
# crunched binary to select the right program when argv[0]
|
||||||
|
# matches the names on right of the "ln prog" directive.
|
||||||
|
# For example, the shell can be run with argv[0]="-sh"
|
||||||
|
# (login shell convention) but no such file will exist.
|
||||||
|
# Similarly, one may want to run "init" as "oinit"...
|
||||||
|
#
|
||||||
|
# Notes about what is included (or not) and why:
|
||||||
|
#
|
||||||
|
# Include mknod incase I forgot some device nodes...
|
||||||
|
# Support copying miniroot from NFS, TFTP, or CDROM.
|
||||||
|
# Need mount_ffs, mount_ufs to remount the ramdisk.
|
||||||
|
#
|
||||||
|
# Might use cat to look at files (it's small anyway).
|
||||||
|
# Need for copying miniroot from tape: dd, mt
|
||||||
|
# Keep to allow minor fixes: ln, mkdir, mv
|
||||||
|
# Small and handy: cat, echo, pwd, sync
|
||||||
|
#
|
||||||
|
# Note: ssh has no "if", so "test" is useless. Also,
|
||||||
|
# left out: cp, chmod, rm. The ramdisk does not really
|
||||||
|
# need them, and they pull in fts_* from libc.
|
||||||
|
#
|
||||||
|
# Might use these to get the miniroot: rsh, tftp
|
||||||
|
#
|
||||||
|
# Assume gunzip can run elsewhere, i.e.:
|
||||||
|
# rsh gzcat sun2.miniroot.gz
|
||||||
|
# No need to extract archives either...
|
||||||
|
#
|
||||||
|
|
||||||
|
#
|
||||||
|
# Here are all the programs, ordered by source location:
|
||||||
|
|
||||||
|
# Special programs used to save space...
|
||||||
|
srcdirs distrib/utils
|
||||||
|
progs init_s ssh tls zcat
|
||||||
|
ln init_s init oinit
|
||||||
|
ln ssh sh
|
||||||
|
ln ssh -sh # login shell (not actual file name)
|
||||||
|
ln tls ls
|
||||||
|
|
||||||
|
# These are built with special flags to save a little space.
|
||||||
|
# The x_ prefix is just to make them unique among all srcdirs.
|
||||||
|
progs x_dd x_ifconfig x_route
|
||||||
|
ln x_dd dd
|
||||||
|
ln x_ifconfig ifconfig
|
||||||
|
ln x_route route
|
||||||
|
|
||||||
|
srcdirs sbin
|
||||||
|
progs edlabel mknod mount
|
||||||
|
progs mount_cd9660 mount_ffs mount_nfs
|
||||||
|
progs reboot umount
|
||||||
|
ln mount_ffs ffs mount_ufs ufs
|
||||||
|
ln mount_nfs nfs
|
||||||
|
ln mount_cd9660 cd9660
|
||||||
|
ln reboot halt
|
||||||
|
|
||||||
|
srcdirs bin
|
||||||
|
progs cat echo ln mkdir mt mv pwd sync
|
||||||
|
|
||||||
|
srcdirs usr.bin
|
||||||
|
progs rsh
|
||||||
|
# progs tftp
|
||||||
|
|
||||||
|
# srcdirs usr.sbin
|
||||||
|
|
||||||
|
# srcdirs gnu/usr.bin
|
||||||
|
# progs cpio, gzip, tar
|
||||||
|
# ln gzip gzcat gunzip
|
||||||
|
|
||||||
|
libs libhack.o -lrmt -lutil -lz
|
|
@ -0,0 +1,46 @@
|
||||||
|
#
|
||||||
|
# $NetBSD: rd_bin.list,v 1.1 2001/05/18 00:16:40 fredette Exp $
|
||||||
|
#
|
||||||
|
|
||||||
|
# copy the crunched binary, link to it, and kill it
|
||||||
|
|
||||||
|
COPY ${OBJDIR}/rd_bin rd_bin
|
||||||
|
|
||||||
|
# From /usr/src/distrib/utils:
|
||||||
|
LINK rd_bin sbin/init
|
||||||
|
LINK rd_bin sbin/ifconfig
|
||||||
|
LINK rd_bin sbin/edlabel
|
||||||
|
LINK rd_bin sbin/route
|
||||||
|
LINK rd_bin bin/dd
|
||||||
|
LINK rd_bin bin/ls
|
||||||
|
LINK rd_bin bin/rsh
|
||||||
|
LINK rd_bin bin/sh
|
||||||
|
LINK rd_bin bin/ssh
|
||||||
|
# LINK rd_bin bin/tftp
|
||||||
|
|
||||||
|
# From /usr/src/sbin:
|
||||||
|
LINK rd_bin sbin/halt
|
||||||
|
LINK rd_bin sbin/mknod
|
||||||
|
LINK rd_bin sbin/mount
|
||||||
|
LINK rd_bin sbin/mount_cd9660
|
||||||
|
LINK rd_bin sbin/mount_ffs
|
||||||
|
LINK rd_bin sbin/mount_nfs
|
||||||
|
LINK rd_bin sbin/mount_ufs
|
||||||
|
LINK rd_bin sbin/reboot
|
||||||
|
LINK rd_bin sbin/umount
|
||||||
|
|
||||||
|
# From /usr/src/bin:
|
||||||
|
LINK rd_bin bin/cat
|
||||||
|
# LINK rd_bin bin/chmod
|
||||||
|
# LINK rd_bin bin/cp
|
||||||
|
LINK rd_bin bin/echo
|
||||||
|
LINK rd_bin bin/ln
|
||||||
|
LINK rd_bin bin/mkdir
|
||||||
|
LINK rd_bin bin/mt
|
||||||
|
LINK rd_bin bin/mv
|
||||||
|
LINK rd_bin bin/pwd
|
||||||
|
# LINK rd_bin bin/rm
|
||||||
|
LINK rd_bin bin/sync
|
||||||
|
LINK rd_bin bin/zcat
|
||||||
|
|
||||||
|
SPECIAL rm rd_bin
|
|
@ -0,0 +1,226 @@
|
||||||
|
/* $NetBSD: rdsetroot.c,v 1.1 2001/05/18 00:16:40 fredette Exp $ */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (c) 1994 Gordon W. Ross
|
||||||
|
* 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. 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.
|
||||||
|
*
|
||||||
|
* $NetBSD: rdsetroot.c,v 1.1 2001/05/18 00:16:40 fredette Exp $
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copy a ramdisk image into the space reserved for it.
|
||||||
|
* Kernel variables: md_root_size, md_root_image
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/file.h>
|
||||||
|
#include <sys/mman.h>
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <a.out.h>
|
||||||
|
|
||||||
|
extern off_t lseek();
|
||||||
|
|
||||||
|
struct exec head;
|
||||||
|
char *file;
|
||||||
|
|
||||||
|
/* Virtual addresses of the symbols we frob. */
|
||||||
|
long rd_root_image_va, rd_root_size_va;
|
||||||
|
|
||||||
|
/* Offsets relative to start of data segment. */
|
||||||
|
long rd_root_image_off, rd_root_size_off;
|
||||||
|
|
||||||
|
/* value in the location at rd_root_size_off */
|
||||||
|
int rd_root_size_val;
|
||||||
|
|
||||||
|
/* pointers to pieces of mapped file */
|
||||||
|
char *dataseg;
|
||||||
|
|
||||||
|
/* and lengths */
|
||||||
|
int data_len;
|
||||||
|
int data_off;
|
||||||
|
int data_pgoff;
|
||||||
|
|
||||||
|
main(argc,argv)
|
||||||
|
char **argv;
|
||||||
|
{
|
||||||
|
int fd, n;
|
||||||
|
int *ip;
|
||||||
|
char *cp;
|
||||||
|
|
||||||
|
if (argc < 2) {
|
||||||
|
printf("%s: missing file name\n", argv[0]);
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
file = argv[1];
|
||||||
|
|
||||||
|
fd = open(file, O_RDWR);
|
||||||
|
if (fd < 0) {
|
||||||
|
perror(file);
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
n = read(fd, &head, sizeof(head));
|
||||||
|
if (n < sizeof(head)) {
|
||||||
|
printf("%s: reading header\n", file);
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (N_BADMAG(head)) {
|
||||||
|
printf("%s: bad magic number\n");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef DEBUG
|
||||||
|
printf(" text: %9d\n", head.a_text);
|
||||||
|
printf(" data: %9d\n", head.a_data);
|
||||||
|
printf(" bss: %9d\n", head.a_bss);
|
||||||
|
printf(" syms: %9d\n", head.a_syms);
|
||||||
|
printf("entry: 0x%08X\n", head.a_entry);
|
||||||
|
printf("trsiz: %9d\n", head.a_trsize);
|
||||||
|
printf("drsiz: %9d\n", head.a_drsize);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if (head.a_syms <= 0) {
|
||||||
|
printf("%s: no symbols\n", file);
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
if (head.a_trsize ||
|
||||||
|
head.a_drsize)
|
||||||
|
{
|
||||||
|
printf("%s: has relocations\n");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
find_rd_root_image(file);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Map in the whole data segment.
|
||||||
|
* The file offset needs to be page aligned.
|
||||||
|
*/
|
||||||
|
data_off = N_DATOFF(head);
|
||||||
|
data_len = head.a_data;
|
||||||
|
/* align... */
|
||||||
|
data_pgoff = N_PAGSIZ(head) - 1;
|
||||||
|
data_pgoff &= data_off;
|
||||||
|
data_off -= data_pgoff;
|
||||||
|
data_len += data_pgoff;
|
||||||
|
/* map in in... */
|
||||||
|
dataseg = mmap(NULL, /* any address is ok */
|
||||||
|
data_len, /* length */
|
||||||
|
PROT_READ | PROT_WRITE,
|
||||||
|
MAP_FILE | MAP_SHARED,
|
||||||
|
fd, data_off);
|
||||||
|
if ((long)dataseg == -1) {
|
||||||
|
printf("%s: can not map data seg\n", file);
|
||||||
|
perror(file);
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
dataseg += data_pgoff;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Find value in the location: rd_root_size
|
||||||
|
*/
|
||||||
|
ip = (int*) (dataseg + rd_root_size_off);
|
||||||
|
rd_root_size_val = *ip;
|
||||||
|
#ifdef DEBUG
|
||||||
|
printf("md_root_size val: 0x%08X (%d blocks)\n",
|
||||||
|
rd_root_size_val, (rd_root_size_val >> 9));
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copy the symbol table and string table.
|
||||||
|
*/
|
||||||
|
#ifdef DEBUG
|
||||||
|
printf("copying root image...\n");
|
||||||
|
#endif
|
||||||
|
n = read(0, dataseg + rd_root_image_off,
|
||||||
|
rd_root_size_val);
|
||||||
|
if (n < 0) {
|
||||||
|
perror("read");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
msync(dataseg - data_pgoff, data_len, 0);
|
||||||
|
|
||||||
|
#ifdef DEBUG
|
||||||
|
printf("...copied %d bytes\n", n);
|
||||||
|
#endif
|
||||||
|
close(fd);
|
||||||
|
exit(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Find locations of the symbols to patch.
|
||||||
|
*/
|
||||||
|
struct nlist wantsyms[] = {
|
||||||
|
{ "_md_root_size", 0 },
|
||||||
|
{ "_md_root_image", 0 },
|
||||||
|
{ NULL, 0 },
|
||||||
|
};
|
||||||
|
|
||||||
|
find_rd_root_image(file)
|
||||||
|
char *file;
|
||||||
|
{
|
||||||
|
int data_va;
|
||||||
|
int std_entry;
|
||||||
|
|
||||||
|
if (nlist(file, wantsyms)) {
|
||||||
|
printf("%s: no md_root_image symbols?\n", file);
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
std_entry = N_TXTADDR(head) +
|
||||||
|
(head.a_entry & (N_PAGSIZ(head)-1));
|
||||||
|
data_va = N_DATADDR(head);
|
||||||
|
if (head.a_entry != std_entry) {
|
||||||
|
printf("%s: warning: non-standard entry point: 0x%08x\n",
|
||||||
|
file, head.a_entry);
|
||||||
|
printf("\texpecting entry=0x%X\n", std_entry);
|
||||||
|
data_va += (head.a_entry - std_entry);
|
||||||
|
}
|
||||||
|
|
||||||
|
rd_root_size_off = wantsyms[0].n_value - data_va;
|
||||||
|
rd_root_image_off = wantsyms[1].n_value - data_va;
|
||||||
|
#ifdef DEBUG
|
||||||
|
printf(".data segment va: 0x%08X\n", data_va);
|
||||||
|
printf("md_root_size va: 0x%08X\n", wantsyms[0].n_value);
|
||||||
|
printf("md_root_image va: 0x%08X\n", wantsyms[1].n_value);
|
||||||
|
printf("md_root_size off: 0x%08X\n", rd_root_size_off);
|
||||||
|
printf("md_root_image off: 0x%08X\n", rd_root_image_off);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Sanity check locations of db_* symbols
|
||||||
|
*/
|
||||||
|
if (rd_root_image_off < 0 || rd_root_image_off >= head.a_data) {
|
||||||
|
printf("%s: md_root_image not in data segment?\n", file);
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
if (rd_root_size_off < 0 || rd_root_size_off >= head.a_data) {
|
||||||
|
printf("%s: md_root_size not in data segment?\n", file);
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,86 @@
|
||||||
|
# $NetBSD: Makefile,v 1.1 2001/05/18 00:16:40 fredette Exp $
|
||||||
|
|
||||||
|
TOP= ${.CURDIR}/..
|
||||||
|
|
||||||
|
# This include just sets REV=XX
|
||||||
|
.include "${TOP}/Makefile.inc"
|
||||||
|
|
||||||
|
IMAGE= miniroot
|
||||||
|
|
||||||
|
TREE= ${TOP}/common/${IMAGE}.tree
|
||||||
|
|
||||||
|
LISTS= ${TOP}/common/${IMAGE}.list \
|
||||||
|
${TOP}/common/mini_sbin.list \
|
||||||
|
${TOP}/common/mini_bin.list \
|
||||||
|
${TOP}/common/mini_usr.list
|
||||||
|
|
||||||
|
KERNEL = ${KERNOBJDIR}/INSTALL/netbsd
|
||||||
|
|
||||||
|
MOUNT_POINT?= /mnt
|
||||||
|
VND?= vnd1
|
||||||
|
VND_DEV?= /dev/${VND}a
|
||||||
|
VND_RDEV?= /dev/r${VND}a
|
||||||
|
VND_CRDEV?= /dev/r${VND}c
|
||||||
|
|
||||||
|
# These are all the parameters for the miniroot: (12MB)
|
||||||
|
DISKTYPE= miniroot
|
||||||
|
SIZE= 12
|
||||||
|
# bigendian, old format, minfree, opt, b/i, cpg
|
||||||
|
NEWFSARGS= -B be -O -m 0 -o space -i 8192 -c 16
|
||||||
|
|
||||||
|
CLEANFILES= ${IMAGE}.gz ${IMAGE} ${IMAGE}.tmp install.sub
|
||||||
|
|
||||||
|
all: ${IMAGE}.gz
|
||||||
|
|
||||||
|
${IMAGE}.gz: ${TREE} ${LISTS} install.sub
|
||||||
|
dd if=/dev/zero of=${IMAGE} bs=1024k count=${SIZE}
|
||||||
|
vnconfig -t ${DISKTYPE} -v -c ${VND} ${IMAGE}
|
||||||
|
disklabel -f ${.CURDIR}/disktab -rw ${VND} ${DISKTYPE}
|
||||||
|
newfs ${NEWFSARGS} ${VND_RDEV}
|
||||||
|
mount ${VND_DEV} ${MOUNT_POINT}
|
||||||
|
mtree -def ${TREE} -p ${MOUNT_POINT}/ -u
|
||||||
|
cp ${KERNEL} ${MOUNT_POINT}/netbsd
|
||||||
|
TOPDIR=${TOP} CURDIR=${.CURDIR} DESTDIR=${DESTDIR} \
|
||||||
|
OBJDIR=${.OBJDIR} TARGDIR=${MOUNT_POINT} \
|
||||||
|
sh ${TOP}/common/RunList.sh ${LISTS}
|
||||||
|
sync ; sleep 1 ; sync
|
||||||
|
cd ${MOUNT_POINT} ;\
|
||||||
|
usr/mdec/installboot -v ufsboot usr/mdec/bootxx ${VND_CRDEV}
|
||||||
|
sync
|
||||||
|
@echo ""
|
||||||
|
@df -i ${MOUNT_POINT}
|
||||||
|
@echo ""
|
||||||
|
-umount ${MOUNT_POINT}
|
||||||
|
vnconfig -u ${VND}
|
||||||
|
gzip -9 -c ${IMAGE} > ${IMAGE}.tmp
|
||||||
|
-mv -f ${IMAGE}.tmp ${IMAGE}.gz
|
||||||
|
|
||||||
|
unconfig:
|
||||||
|
-umount -f ${MOUNT_POINT}
|
||||||
|
-vnconfig -u ${VND_DEV}
|
||||||
|
-/bin/rm -f ${IMAGE} ${IMAGE}.tmp
|
||||||
|
|
||||||
|
# Do not delete this if I change my mind and kill make...
|
||||||
|
.PRECIOUS: ${IMAGE}.gz
|
||||||
|
|
||||||
|
install.sub : ${TOP}/../miniroot/install.sub
|
||||||
|
sed -e "/^VERSION=/s/=.*/=${REV}/" < $? > $@
|
||||||
|
|
||||||
|
clean cleandir distclean:
|
||||||
|
-rm -f a.out core *.core *.o
|
||||||
|
-rm -f ${CLEANFILES}
|
||||||
|
|
||||||
|
.if !defined(RELEASEDIR)
|
||||||
|
release:
|
||||||
|
@echo setenv RELEASEDIR before doing that!
|
||||||
|
@false
|
||||||
|
.else # RELEASEDIR
|
||||||
|
release: ${IMAGE}.gz
|
||||||
|
-mkdir -p ${RELEASEDIR}/installation/miniroot
|
||||||
|
cp -p ${IMAGE}.gz \
|
||||||
|
${RELEASEDIR}/installation/miniroot/${IMAGE}.gz
|
||||||
|
.endif # RELEASEDIR
|
||||||
|
|
||||||
|
# Standard rules needed by the above...
|
||||||
|
.include <bsd.obj.mk>
|
||||||
|
.include <bsd.subdir.mk>
|
|
@ -0,0 +1,4 @@
|
||||||
|
miniroot|Installation root-on-swap FS image:\
|
||||||
|
:ty=simulated:se#512:ns#32:nt#8:nc#96:\
|
||||||
|
:ta=4.4BSD:oa#0:pa#24576:\
|
||||||
|
:ob#0:pb#0:oc#0:pc#24576:
|
|
@ -0,0 +1,12 @@
|
||||||
|
#!/bin/sh
|
||||||
|
# $NetBSD: Findrefs,v 1.1 2001/05/18 00:16:40 fredette Exp $
|
||||||
|
|
||||||
|
# Small helper to find out who pulls in X
|
||||||
|
|
||||||
|
[ "$1" ] || { echo "$0: match_string" ; exit 1; }
|
||||||
|
|
||||||
|
for f in *.lo
|
||||||
|
do
|
||||||
|
nm -p $f | grep "$1" && echo $f
|
||||||
|
done
|
||||||
|
|
|
@ -0,0 +1,92 @@
|
||||||
|
# $NetBSD: Makefile,v 1.1 2001/05/18 00:16:40 fredette Exp $
|
||||||
|
|
||||||
|
TOP= ${.CURDIR}/..
|
||||||
|
|
||||||
|
# This include just sets REV=XX
|
||||||
|
.include "${TOP}/Makefile.inc"
|
||||||
|
|
||||||
|
IMAGE= ramdisk
|
||||||
|
CBIN= rd_bin
|
||||||
|
|
||||||
|
TREE= ${TOP}/common/${IMAGE}.tree
|
||||||
|
|
||||||
|
LISTS= ${TOP}/common/${CBIN}.list \
|
||||||
|
${TOP}/common/${IMAGE}.list
|
||||||
|
|
||||||
|
KERNEL = ${KERNOBJDIR}/RAMDISK/netbsd
|
||||||
|
|
||||||
|
MOUNT_POINT?= /mnt
|
||||||
|
VND?= vnd1
|
||||||
|
VND_DEV?= /dev/${VND}a
|
||||||
|
VND_RDEV?= /dev/r${VND}a
|
||||||
|
|
||||||
|
# These are all the parameters for the root fs:
|
||||||
|
DISKTYPE= rdroot
|
||||||
|
SIZE= 400k
|
||||||
|
# bigendian, minfree, opt, b/i , cpg
|
||||||
|
NEWFSARGS= -B be -m 0 -o space -i 4096 -c 20
|
||||||
|
|
||||||
|
KERNELS= netbsd.RAMDISK
|
||||||
|
CLEANFILES= $(KERNELS) ${IMAGE}.fs netbsd-tmp
|
||||||
|
|
||||||
|
all: $(KERNELS)
|
||||||
|
|
||||||
|
netbsd.RAMDISK : ${IMAGE}.fs
|
||||||
|
cp ${KERNEL} netbsd-tmp
|
||||||
|
mdsetimage -v netbsd-tmp ${IMAGE}.fs
|
||||||
|
-mv -f netbsd-tmp $@
|
||||||
|
|
||||||
|
${IMAGE}.fs: ${TREE} ${LISTS} ${CBIN}
|
||||||
|
dd if=/dev/zero of=${IMAGE}.fs bs=${SIZE} count=1
|
||||||
|
vnconfig -t ${DISKTYPE} -v -c ${VND} ${IMAGE}.fs
|
||||||
|
disklabel -rw ${VND} ${DISKTYPE}
|
||||||
|
newfs ${NEWFSARGS} ${VND_RDEV}
|
||||||
|
mount ${VND_DEV} ${MOUNT_POINT}
|
||||||
|
mtree -def ${TREE} -p ${MOUNT_POINT}/ -u
|
||||||
|
TOPDIR=${TOP} CURDIR=${.CURDIR} DESTDIR=${DESTDIR} \
|
||||||
|
OBJDIR=${.OBJDIR} TARGDIR=${MOUNT_POINT} \
|
||||||
|
sh ${TOP}/common/RunList.sh ${LISTS}
|
||||||
|
sync
|
||||||
|
@echo ""
|
||||||
|
@df -i ${MOUNT_POINT}
|
||||||
|
@echo ""
|
||||||
|
umount ${MOUNT_POINT}
|
||||||
|
vnconfig -u ${VND}
|
||||||
|
|
||||||
|
unconfig:
|
||||||
|
-umount -f ${MOUNT_POINT}
|
||||||
|
-vnconfig -u ${VND_DEV}
|
||||||
|
-/bin/rm -f ${IMAGE}.fs
|
||||||
|
|
||||||
|
# Do not delete this if I change my mind and kill make...
|
||||||
|
.PRECIOUS: ${IMAGE}.fs
|
||||||
|
|
||||||
|
# Rules for making ${CBIN} ...
|
||||||
|
.include "${TOP}/common/Make.crunch"
|
||||||
|
|
||||||
|
# This is listed in rd_bin.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"
|
||||||
|
|
||||||
|
clean cleandir distclean:
|
||||||
|
-rm -f a.out core *.core *.o *.cro *.c
|
||||||
|
-rm -f ${CLEANFILES}
|
||||||
|
|
||||||
|
.if !defined(RELEASEDIR)
|
||||||
|
release:
|
||||||
|
@echo setenv RELEASEDIR before doing that!
|
||||||
|
@false
|
||||||
|
.else # RELEASEDIR
|
||||||
|
release: $(KERNELS)
|
||||||
|
.for x in ${KERNELS}
|
||||||
|
gzip -c -9 < ${x} > \
|
||||||
|
${RELEASEDIR}/binary/kernel/${x}.gz
|
||||||
|
.endfor # KERNELS
|
||||||
|
.endif # RELEASEDIR
|
||||||
|
|
||||||
|
# Standard rules needed by the above...
|
||||||
|
.include <bsd.obj.mk>
|
||||||
|
.include <bsd.subdir.mk>
|
|
@ -0,0 +1,16 @@
|
||||||
|
#!/bin/sh
|
||||||
|
# $NetBSD: Showsyms,v 1.1 2001/05/18 00:16:40 fredette Exp $
|
||||||
|
# Small helper to print out symbols in a useful order.
|
||||||
|
|
||||||
|
tf=_tmp$$
|
||||||
|
|
||||||
|
nm -n rd_bin.syms | egrep -v ' (gcc2|___gnu)_compiled' > $tf
|
||||||
|
|
||||||
|
grep -i ' u ' $tf
|
||||||
|
grep -i ' a ' $tf
|
||||||
|
grep -i ' t ' $tf
|
||||||
|
grep -i ' d ' $tf
|
||||||
|
grep -i ' b ' $tf
|
||||||
|
rm -f $tf
|
||||||
|
|
||||||
|
nm -p rd_bin.syms | grep -i ' c '
|
Loading…
Reference in New Issue