Beginning with version 0.4, PicoBSD sources are maintained as part of official FreeBSD CVS repository, so you can find them in src/release/picobsd.
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/,
router/, isp/ and net/ directories respectively. You should at least
check ${TYPE}/config/PICOBSD
file to make sure it contains
the drivers you want.
You can also choose a special type called 'custom'. You'll need to
supply the full path to your own custom config tree constructed
exactly like one of the standard config directories. Also, you'll
probably want to adjust the number of inodes on MFS - see the
stage1
script and look for INODES=
.
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
/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
There are no /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.
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 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).
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.
/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...
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!
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.
WARNING: make sure you don't have stale .depend
files
around!!! You may encounter many strange errors during build process
in that case.
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:
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.)
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.