diff --git a/release/picobsd/doc/src/how2build.html b/release/picobsd/doc/src/how2build.html index 8549c5bdc1f3..12303be1882a 100644 --- a/release/picobsd/doc/src/how2build.html +++ b/release/picobsd/doc/src/how2build.html @@ -1,196 +1,197 @@
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
+ ./picobsd 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
+cd build/ and fire off the ./picobsd
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.
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.
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 +FreeBSD, 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 @VER@, and this means that I consider it still 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.
+The above floppies were built from FreeBSD sources. +You can find floppies built from 2.2.5 sources +here or +here.
Previous versions were packed with PKZIP(tm) compatible program - now they +
Previous versions were packed with a 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 access the full CVS repository of PicoBSD - beginning with
version 0.4 it's a part of official FreeBSD CVS and lives in
src/release/picobsd. I also create the snapshots of this source
tree - keep in mind that they are not so up-to-date as the tree
in FreeBSD CVS. You can get the snapshot I made on
Sun Nov 1 11:48:32 PST 1998
here.
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:
Well, currently you can read very preliminary draft of proposed architecture, called the Unified Configuration Interface.
The following people are either responsible for the very existence of this project, or significantly eased my pains in 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.