Date: Thu, 15 Jul 2004 16:23:37 -0300 (BRT) From: Jean Milanez Melo <jmelo@FreeBSDBrasil.COM.BR> To: small@freebsd.org Subject: FreeBSD embedded: TinyBSD Message-ID: <20040715161829.C1895@offset.freebsdbrasil.com.br>
next in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
Hello small,
Please allow me to introduce myself, I'm one of the coordinators of
the Brazilian FreeBSD Users group, coordinator of the official
FreeBSD documentation's translation group and have been working with
embedded FreeBSD systems since year 2000.
I've been studying NanoBSD ever since Poul-Henning posted about it on one of
the mailling lists, and I have been following this project closely. It
really is a great project.
However, I think it sometimes creates unnecessary partitions, takes
too long to build the system due to make world and it copies lots of
unneeded binaries, taking a lot of precious space.
So me and Patrick Tracanelli (another active member of the Brazilian
FreeBSD community) decided to write a new set of scripts to build
embedded systems. We've named it TinyBSD, and its goal is to be faster
at building-time, occupy less space on the target device and to ease
customization like PicoBSD does.
Untar/gzip the tinybsd.tar.gz file under /usr/src/release.
# ls
TINYBSD tinybsd.basefiles tinybsd.sh
We first take the file TINYBSD, which like in PicoBSD we can use to
define or remove all kernel options to the new system.
Then we have tinybsd.basefiles, where we define all binaries necessary
to get the system running and anyone can edit it as they will.
Finally we have the script itself, tinybsd.sh. It's a simple script,
yet functional. We based it on NanoBSD's and its idea is to create a
temporary work directory where the new system's directory tree will be
created. Then it'll copy all files listed on tinybsd.basefiles to this
tree. This copying process is essential to the speed of the building
process, as we eliminate the recompiling phase. The reason for this is
FreeBSD 5.1' dynamically-linked base system, which take much less
space than the old statically-linked ones. This way we can also do the
copying without affecting the production system in any way.
After all this, we compile the kernel using the TINYBSD file and then
we install the necessary libs using the dependencies' output from the
binaries. We populate the /etc directory on the temp work directory
and put in a few important default settings in /etc/rc.conf, like:
hostname="tinybsd.freebsd.org"
sendmail_enable="NONE"
sshd_enable="YES"
usbd_enable="NO"
inetd_enable="NO"
portmap_enable="NO"
update_motd="NO"
varsize="8192"
diskless_mount="/etc/rc.d/diskless"
Lastly, we create the empty image according to the specifications for
the device passed in as a parameter and copy the entire temp directory
to the new image. After that, the user can use dd to write the final
image to the target device.
Booting the system works as embedded systems do, mounting /var and
/tmp as MFS filesystems.
The most interesting point is the space used by default, only 20MB.
As you can see, it's pretty simple. But since PicoBSD is practically
unusable with the 5.x series, TinyBSD could be an interesting
alternative along with NanoBSD to be put on the base system in future
versions.
Patrick and I have been thinking of enhancing the script and adding
end-user helping tools such dialog-based menus and the likes. In case
the FreeBSD project has any interest in our project, we can perfectly
maintain TinyBSD as an embedded option for FreeBSD users.
Thank you for your attention
Jean Milanez Melo
ps: please reply to jmelo@freebsdbrasil.com.br
[-- Attachment #2 --]
@ :ks6*۱o%8JǖJgʦ4 JXc&s>@?lUlF_hX
k6;͗.>S[MB9fu=P/|AKx5c!ПS.M4y_Ln^#~e4G?X3?8p`4X>'[͢*mմc&n,n`,#G'rx]
K@o$(Ƴ+peφkטEPoO?m}?1lXf\;iil
Cyְ͘³<AfCa$@9lߨUy+2o+WO5YL74c%hGL#/cEe8>~AJ
#(pl-#2TVìk.YF1RMZn
i8E
rJPƴ:CiSv<tvqmArT :+yv7k7~`g^&$ds1Y[86VF="uO\xf(r
V_I
OYADiDAA$'&R|qlZڙa(
=凜+RC:k5$4c8mdhi3,KcZk@h
b(,H
A-Qy^x&.+T*\p7mtҢohe8%0[(X8L}[VX##(mPM,MU%KCКD3/v6B9/(3LV U *vb
M p4h+E&k`+-8 40fڊ=*Y\ҾC뤠rӐB:#<F=)V2$3jm +&wI>ڥ B:Zm+QՀbXX0@-T0hDF{|tH<b@HK'ͬ:E(l@ۼb`w`ⷦyUIS
UуEA:Bh0f6bPQ\9 _nZBডovV }
S{.yqzK{~ #&kGtVҤmKU@Z. h0b${PEO#<_aXJS"LZNoE ?
vvԢ֫uVh[MK+K#2-owuwe;?,3-:_ؤIRfԱbYBzNdݔ2kU*34uSQ"A"2CxG9rv+<oYyϟ;2-]aCWNSh7/fp]g0*60îˍ#dr|l`a6~kCRlda23ҘVXe˄q3w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