diff --git a/release/picobsd/README.html b/release/picobsd/README.html new file mode 100644 index 00000000000..ddb663b2e66 --- /dev/null +++ b/release/picobsd/README.html @@ -0,0 +1,18 @@ + +
+All documentation, instructions, list of supported hardware and FAQ are +in doc/ directory. The docs are marked with HTML tags, but we try to keep +them readable even without a browser. + +
Please start from here for general +description of the project and its features, or just go directly +here for detailed instructions on how to +build your version of PicoBSD. + +
Enjoy!
+ + + + diff --git a/release/picobsd/Version b/release/picobsd/Version new file mode 100644 index 00000000000..bd73f47072b --- /dev/null +++ b/release/picobsd/Version @@ -0,0 +1 @@ +0.4 diff --git a/release/picobsd/build/build b/release/picobsd/build/build new file mode 100755 index 00000000000..72bb3054c40 --- /dev/null +++ b/release/picobsd/build/build @@ -0,0 +1,347 @@ +#!/bin/sh - + +# +# $Id: build,v 1.8 1998/08/10 19:06:48 abial Exp $ +# + +# You can set the SRC variable which points to your source tree. It's +# /usr/src by default (most people shouldn't change it). +SRC=/usr/src + +# Default MFS sizes for different types of the floppy. Again, most people +# shouldn't change them unless they know what they are doing. + +DIAL_DFLT_SIZE=1600 +ROUTER_DFLT_SIZE=820 +NET_DFLT_SIZE=2100 +ISP_DFLT_SIZE=2100 + +# SET THIS if you're building on 2.2.x system +# +# RELENG_2_2=yes + +# Path to srcdirs of special program for init(8) (standard if empty) +INIT= + +# --------- YOU SHOULD NOT NEED TO CHANGE ANYTHING BELOW ----------- +# The "build" script will ask you for parameters. Just run it... :-) +# --------- YOU SHOULD NOT NEED TO CHANGE ANYTHING BELOW ----------- + +set -e + +# Build kernel with previously set parameters. + +build_kernel() { + echo "" + echo "-> We must make the PICOBSD${suffix}.${SIZE} kernel first..." + pwd=`pwd` + cat ../${TYPE}/conf/PICOBSD | grep -v "MFS_ROOT">${CONF}/PICOBSD${suffix}.${SIZE} + echo "options \"MFS_ROOT=${SIZE}\"" >>${CONF}/PICOBSD${suffix}.${SIZE} + cd ${CONF} + config PICOBSD${suffix}.${SIZE} + cd ../../compile/PICOBSD${suffix}.${SIZE} + make depend && make + cd ${pwd} +} + +# Main build procedure. It calls other scripts (stage1-3 and populate) +main() { + +if [ "${TYPE}" = "dial" ] +then + suffix="-D" +fi +if [ "${TYPE}" = "net" ] +then + suffix="-N" +fi +if [ "${TYPE}" = "isp" ] +then + suffix="-I" +fi +if [ "${TYPE}" = "router" ] +then + suffix="-R" +fi + +CONF="${SRC}/sys/i386/conf" + +clear +echo "-> Building with following parameters:" +echo -n " Type: ${TYPE}" +if [ "X${INIT}" != "X" ] +then + echo " (using ${INIT} as init(8))" +else + echo "" +fi +echo " MFS size: ${SIZE} kB" +echo " Language: ${LANGUAGE}" +echo "" +echo "-> We'll use the sources living in ${SRC}" +echo "" +echo "-> I hope you have checked the ../${TYPE}/conf/PICOBSD config file..." +echo "" +echo "" +sleep 2 + +# Now check if we must build the kernel first + +if [ ! -f ${SRC}/sys/i386/conf/PICOBSD${suffix}.${SIZE} ] +then + build_kernel +elif [ ! -f ${SRC}/sys/compile/PICOBSD${suffix}.${SIZE}/kernel ] +then + build_kernel +fi + +export SIZE LANGUAGE TYPE SRC RELENG_2_2 INIT + +for i in stage1 populate stage2 stage3 +do + echo "====================== ${i} started =====================" + ./${i} + if [ "X$?" != "X0" ] + then + echo "" + echo "-> ERROR in \"${i}\" script. Aborting the build process." + echo -n "-> Cleaning temporary files... " + umount -f /mnt + vnconfig -u /dev/rvn0 + ./clean ${TYPE} + echo "Done." + exit 10 + else + echo "==================== ${i} completed =====================" + fi +done +} + +# Set the LANGUAGE variable + +set_lang() { + clear + echo " Language setup" + echo "" + echo "Language can be either 'en' (English - default) or 'pl' (Polish)" + echo "" + read -p "Enter the LANGUAGE (en, pl): " LANGUAGE + if [ "X${LANGUAGE}" = "X" ] + then + LANGUAGE=en + fi +} + +# Set the INIT variable + +set_init() { + clear + echo " Choose your init(8) program" + echo "" + echo "You can choose either standard init(8) (which requires getty), or" + echo "you can choose 'oinit' from TinyWare collection." + echo "" + read -p "Enter the INIT (init, oinit): " INIT + if [ "X${INIT}" = "Xinit" ] + then + unset INIT + fi +} + +# Set the default MFS size depending on the type of setup + +set_dflt_size() { + echo "" + if [ "X${TYPE}" = "X" ] + then + TYPE=dial + fi + echo "Setting default MFS size for \"${TYPE}\" type floppy." + if [ "X${TYPE}" = "Xdial" ] + then + SIZE=$DIAL_DFLT_SIZE + elif [ "X${TYPE}" = "Xnet" ] + then + SIZE=$NET_DFLT_SIZE + elif [ "X${TYPE}" = "Xrouter" ] + then + SIZE=$ROUTER_DFLT_SIZE + elif [ "X${TYPE}" = "Xisp" ] + then + SIZE=$ISP_DFLT_SIZE + else + echo "Unknown type of setup: \"${TYPE}\". Aborting..." + exit 10 + fi +} + +# Set MFS size interactively + +set_size() { + clear + echo " Memory Filesystem (MFS) Size setup" + echo "" + echo " Size can be anything decent (usually 1700 or 2500) in kB." + echo " NOTE1: you can also use other numbers (e.g. 1500, 1456, 1789 ...)" + echo " even much bigger (like 4567), but keep in mind that this memory is" + echo " totally lost to other programs. Usually you want to keep this as small as" + echo " possible." + echo "" + echo " NOTE2: for pre-canned setups there are specific requirements:" + echo " dial - requires at least SIZE=$DIAL_DFLT_SIZE" + echo " router - requires at least SIZE=$ROUTER_DFLT_SIZE (500kB less without SNMP)" + echo " net - requires at least SIZE=$NET_DFLT_SIZE (500kB less without SNMP)" + echo " isp - requires at least SIZE=$ISP_DFLT_SIZE (500kB less without SNMP)" + echo "" + echo " The last two configurations are not likely to run reliably on machines" + echo " with less than 10MB of RAM, while the 'dial' is tested and proved to run" + echo " as many as ~30 processes on 10 consoles with only 8MB RAM. YMMV." + echo "" + read -p "Enter the SIZE in kB: " SIZE + if [ "X${SIZE}" = "X" ] + then + set_dflt_size + fi +} + +# Set type of floppy interactively + +set_type() { + clear + echo " Setup the type of configuration" + echo "" + + echo " Type can be either 'dial', 'router', 'net' or 'isp'. There are four" + echo " sets of configuration files in subdirs ../dial, ../router, ../net" + echo " and ../isp respectively - the contents of the floppy is constructed" + echo " basing on the Makefiles and scripts in them." + echo "" + echo " E.g. if you define TYPE=dial, you'll end up having a floppy which is" + echo " suitable for dialup access and not much else. If you define TYPE=net," + echo " you'll have a small router-fixit-like floppy, which lacks most" + echo " interactive tools. TYPE=isp gives you a dialin server floppy." + echo "" + read -p "Enter the TYPE of the floppy (dial, net, router, isp): " TYPE + if [ "X${TYPE}" = "X" ] + then + TYPE=dial + fi + if [ "X${TYPE}" = "Xrouter" ] + then + INIT=oinit + fi + if [ "X${TYPE}" = "Xdial" -a "X${INIT}" = "X" ] + then + set_init + fi + + set_dflt_size +} + +put_title() { + clear + echo " Building the PicoBSD v. 0.4 floppy" + echo "============================================================================" + echo "" +} + + +#------------------------------------------------------------------- +# Main entry of the script + +# If $1="package", it creates a neat set of floppies + +if [ X"$1" = X"package" ] +then + touch build.status + echo "##############################################" >>build.status + echo "## `date` ">>build.status + echo "##############################################" >>build.status + ./clean dial + for y in en pl + do + for z in dial router net isp + do + TYPE=${z} + LANGUAGE=${y} + set_dflt_size + echo "---------------------------------------------">>build.status + echo "Building TYPE=${z}, LANGUAGE=${y}, SIZE=${SIZE}" >>build.status + export TYPE SIZE LANGUAGE SRC RELENG_2_2 INIT + main + if [ "X$?" != "X0" ] + then + echo " ** FAILED! **">>build.status + else + echo " (ok)">>build.status + fi + mv picobsd.bin pb_${y}${suffix}.bin + echo "Calling ./clean for ${TYPE}, ${LANGUAGE}, ${SIZE}">>build.status + ./clean ${TYPE} + done + done + exit 0 +fi + +# Set build parameters interactively + +TYPE=dial +LANGUAGE=en +set_dflt_size +while [ "X${ans}" != "Xn" ] +do + put_title + echo "Current build parameters are as follows:" + echo "" + echo " 1. Type: ${TYPE}" + if [ "X${INIT}" != "X" ] + then + echo " a. (using ${INIT} as init(8))" + else + echo " a. (using stock init as init(8))" + fi + echo "" + echo " 2. MFS size: ${SIZE} kB" + echo " 3. Language: ${LANGUAGE}" + echo "" + echo "Which parameter would you like to change?" + read -p "(1, a, 2, 3; n -no change, build it ; q -quit): " ans + case ${ans} in + 1) set_type + clear + ;; + a) set_init + clear + ;; + 2) set_size + clear + ;; + 3) set_lang + clear + ;; + q) echo "" + echo "Hey! Don't give up so quickly. Quitting for now..." + echo "" + exit 0 + ;; + n) ;; + *) echo "Unknown option \"${ans}\". Try again." + sleep 2 + clear + ;; + esac +done +# Export the parameters +export LANGUAGE SIZE TYPE SRC RELENG_2_2 INIT +# Call the build procedure +main +# Install if it's ok. +echo "" +if [ "X$?" = "X0" ] +then + echo "The build process was completed successfuly." + echo "" + echo "Now we are going to install the image on the floppy." + ./install +fi +exit 0 diff --git a/release/picobsd/build/clean b/release/picobsd/build/clean new file mode 100755 index 00000000000..d02371b99f1 --- /dev/null +++ b/release/picobsd/build/clean @@ -0,0 +1,34 @@ +#! /bin/sh - + +# +# $Id: clean,v 1.7 1998/08/19 07:05:23 abial Exp $ +# +set -e + +if [ $# -lt 1 ] +then + echo "What to clean? Possible targets are 'dial', 'net', 'isp', 'router' or 'all'" + exit 1 +fi + +if [ "$1" = "all" ] +then + list="dial net isp router" +else + list=$1 +fi + +rm -f kernel kernel.kz fs.PICOBSD picobsd.bin *.o *core *.db +rm -f picobsd.bin +rm -f build.status +cd .. +for j in $list +do + echo "===================== $0 $j started ======================" + for i in `ls -d tinyware/[a-z]*` tools/write_mfs_in_kernel tools/dumpnlist ${j}/crunch1 + do + (cd ${i} && make clean && rm -f .depend) + done + + echo "=============== $0 $j completed successfuly ==============" +done diff --git a/release/picobsd/build/install b/release/picobsd/build/install new file mode 100755 index 00000000000..98f3e56d003 --- /dev/null +++ b/release/picobsd/build/install @@ -0,0 +1,14 @@ +#!/bin/sh + +# +# $Id: install,v 1.3 1998/08/02 01:04:37 abial Exp $ +# + +echo "Please insert a blank floppy in /dev/fd0." +echo "WARNING: the contents of the floppy will be permanently erased!" +echo "Press ^C to abort, Enter to continue." +read junk + +echo "Writing picobsd.bin..." +dd if=picobsd.bin of=/dev/rfd0 +echo "Done." diff --git a/release/picobsd/build/populate b/release/picobsd/build/populate new file mode 100755 index 00000000000..6850e4de2f3 --- /dev/null +++ b/release/picobsd/build/populate @@ -0,0 +1,71 @@ +#!/bin/sh +# +# $Id: populate,v 1.6 1998/08/12 13:04:24 abial Exp $ +# + +pwd=`pwd` + +echo "-> Populating MFS tree..." +cd ../${TYPE}/mfs.tree +make +if [ X"${RELENG_2_2}" != X"" ] +then + make devnodes +fi +if [ "X$?" != "X0" ] +then + echo "-> ERROR while making \"${TYPE}\" hierarchy in /mnt..." + echo "-> Aborting $0" + exit 10 +fi +if [ "${TYPE}" = "router" ] +then + cp ../lang/mfs.rc.${LANGUAGE} /mnt/etc/oinit.rc +else + cp ../lang/mfs.rc.${LANGUAGE} /mnt/etc/rc + cp login.conf /mnt/etc/login.conf + cp ../lang/reboot.${LANGUAGE} /mnt/stand/reboot + ln -f /mnt/stand/reboot /mnt/stand/shutdown + cp ../lang/README.${LANGUAGE} /mnt/README +fi +cp ../lang/update.${LANGUAGE} /mnt/stand/update +if [ "${TYPE}" = "dial" ] +then + cp ../lang/login.${LANGUAGE} /mnt/stand/login + cp ../lang/dialup.${LANGUAGE} /mnt/stand/dialup + (cd ../../help; for i in `ls *.hlp.${LANGUAGE}`;\ + do \ + cp $i /mnt/help/`basename $i .${LANGUAGE}`;\ + done) +elif [ "${TYPE}" != "router" ] +then + cp ../../build/kvm_kernel.db /mnt/var/db/kvm_kernel.db + rm ../../build/kvm_kernel.db +fi + +echo "-> Making and installing crunch1..." +cd ../crunch1 +make "SRC=${SRC}" && make install 2>&1 >/dev/null +if [ "X$?" != "X0" ] +then + echo "-> ERROR while building ../${TYPE}/crunch1..." + echo "-> Aborting $0" + exit 10 +fi + +cd ${pwd} + +echo "-> Preparing kernel symbols list..." +if [ ! -f ../tools/dumpnlist/dumpnlist ] +then + (cd ../tools/dumpnlist; make) +fi +../tools/dumpnlist/dumpnlist ./kernel >/mnt/stand/symbols + +echo "-> Preparing kernel config list..." +if [ ! -f ../tinyware/kget/kget ] +then + (cd ../tinyware/kget; make) +fi +../tinyware/kget/kget ./kernel /mnt/stand/vanilla +(echo "-> Fixing permissions"; cd /mnt; chown -R root *) diff --git a/release/picobsd/build/stage1 b/release/picobsd/build/stage1 new file mode 100755 index 00000000000..a95fb01e9d3 --- /dev/null +++ b/release/picobsd/build/stage1 @@ -0,0 +1,102 @@ +#! /bin/sh - + +# +# $Id: stage1,v 1.4 1998/08/10 19:06:48 abial Exp $ +# + +set -e + +if [ "${TYPE}" = "dial" ] +then + suffix="-D" +fi +if [ "${TYPE}" = "net" ] +then + suffix="-N" +fi +if [ "${TYPE}" = "isp" ] +then + suffix="-I" +fi +if [ "${TYPE}" = "router" ] +then + suffix="-R" +fi + +if [ ! -f ${SRC}/sys/compile/PICOBSD${suffix}.${SIZE}/kernel ]; then + echo "-> ERROR: you must build PICOBSD${suffix}.${SIZE} first" + exit 1 +fi + +echo "-> Preparing kernel..." +cp -p ${SRC}/sys/compile/PICOBSD${suffix}.${SIZE}/kernel kernel +if [ "${TYPE}" != "dial" ] +then + echo "-> Preparing kvm database..." + mv /var/db/kvm_kernel.db /var/db/old.db + kvm_mkdb kernel + cp /var/db/kvm_kernel.db kvm_kernel.db + mv /var/db/old.db /var/db/kvm_kernel.db +fi + +echo "-> Preparing MFS filesystem..." +umount /dev/vn0 2> /dev/null || true +umount /mnt 2> /dev/null || true +vnconfig -u /dev/rvn0 2> /dev/null || true + +dd of=fs.PICOBSD if=/dev/zero count=${SIZE} bs=1k 2> /dev/null + +awk 'BEGIN {printf "%c%c", 85, 170}' | \ + dd of=fs.PICOBSD obs=1 seek=510 conv=notrunc 2> /dev/null + +vnconfig -s labels -c /dev/rvn0 fs.PICOBSD 2>/dev/null +#vnconfig -c /dev/rvn0 fs.PICOBSD 2>/dev/null +if [ "X$?" != "X0" ] +then + echo "-> Error while doing vnconfig of fs.PICOBSD on /dev/rvn0..." + echo " Most probably your running kernel doesn't have the vn(4) device." + echo "-> Aborting $0" + exit 10 +fi + +dd if=/usr/mdec/boot1 of=fs.PICOBSD conv=notrunc 2> /dev/null + +# This command does weird things on 2.2.x systems. In such case use normal +# disktype here instead +if [ "${TYPE}" != "router" ] +then + disklabel -rw vn0 auto +else + disklabel -rw /dev/rvn0 fd820 +fi +if [ "X$?" != "X0" ] +then + echo "-> Error while labeling fs.PICOBSD (vn0)..." + echo "-> Aborting $0" + exit 10 +fi + +# You can save some space on MFS if you don't want so many inodes... +if [ "${TYPE}" = "dial" ] +then + newfs -i 10240 -m 0 -p 0 -o space /dev/rvn0c 2>&1 >/dev/null +fi +if [ "${TYPE}" = "router" ] +then + newfs -i 12000 -m 0 -p 0 -o space /dev/rvn0c 2>&1 >/dev/null +fi +if [ "${TYPE}" = "net" ] +then + newfs -i 16000 -m 0 -p 0 -o space /dev/rvn0c 2>&1 >/dev/null +fi +if [ "${TYPE}" = "isp" ] +then + newfs -i 15000 -m 0 -p 0 -o space /dev/rvn0c 2>&1 >/dev/null +fi +mount /dev/vn0c /mnt +if [ "X$?" != "X0" ] +then + echo "-> Error while mounting fs.PICOBSD (/dev/vn0c) on /mnt..." + echo "-> Aborting $0" + exit 10 +fi diff --git a/release/picobsd/build/stage2 b/release/picobsd/build/stage2 new file mode 100755 index 00000000000..72426cb5a88 --- /dev/null +++ b/release/picobsd/build/stage2 @@ -0,0 +1,40 @@ +#! /bin/sh - + +# +# $Id: stage2,v 1.1.1.1 1998/07/14 07:30:51 abial Exp $ +# +set -e + +if [ "${TYPE}" = "dial" ] +then + suffix="-D" +fi +if [ "${TYPE}" = "net" ] +then + suffix="-N" +fi +if [ "${TYPE}" = "isp" ] +then + suffix="-I" +fi + + +if [ ! -f kernel ]; then + echo "-> ERROR: you must build PICOBSD${suffix}.${SIZE} kernel first" + exit 1 +fi + +echo "-> Preparing kernel with MFS filesystem inside..." +df -ik /mnt +umount /mnt 2>&1 >/dev/null +fsck -p /dev/rvn0c +vnconfig -u /dev/rvn0 2>&1 >/dev/null + +if [ ! -f ../tools/write_mfs_in_kernel/wmik ]; then + (cd ../tools/write_mfs_in_kernel; make) +fi + +../tools/write_mfs_in_kernel/wmik kernel fs.PICOBSD +kzip -v kernel +rm fs.PICOBSD +rm kernel diff --git a/release/picobsd/build/stage3 b/release/picobsd/build/stage3 new file mode 100755 index 00000000000..c4ebf4c337b --- /dev/null +++ b/release/picobsd/build/stage3 @@ -0,0 +1,91 @@ +#! /bin/sh - + +# +# $Id: stage3,v 1.4 1998/08/10 19:06:48 abial Exp $ +# +set -e + +if [ ! -f kernel.kz ]; then + echo "-> ERROR: you must build kernel.kz 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=/usr/mdec/boot1 of=picobsd.bin conv=notrunc 2> /dev/null + +disklabel -Brw -b /usr/mdec/fdboot -s /usr/mdec/bootfd /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 + cp ../lang/${i}.${LANGUAGE} etc/${i} +done +if [ "${TYPE}" != "router" ] +then + cp ../lang/rc.conf.${LANGUAGE} etc/rc.conf + cp ../lang/rc.network.${LANGUAGE} etc/rc.network +fi + +echo "-> Populating floppy filesystem..." +cp ../lang/boot.help.${LANGUAGE} /mnt/boot.help +cp -pr . /mnt +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.kz /mnt/kernel +if [ "X$?" != "X0" ] +then + echo "-> ERROR while transferring kernel.kz to /mnt..." + echo "-> Aborting $0" + exit 10 +fi +(echo "-> Fixing permissions"; cd /mnt; chown -R root *) +rm kernel.kz + +df -ik /mnt + +umount /mnt +vnconfig -u /dev/rvn0 diff --git a/release/picobsd/dial/conf/PICOBSD b/release/picobsd/dial/conf/PICOBSD new file mode 100644 index 00000000000..2c07ad57ef0 --- /dev/null +++ b/release/picobsd/dial/conf/PICOBSD @@ -0,0 +1,85 @@ +# +# $Id: PICOBSD,v 1.4 1998/08/02 12:19:29 abial Exp $ +# +machine "i386" +cpu "I386_CPU" +cpu "I486_CPU" +cpu "I586_CPU" +cpu "I686_CPU" +ident PICOBSD +maxusers 3 + +options MATH_EMULATE #Support for x87 emulation +options INET #InterNETworking +options FFS #Berkeley Fast Filesystem +options MFS +options MSDOSFS #MSDOS Filesystem +options "CD9660" #ISO 9660 Filesystem +options "EXT2FS" +options "COMPAT_43" #Compatible with BSD 4.3 [KEEP THIS!] +options USERCONFIG #boot -c editor +options VISUAL_USERCONFIG #visual boot -c editor +options USERCONFIG_BOOT #imply -c and parse info area +options DEVFS +options SLICE +options PCI_QUIET +options NO_SWAPPING + +config kernel root on fd0 + +controller isa0 +controller pci0 + +controller fdc0 at isa? port "IO_FD1" bio irq 6 drq 2 vector fdintr +disk fd0 at fdc0 drive 0 +disk fd1 at fdc0 drive 1 + +options "CMD640" # work around CMD640 chip deficiency +controller wdc0 at isa? port "IO_WD1" bio irq 14 vector wdintr +disk wd0 at wdc0 drive 0 +disk wd1 at wdc0 drive 1 + +controller wdc1 at isa? port "IO_WD2" bio irq 15 vector wdintr +disk wd2 at wdc1 drive 0 +disk wd3 at wdc1 drive 1 + +options ATAPI #Enable ATAPI support for IDE bus +options ATAPI_STATIC #Don't do it as an LKM +device wcd0 #IDE CD-ROM + +# syscons is the default console driver, resembling an SCO console +device sc0 at isa? port "IO_KBD" tty irq 1 vector scintr + +device npx0 at isa? port "IO_NPX" irq 13 vector npxintr + +device sio0 at isa? port "IO_COM1" flags 0x10 tty irq 4 vector siointr +device sio1 at isa? port "IO_COM2" tty irq 3 vector siointr +device sio2 at isa? disable port "IO_COM3" tty irq 5 vector siointr +device sio3 at isa? disable port "IO_COM4" tty irq 9 vector siointr + +device psm0 at isa? port "IO_KBD" conflicts tty irq 12 vector psmintr + +# Order is important here due to intrusive probes, do *not* alphabetize +# this list of network interfaces until the probes have been fixed. +# Right now it appears that the ie0 must be probed before ep0. See +# revision 1.20 of this file. +device de0 +#device de1 +device fxp0 + +device ed0 at isa? port 0x280 net irq 10 iomem 0xd8000 vector edintr +#device ed1 at isa? port 0x300 net irq 5 iomem 0xd0000 vector edintr +device ie0 at isa? port 0x300 net irq 10 iomem 0xd0000 vector ieintr +device ep0 at isa? port 0x300 net irq 10 vector epintr +#device ex0 at isa? port? net irq? vector exintr +#device fe0 at isa? port 0x300 net irq ? vector feintr +device le0 at isa? port 0x300 net irq 5 iomem 0xd0000 vector le_intr +device lnc0 at isa? port 0x280 net irq 10 drq 0 vector lncintr +#device ze0 at isa? port 0x300 net irq 10 iomem 0xd8000 vector zeintr +#device zp0 at isa? port 0x300 net irq 10 iomem 0xd8000 vector zpintr + +pseudo-device loop +pseudo-device ether +pseudo-device tun 1 +pseudo-device pty 16 +pseudo-device gzip # Exec gzipped a.out's diff --git a/release/picobsd/dial/crunch1/Makefile b/release/picobsd/dial/crunch1/Makefile new file mode 100644 index 00000000000..467850d488b --- /dev/null +++ b/release/picobsd/dial/crunch1/Makefile @@ -0,0 +1,40 @@ +# +# $Id: Makefile,v 1.4 1998/08/10 19:38:39 abial Exp $ +# +NOCRYPT?= yes +SRC?=/usr/src + +all: crunch + +crunch: + if [ "X${INIT}" != "X" ]; \ + then \ + echo "progs ${INIT}" >crunch1.conf ; \ + else \ + echo "progs init getty" >crunch1.conf ; \ + fi; + @cat crunch.conf|sed -e "s@/usr/src@${SRC}@" >>crunch1.conf + @crunchgen ${.CURDIR}/crunch1.conf + @${MAKE} -f crunch1.mk all NOCRYPT=${NOCRYPT} \ + "CFLAGS=${CFLAGS} -DCRUNCHED_BINARY" 2>&1 >/dev/null + +clean: + rm -f *.o *.stub *.lo *_stub.c *.mk \ + crunch.cache \ + crunch.mk \ + crunch.c \ + crunch \ + crunch1* \ + .tmp_* \ + *.gz + +install: + cp crunch1 /mnt/stand/crunch + chmod 555 /mnt/stand/crunch + for i in `crunchgen -l crunch1.conf` ; \ + do \ + ln /mnt/stand/crunch /mnt/stand/$${i}; \ + done + rm /mnt/stand/crunch + +.includeThis is the short release history of PicoBSD, as well as the list of bugs +which were found. Some of them were already corrected, so that you should read +the list before reporting a new one.
+ +We tried to make this software bug-free, but life is life... Sorry for the + inconvenience.
+ +New features include: NATd, + netstat, DEVFS/SLICE instead of standard /dev, additional network + drivers, and several minor fixes. Distribution contains also + a collection of small versions of system programs (TinyWare), among + them custom init(8).
+I added also the fourth type of setup - 'router' - which is a + specialized version of PicoBSD that focuses on providing as small + as possible router solution.
+The following bugs were found in this release of PicoBSD:
+This was fixed the same day, and the corrected files are: pb03en1.zip, + pb03pn1.zip, and pbsd-s031.tgz respectively. They are now under standard + links on the main page of PicoBSD project, so if you downloaded after + this date, you shouldn't worry.
+Please check that you have the fixed versions - the archive name should + contain the tiny number, such as "pb03en1.zip", or + pbsd-s031.tgz".
+PicoBSD is a floppy sized version of popular operating system FreeBSD. +It fits within a single bootable 1.44MB floppy and runs on a minimum i386 +with 8MB RAM. PicoBSD currently comes in four flavours: dialup, net, router and +isp. For a description of how each of the flavours differ, take a look +at the PicoBSD +home page. + +
What version of FreeBSD is PicoBSD based on ? + +
PicoBSD has versions based on both FreeBSD 3.0-current and FreeBSD 2.2.5-RELEASE. +Andrzej Bialecki maintains the FreeBSD +3.0-current version and Dinesh +Nair maintains the FreeBSD +2.2.5-RELEASE version. Both the versions don't differ by much except +for the following: +
What can PicoBSD do? + +
With the TCP/IP capabilities of FreeBSD included in and based on the +strong 4.4BSD TCP/IP stack, PicoBSD can be used as a low cost Network Computer. +With a text based HTML 3.2 compliant browser (2.2.5-RELEASE version only) +and Internet access tools such as telnet and ftp, it can serve as a low +cost Internet dialup client. With support for mounting MSDOS and Unix harddisks, +it also can be used as a portable OS which you can carry around in a floppy. +The net and isp flavours would allow you to make use of those redundant +i386es as a low cost router or dialin PPP server. With SNMP and firewall +support built-in, PicoBSD provides the functionality of dedicated routers +and dialin terminal servers. + +
What are PicoBSD's minimum requirements? + +
PicoBSD runs on a minimum i386 with 8MB RAM for the dialup flavour and +10MB RAM for the net and isp flavours. Diskspace requirements are a single +1.44MB floppy. For on-demand PPP access, a modem would be required, either +external or internal. +For LAN access, an Ethernet NIC (support for 3Com, NE2000 etc available) +would also be required. + +
Where do I get PicoBSD? PicoBSD is available at the following +locations: +
How do I copy it to the floppy? + +
The binary images provided as part of the PicoBSD distribution are 1.44MB +sized floppy images. They cannot be copied to a floppy using the MSDOS +COPY or Unix cp commands. Instead, an image copy must be done +using tools such as rawrite.exe +or fdimage.exe +under MSDOS and dd under Unix. + +
Under DOS you would do something like this: +
C:\> fdimage.exe picobsd.flp a:+ +while under Unix you would use something like: +
There is an auto-configuration script to configure PPP dialup access. +Run /stand/dialup after booting up from the floppy and make the +relevant menu selections. Once you've tested it to work, you should make +your changes permanent by committing them to the floppy using /stand/update. + +
How do I set my DNS server ? + +
Use the provided /stand/ee editor and edit /etc/resolv.conf. +Replace the domain with your domain and change the nameserver +IP address to your nameserver or your ISP's nameserver. You may have as +many nameserver lines as you want. Don't forget to run /stand/update +to commit your changes to the floppy. +
NOTE: starting with version 0.4, the dialup scripts asks you to +set your nameserver as well as default domain name.
+ +How do I set my hostname ? + +
Edit /etc/rc.conf and change the value of the hostname +variable. + +
PicoBSD has "mkdir" but not "rmdir". How can I delete +subsdirectories?
+"rm -d" will delete directories.
+ +Can I use a modem configured on COM3/COM4 instead of COM1, COM2?
+ +Yes, but these ports are initially disabled - most machines have only +two serial ports anyway. You have to enable them in UserConfig.
+Here are the preferred settings:
+I see a configuration conflict the first time I boot PicoBSD. What +should I do?
+ +Disable those devices which are not present in your machine. If there is +still some conflict, change the settings (I/O port, IRQ etc.).
+ +What kind of SCSI support is there?
+ +None. Either build your own version of PicoBSD, or just install normal +FreeBSD distribution.
+ +How do I connect using PPP ? + +
Just run the PPP process, /stand/ppp. at the ppp on pico> +prompt, type dial and sit back and wait for the modem to sing it's +mating tunes. When the ppp on pico> prompt is capitalized to PPP +on pico>, you've managed to succesfully achieve a link-level PPP and +TCP/IP connection with your ISP. Additionally, the PPP program will enter +Packet Mode. Remember, don't quit or close the PPP +connection if you want to continue to access the Internet. Type help +at the ppp on pico> prompt for a list of PPP commands. + +
The PPP process is running on my screen. How do I use the browser +or telnet to a host ? + +
PicoBSD has many virtual terminals, 10 on the dialup flavour. You have +run PPP on the first virtual terminal. You can switch to the others and +run the browser and telnet clients there. Switching thru the VTs is done +by ALT-F1 for VT0, ALT-F2 for VT1, ALT-F3 for VT2 etc. From these terminals, +you could use telnet or the lynx browser cum newsreader. + +
I can't establish a PPP connection. The mouse pointer randomly appears +and disappears. and moving the mouse has no effect.
+ +You have the mouse driver configured to use the modem's serial port.
+Issue a 'ps -ax', remember the pid (process ID) of 'moused', then issue a
+'kill -9 I saved my lynx configuration but it was not there when I rebooted.
+Why ?
+
+ The lynx configuration is saved in /etc/lynx.cfg. You should
+run /stand/update to commit this to the floppy when you change the
+configuration. In effect, anything you change in /etc can be committed
+by running /stand/update.
+
+ How come there are no manual pages ?
+
+ Well, this is a floppy-sized OS, so there's not enough space for full
+manpages. Instead, short help descriptions are given with the /stand/help
+program. If you need more detailed descriptions, take a look at the FreeBSD
+Handbook or the FreeBSD Home.
+ Last Modified:
+Sun Aug 9 13:40:15 CEST 1998
+ Below you will find supported configurations for each of the flavors of
+PicoBSD as of version 0.4, as well as the lists of programs included. NE2000 compatible ISA and PCI cards, most SMC and 3C503 3C509 ISA card Intel EtherExpress ISA, StarLan, 3C507 DEC EtherWorks 2 and 3 Lance/PCNet There's also the fourth version, which can serve as a dialin server - I hope
+you'll find it as a cheap yet reliable alternative to commercial communication
+servers :-)) This work is still in progress, and
+I need some people to test the early
+dial-in server version. NOTE: there were some mysterious interactions between vn(4) driver and
+ 'disklabel auto' in versions earlier than 3.0. There is another set
+ of scripts prepared by Dinesh Nair
+ which allows to build PicoBSD floppies on a earlier systems. Unpack the archive in some place with at least 5MB free space. I also recommend to adjust the ISA devices parameters to
+ match the ones of your hardware - though PicoBSD can save the
+ changes from UserConfig, this way it will produce smaller
+ There are no NOTE: thanks to the above, the floppy is needed only during startup,
+ and then only if you want to synchronize (possibly changed) MFS /etc
+ with the one on the floppy. It means that you can pull off the floppy
+ from the drive as soon as NOTE: patches may fail to apply, if your sources are too
+ different from the ones I used. Don't worry: they are so
+ straightforward that you can apply them by hand. This release of PicoBSD contains a small replacement for
+ init(8), called 'oinit'. You can find it in TinyWare
+ collection. The main building script allows you to use it
+ instead of normal init(8). Be sure to read the oinit's docs
+ before you decide to use it! WARNING: make sure you don't have stale If there were any errors, please execute each script by hand and try
+ to find what causes this error. Most often this will be one of the
+ following reasons: That's all. You're welcome to change and improve these scripts. If you
+ stumble upon something which looks like a good idea to have it here, let me
+ know. If, for some reason, the scripts don't work for you at all, also let me
+ know. For those of you who really want to know what's going on behind the scene,
+and can't quite deduce it from scripts themselves, here's short description of
+the build process: If there is no such file, the script starts compilation of the kernel,
+ using template in ../${YTPE}/conf/PICOBSD, and adding parameters which
+ determine the built-in MFS size. One notable exception here is with the "router" floppy - I use one
+ of extended floppy formats (820kB). After the file is labelled, the newfs(8) is run. Here you can adjust
+ the parameter -i, which can gain you some space on the MFS (sacrificing
+ available number of inodes, so be careful). Such prepared blank filesystem is mounted on /mnt. Here the stage1
+ ends. The MFS tree includes the /etc, which will contain the startup file
+ /etc/rc.
+ This file in turn doesn't do anything useful except copying the
+ real /etc hierarchy from the floppy filesystem. (There's one possible
+ improvement which comes to my mind - to have the whole /etc on the
+ floppy in tar.gz - this would require only one inode to store the whole
+ /etc, and we could gain some kB on the floppy) After preparing the filesystem (which again involves doing disklabel(8)
+ and newfs(8) - here you can notice that the resulting FS has very small
+ number of inodes in order to save space), the script transfers the
+ floppy hierarchy (which is
+ taken from ../${TYPE}/floppy.tree). Notice that it also contains
+ the /etc directory - its contents is copied right after bootup to the
+ real /etc in MFS. This allows for changing the system behaviour
+ (because you can't change the MFS contents without recompiling). The script finally copies previously prepared kernel to the floppy
+ filesystem. The filesystem is unmounted, and here the build process
+ ends.
+
+
+
+
+Dialup version:
+
+
+
+
+Router-like version:
+
+
+Router version:
+
+
+
+
+
+
+
+
+picobsd.tgz. It contains the scripts
+ you'll need. Also, I assume you run quite -current system with
+ full sources installed.
+
+cd build) and run the
+ ./build script. Select target language, size of MFS and
+ one of pre-canned setups (personal dialup, dialin server or
+ router-like). Details of each setup are contained in
+ dial/, isp/ and net/ directories respectively. You should at least
+ check ${TYPE}/config/PICOBSD file to make sure it contains
+ the drivers you want.
+/kernel.config file.build/stage3.
+
+ build/ main build directory; you MUST cd here!
+ dial/ config files for dialup setup
+ conf/ kernel config file
+ crunch1/ crunch of system programs
+ mfs.tree/ contains the MFS configuration
+ lang/ contains language-dependent files
+ floppy.tree/ contains the startup floppy hierarchy
+
+ isp/ config files for dialin server setup
+ ... (as above)
+ net/ config files for router-like setup
+ ... (as above)
+ tinyware/ collection of small system utilities
+ tools/ additional tools them needed during build
+
+/etc/passwd nor /etc/pwd.db
+ files on the "dial" floppy - in case of other types, they are
+ reconstructed from /etc/master.passwd on each startup
+ (and then put on MFS with the rest of /etc).
+ In case of "dial" type floppy, you don't need them at all.login: prompt appears.
+ In other words, it is almost equal to read-only floppy.
+
+${TYPE}/crunch1 directory, and edit it
+ to suit your needs. Keep in mind that floppies aren't made
+ of rubber... :-)
+/usr/src. These patches attempt to decrease
+ the size of some programs by cutting off rarely/unlikely used
+ parts. The patches are reversed when you do a
+ make clean (or build/clean
+ for that matter).
+/stand/init, or /stand/oinit,
+ or /stand/sysinstall in
+ your crunch.conf. Of course these can be your
+ own programs... But if you install the stock
+ /sbin/init, you
+ also have to install some others, like sh, getty, login etc...
+cd build/ and fire off the ./build
+ script. Select the build parameters or 'n' for 'no change'. If all
+ is well, after some time (like 10-30m) you end up with a
+ 'picobsd.bin' file in this directory.
+
+.depend files
+ around!!! You may encounter many strange errors during build process
+ in that case.
+
+
+ You can also remove crunchgen can't find the source directory for a
+ program 'proggy':
+
+
+
+
+
+
+stage1 script ends).
+2>&1 redirections from Makefiles
+ to see the stderr.
+
+ dd if=picobsd.bin of=/dev/rfd0
+
+
+ (The 'build' script asks you if you want to do this.)
+
+
+
+
+
+
+
+
+
+
+Last modified:
+Wed Aug 19 18:49:08 CEST 1998
+
diff --git a/release/picobsd/doc/intro.html b/release/picobsd/doc/intro.html
new file mode 100644
index 00000000000..6c5ce16b788
--- /dev/null
+++ b/release/picobsd/doc/intro.html
@@ -0,0 +1,300 @@
+
+
+
+ PicoBSD
+
Contents:
+Get the full PicoBSD Development Kit as well as full CVS repository of +the project.
+If you ever dreamed about having really small, tiny, minimal system that +would offer you benefits of Unix, while still fitting in reasonable space - +here it is!
+ +PicoBSD is a one floppy version of +FreeBSD 3.0-current, which in its +different variations allows you to have secure dialup access, small diskless +router or even a dial-in server. And all this on only one standard 1.44MB +floppy - no need to sacrifice over 100MB of your precious HDD space.
+ +PicoBSD is... well, pico-sized :-) , and the minimal hardware that +is required to run it is 386SX CPU with 8MB of RAM (no HDD!). +
+ + +Here you can find detailed list of supported +hardware and features. + +
Current version of PicoBSD is 0.4, and this means that I consider it +greatly immature, while on the other hand being somewhat tested and improved +over previous versions. Does it tell you something? Well, at least you can +try it - I cannot guarantee that it doesn't burn your house or blow up your +machine, though the former is unlikely... :-)
+ +There are two language editions of PicoBSD - English and Polish one. You'll +be probably more interested in the former :-) The only difference is in +the set of fonts included, C locale, and the language of messages.
+You can download them from www.freebsd.org or one of its mirrors:
+(See the feature list for more +details)
+ +The above floppies were built from 3.0-current sources. Though they +provide more features, they tend to be less stable than the latest +RELEASE of FreeBSD. Dinesh Nair back-ported these scripts to the +latest release (2.2.5), and continues development of PicoBSD using sources +from that branch. You can find floppies built from 2.2.5 sources +here or at +his server.
+ +Previous versions were packed with PKZIP(tm) compatible program - now they +are simply the raw binary floppy images, so you just need to grab the +appropriate version of the file.
+ +I assume you will use 1.44MB floppy to boot the system - other sizes +(bigger) are not tested.
+ +The file 'pb_xx-X.bin' must be written onto a blank floppy. It does NOT +mean that it can be copied using e.g. DOS 'copy' command. You must use a +program like +rawrite.exe +or +fdimage.exe + to write this file directly on the raw floppy.
+ +Under DOS you would do something like this:
++ C:\> fdimage.exe pb_xx-X.bin a: ++ +
while under Unix you would use something like:
++ dd if=pb_xx-X.bin of=/dev/rfd0 ++ +
Then boot off this floppy and enjoy!
+ +If you feel lost, try the 'help' command (it's available only on "dialup" +floppies)
+ +I made available also the +set of tools +(a.k.a the PicoBSD Development Kit) I used to create the floppies (see also the + detailed instructions)
+ +You can also get the copy of +the CVS repository of +the project - CVSup operation is still under construction...
+ +Now, if you don't like the setup of PicoBSD, or you miss +some program, or (better yet) you want to improve PicoBSD - you can grab the +copy of exactly the same tools I used and build your own, customized + version!
+ +Think of it: if your're an ISP, you can build the dialup version for + your customers, including some scripts to automatically connect them to +your site. You can also create a demo disk for your friend (or your boss! :-)). +You can also build a firewall/router for your office, etc, etc... + possibilities are really endless and limited only by your imagination.
+ +You will need at least 10MB of free disk space for building, and of course +the full system sources installed. I also assume that the sources are +quite -current. There is also a back-ported version of the scripts prepared by +Dinesh Nair which builds ok on +2.2.6-R systems.
+ +Version 0.31 was packed with pax(1) - newer versions are packed again +with tar and gzip to avoid confusion... :-)
+ +I'm very interested in hearing from you about your experiences - if you +come up with a setup you think is interesting, please let me know!
+ +Almost all of the programs included on the floppies are exactly the +same versions as in normal FreeBSD installation, so that the normal +manual pages apply. However, I didn't include the manpages themselves - +they would take over 200kB!
+ +For the total newbies, which would use (I assume) +the 'dialup' version, there is a short README on the floppy which gives +step by step instructions on how to get a dialup connection. There is also +a script called 'dialup' which attempts to configure PPP to allow for automatic +log in to your provider, and for background operation. +There is also a small help system ('help' command)
+ +There are some system utilities which are unique to PicoBSD, and at this + moment they are documented in detail only in source and READMEs :-(.
+ + +As for the new releases which will (hopefully) be prepared in the future: +just keep an eye on this page. I'll also send announcements to FreeBSD mailing +lists.
+ +Well, I hope that thanks to your comments I'll be able to continuously +improve the setup and contents of PicoBSD. I also have specific dreams (if +dreams can be specific..) - here they are, as an incentive to your +imagination and coding skills:
+The following people are either responsible for the very existence of this +project, or significantly eased my pains of gaining necessary knowledge:
+PicoBSD is distributed under BSD copyright, +which allows you to use it in various ways, including commercial +applications. So grab it and enjoy! And if you feel that you want to help +with this project, either by donating some time to write code, or by +some other donation, just contact me.
+ +