head	1.7;
access;
symbols
	RELENG_3_5_0_RELEASE:1.4.2.4
	RELENG_3_4_0_RELEASE:1.4.2.4
	RELENG_3_3_0_RELEASE:1.4.2.4
	RELENG_3_2_PAO:1.4.2.3.0.2
	RELENG_3_2_PAO_BP:1.4.2.3
	RELENG_3_2_0_RELEASE:1.4.2.3
	RELENG_3_1_0_RELEASE:1.4
	RELENG_3:1.4.0.2
	RELENG_3_BP:1.4
	RELENG_3_0_0_RELEASE:1.3
	v0_4:1.1.1.1
	PICOBSD:1.1.1;
locks; strict;
comment	@# @;


1.7
date	99.08.22.21.42.34;	author dwhite;	state dead;
branches;
next	1.6;

1.6
date	99.06.14.15.37.13;	author roger;	state Exp;
branches;
next	1.5;

1.5
date	99.03.09.21.15.08;	author abial;	state Exp;
branches;
next	1.4;

1.4
date	99.01.14.23.14.46;	author abial;	state Exp;
branches
	1.4.2.1;
next	1.3;

1.3
date	98.09.26.17.27.18;	author abial;	state Exp;
branches;
next	1.2;

1.2
date	98.08.31.13.35.06;	author abial;	state Exp;
branches;
next	1.1;

1.1
date	98.08.27.17.38.42;	author abial;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	98.08.27.17.38.42;	author abial;	state Exp;
branches;
next	;

1.4.2.1
date	99.02.21.22.04.24;	author abial;	state Exp;
branches;
next	1.4.2.2;

1.4.2.2
date	99.03.09.21.19.11;	author abial;	state Exp;
branches;
next	1.4.2.3;

1.4.2.3
date	99.05.07.10.02.31;	author abial;	state Exp;
branches;
next	1.4.2.4;

1.4.2.4
date	99.08.22.23.07.46;	author dwhite;	state dead;
branches;
next	;


desc
@@


1.7
log
@Major PicoBSD update by luigi with some debugging help from myself.

. Now builds on -STABLE (-CURRENT is broken due to bugs)
. etc directory contents centralized instead of in each
  type directory (can exclude & override as desired)
. Removed extraneous language files (lang files for rc really necessary?)
. dialog-based build tool with support for custom floppy builds
. MFS image loads as a mfs_root module instead of compiled into kernel

THIS IS BROKEN ON CURRENT.  I'll MFC to -STABLE immediately following.
luigi tells me I have an OK from jkh on the MFC.

Submitted by:	luigi
@
text
@#! /bin/sh -

#
#	$Id: stage3,v 1.6 1999/06/14 15:37:13 roger Exp $
#
set -e

. ../Version

if [ ! -f kernel.gz ]; then
	echo "-> ERROR: you must build kernel.gz first"
	exit 1
fi

echo "-> Preparing 1.44 floppy filesystem..."
umount /dev/vn0 2> /dev/null || true
umount /mnt 2> /dev/null || true
vnconfig -u /dev/rvn0 2> /dev/null || true

dd of=picobsd.bin if=/dev/zero count=1440 bs=1k 2> /dev/null

awk 'BEGIN {printf "%c%c", 85, 170}' | \
                dd of=picobsd.bin obs=1 seek=510 conv=notrunc  2> /dev/null

#vnconfig -s labels -c /dev/rvn0 picobsd.bin 2>/dev/null
vnconfig -c /dev/rvn0 picobsd.bin 2>/dev/null
if [ "X$?" != "X0" ]
then
	echo "-> ERROR while doing vnconfig of picobsd.bin on /dev/rvn0..."
	echo "-> Aborting $0"
	exit 10
fi

dd if=/boot/boot1 of=picobsd.bin conv=notrunc 2> /dev/null

disklabel -Brw -b /boot/boot1 -s /boot/boot2 /dev/rvn0 fd1440 2>&1 >/dev/null
if [ "X$?" != "X0" ]
then
	echo "-> ERROR while labeling picobsd.bin on /dev/rvn0..."
	echo "-> Aborting $0"
	exit 10
fi

newfs -i 32768 -m 0 -p 0 -o space /dev/rvn0c 2>&1 >/dev/null

mount /dev/vn0c /mnt

pwd=`pwd`

cd ../${TYPE}/floppy.tree
echo "-> Copying language dependent files..."
for i in hosts motd rc resolv.conf
do
	cat ../lang/${i}.${LANGUAGE} | \
		sed -e "s/@@VER@@/${VER}/g" > \
		etc/${i}
done
if [ "${TYPE}" != "router" ]
then
	cat ../lang/rc.conf.${LANGUAGE} | \
		sed -e "s/@@VER@@/${VER}/g" > \
		etc/rc.conf
	cat ../lang/rc.network.${LANGUAGE}| \
		sed -e "s/@@VER@@/${VER}/g" > \
		etc/rc.network
fi

echo "-> Populating floppy filesystem..."
cp -pr . /mnt
rm -rf /mnt/CVS /mnt/etc/CVS /mnt/etc/ppp/CVS
if [ "${TYPE}" = "dial" ]
then
	pwd_mkdb -d etc/ etc/master.passwd
	mv etc/spwd.db /mnt/etc/
	rm etc/pwd.db
fi

if [ "X$?" != "X0" ]
then
	echo "-> ERROR while transferring ../${TYPE}/floppy.tree to /mnt..."
	echo "-> Aborting $0"
	exit 10
fi

cd ${pwd}
cp kernel.gz /mnt/kernel.gz
if [ "X$?" != "X0" ]
then
	echo "-> ERROR while transferring kernel.gz to /mnt..."
	echo "-> Aborting $0"
	exit 10
fi
mkdir /mnt/boot
mkdir /mnt/boot/defaults
cp /boot/loader .
# Make sure we have the a.out stubs we need...
if [ ! -f /usr/lib/aout/kzhead.o ]
then
	(cd ${SRC}/sys/i386/boot/kzipboot && make all install clean)
fi
kzip -v loader
mv loader.kz /mnt/boot/loader
rm -f loader loader.o
#echo "/boot/loader" >/mnt/boot.config
cp ${SRC}/sys/boot/forth/loader.4th /mnt/boot/
cp ${SRC}/sys/boot/forth/support.4th /mnt/boot/
cp ${SRC}/sys/boot/forth/loader.conf /mnt/boot/defaults
echo "userconfig_script_load=\"YES\"">/mnt/boot/loader.conf
for i in frames screen
do
	cp ${SRC}/share/examples/bootforth/${i}.4th /mnt/boot/
done
cp ../forth/loader.rc /mnt/boot/loader.rc
cp ../forth/menu.4th /mnt/boot/menu.4th
(echo "-> Fixing permissions"; cd /mnt; chown -R root *)
rm kernel.gz

df -ik /mnt

umount /mnt
vnconfig -u /dev/rvn0
@


1.6
log
@Update to PicoBSD 0.44 from RELENG_3
@
text
@d4 1
a4 1
#	$Id: stage3,v 1.4.2.3 1999/05/07 10:02:31 abial Exp $
@


1.5
log
@Take boot1/boot2 from their new place, i.e. /boot/, not from
(currently nonexistent) /usr/mdec/.

Submitted by:	luigi
@
text
@d4 1
a4 1
#	$Id: stage3,v 1.4 1999/01/14 23:14:46 abial Exp $
a68 3
cat ../lang/boot.help.${LANGUAGE} | \
	sed -e "s/@@VER@@/${VER}/g" > \
	/mnt/boot.help
d94 1
d96 5
d104 11
a114 3
echo "/boot/loader" >/mnt/boot.config
echo "load /kernel">/mnt/boot/loader.rc
echo "load -t userconfig_script /kernel.config">>/mnt/boot/loader.rc
@


1.4
log
@Make transition to ELF kernel. Fix the userconfig_script handling.
@
text
@d4 1
a4 1
#	$Id: stage3,v 1.3 1998/09/26 17:27:18 abial Exp $
d34 1
a34 1
dd if=/usr/mdec/boot1 of=picobsd.bin conv=notrunc 2> /dev/null
d36 1
a36 1
disklabel -Brw -b /usr/mdec/fdboot -s /usr/mdec/bootfd /dev/rvn0 fd1440 2>&1 >/dev/null
@


1.4.2.1
log
@A couple of fixes: copy login.conf correctly, install Forth menu.
@
text
@d4 1
a4 1
#	$Id: stage3,v 1.4 1999/01/14 23:14:46 abial Exp $
d102 2
a103 4
for i in menu frames screen boot
do
	cp ${SRC}/share/examples/bootforth/${i}.4th /mnt/boot/
done
@


1.4.2.2
log
@MFC: Take boot1/boot2 from their new place (/boot).

Submitted by:	luigi
@
text
@d4 1
a4 1
#	$Id: stage3,v 1.4.2.1 1999/02/21 22:04:24 abial Exp $
d34 1
a34 1
dd if=/boot/boot1 of=picobsd.bin conv=notrunc 2> /dev/null
d36 1
a36 1
disklabel -Brw -b /boot/boot1 -s /boot/boot2 /dev/rvn0 fd1440 2>&1 >/dev/null
@


1.4.2.3
log
@Assorted fixes to PicoBSD in preparation for 3.2-RELEASE:

* use system's kget instead of TinyWare version
* use /bin/sh instead of Ash - it was old, and not much smaller
* remove unused MIB files
* check for kzip stubs, and build them if necessary
* slightly update the docs
* use newer /boot/ contents
* use my own greeting menu.
* fix a couple of bugs in scripts
* bump revision number to 0.44

Submitted by:	me && various people from freebsd-small
@
text
@d4 1
a4 1
#	$Id: stage3,v 1.4.2.2 1999/03/09 21:19:11 abial Exp $
d69 3
a96 1
mkdir /mnt/boot/defaults
a97 5
# Make sure we have the a.out stubs we need...
if [ ! -f /usr/lib/aout/kzhead.o ]
then
	(cd ${SRC}/sys/i386/boot/kzipboot && make all install clean)
fi
d101 2
a102 6
#echo "/boot/loader" >/mnt/boot.config
cp ${SRC}/sys/boot/forth/loader.4th /mnt/boot/
cp ${SRC}/sys/boot/forth/support.4th /mnt/boot/
cp ${SRC}/sys/boot/forth/loader.conf /mnt/boot/defaults
echo "userconfig_script_load=\"YES\"">/mnt/boot/loader.conf
for i in frames screen
a105 2
cp ../forth/loader.rc /mnt/boot/loader.rc
cp ../forth/menu.4th /mnt/boot/menu.4th
@


1.4.2.4
log
@MFC: PicoBSD mega-upgrade.  It actually works in -STABLE, let's hope I
didn't miss anything.  According to luigi, I have jkh's OK on this.

Submitted by:  luigi
@
text
@d4 1
a4 1
#	$Id: stage3,v 1.4.2.3 1999/05/07 10:02:31 abial Exp $
@


1.3
log
@Small rearrangements for a bugfix release 0.41.
@
text
@d4 1
a4 1
#	$Id: stage3,v 1.2 1998/08/31 13:35:06 abial Exp $
d10 2
a11 2
if [ ! -f kernel.kz ]; then
	echo "-> ERROR: you must build kernel.kz first"
d89 1
a89 1
cp kernel.kz /mnt/kernel
d92 1
a92 1
	echo "-> ERROR while transferring kernel.kz to /mnt..."
d96 8
d105 1
a105 1
rm kernel.kz
@


1.2
log
@Remove CVS directories from the target floppy.

Submitted by:	Eric P. Scott <eps@@sirius.com>
@
text
@d4 1
a4 1
#	$Id: stage3,v 1.1.1.1 1998/08/27 17:38:42 abial Exp $
d8 2
d54 3
a56 1
	cp ../lang/${i}.${LANGUAGE} etc/${i}
d60 6
a65 2
	cp ../lang/rc.conf.${LANGUAGE} etc/rc.conf
	cp ../lang/rc.network.${LANGUAGE} etc/rc.network
d69 3
a71 1
cp ../lang/boot.help.${LANGUAGE} /mnt/boot.help
@


1.1
log
@Initial revision
@
text
@d4 1
a4 1
#	$Id: stage3,v 1.4 1998/08/10 19:06:48 abial Exp $
d63 1
@


1.1.1.1
log
@Initial import of PicoBSD v0.4 tree.
@
text
@@
