[Aboriginal] ulfs-bootstrap, shrinking LFS.

David Seikel onefang at gmail.com
Thu Mar 31 01:08:47 PDT 2011

ulfs is my effort to shrink LFS down, mostly to suit my own purposes,
by using the stuff that already exists in Aboriginal linux.  So, no
need for most of the usual gnu tools when we have busybox, no need to
replace the tool chain we already got, and see how far we can get using
uClibc.  The result should be able to compile stuff from BLFS, though
I'll only be testing the stuff from BLFS that I actually need when I
need it.

Mostly this is by removing packages, if the removed package turns out
to be something you need, just put it back again.

First thing I did was remove gmp, mpfr, and mpc.  They are complex
maths packages that are only in LFS coz the latest gcc needs them.  We
are not using a gcc that needs them, we already have an older one that
works.  The original lfs-bootstrap had already removed the building of
the toolchain coz aboriginal linux already supplies one.  For the same
reason make was left out, we already got that.

Next thing I did was to leave out packages that busybox could be used
for.  This step removed sed, util-linux-ng, e2fsprogs, coreutils, gawk,
procps, grep, inetutils, bzip2, diffutils, findutils, gzip, iproute2,
kbd, less, module-init-tools, patch, psmisc, shadow, sysklogd,
sysvinit, tar, udev, and vim.  Util-linux-ng includes a lot of stuff
that busybox does not, we shall see if it's really needed.

First problem, iana-etc needs the real gawk, it uses fancy options that
the busybox awk does not support.  So put gawk back in.

Second problem, autoconf stops part way through asking the user a
question when using busybox instead of coreutils.  A quick
investigation seems to point to the busybox mv command needing to know
if it's OK to overwrite a file, when the coreutils one just overwrites
it without asking.  There may in fact be some deeper root cause for
this problem, I did not look deeper.  See next step for why.

Next step is to remove autofoo and friends.  The general purpose of
autofoo is to let developers create source tarballs that users can
compile on any old unix system.  The target systems don't need autofoo
installed to allow such tarballs to compile.  So autofoo itself is a
development tool, and LFS is not supposed to be a development system,
but a way to get a linux system up and running which can be used to
install more packages.  So, autofoo is not really needed in an LFS
system.  Removing it is good, and lets me get rid of perl, which is
even better.  B-)

Grub was left off for the same reason it was left out of lfs-bootstrap.

Bash and readline where removed.  We already have an older bash as part
of aboriginal linux.  Readline is only in LFS as a dependency of bash.
Time will tell if this is a bad move.

Libtool and texinfo where left out as being pointless development
tools.  I had considered leaving out bison, flex, and m4, but they
ended up being needed to build those bits of LFS that remain, so left
them in.

This left the ulfs-bootstrap package-list looking like this -

m4              #development
pkg-config      #development
gettext-stub    #development internationalization
gawk            #busybox
bison           #development
flex            #development
make            #development

A much smaller system that should still allow compiling of stuff from

As a quick sanity check, I installed the one thing from BLFS that I
can't live without - midnight commander.  It has glib as a dependency,
so that's the first thing I tried to install.  It failed due to a lack
of iconv.  The base config for uClibc has the iconv parts commented
out, uncommenting them and rebuilding fixed up glib.  Midnight
commander installed fine after that.  And it actually worked.  B-)

I guess iconv was left out as it's just bloat that is not needed if you
are not doing any internationalization, for the same reason
gettext-stub is used instead of gettext in lfs-bootstrap.  I think
gentoo have a stub version of iconv they are working on, but the above
was easy to do and worked for me.  I'm not doing internationalization

My next step will be to install the dependencies of the GUI library I
want to use for this contract.  A lot of those dependencies are in BLFS,
so those will go in first using the BLFS recipes.  This should help to
shake out any more issues with ulfs.  If people are interested, I'll
ship the results to Rob later.  Though the package-list above is the
important bit, you can just copy the rest from lfs-bootstrap.

Feel free to let me know if there are other issues with building BLFS
with this ulfs-bootstrap.

A big old stinking pile of genius that no one wants
coz there are too many silver coated monkeys in the world.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/aboriginal-landley.net/attachments/20110331/9ccc46dd/attachment-0002.pgp>

More information about the Aboriginal mailing list