[lfs-support] Reduce Size Of LFS Build
dj at linuxfromscratch.org
Tue Apr 10 02:58:52 PDT 2012
On 04/10/2012 02:10 AM, Kshitij Jain wrote:
> I am a student and working on building LFS as a project I have already
> build the Linux but i want to reduce the size of the system to minimum.
> Can u please suggest me ways to reduce the size of LFS.
Your question is a bit ambiguous. The solution really depends on the
goal of the system. Take an embedded system for example. You would
likely want to use uClibC as suggested by Firerat, but busybox is
certainly a matter of taste. It may actually be more responsible to
build the few utilities you need linked statically and forgo the typical
environment completely. At an absolute minimum, you need only a kernel
and a statically linked binary to run as init (granted, it wouldn't be
very functional), but a kernel with no modules, a statically linked ash
or dash, and a supported file system (with static device nodes) do
equate to a functional (read-only) system. In fact, we used to use this
method many many moons ago for LFS itself. The first test reboot of LFS
had only sysvinit and bash statically linked, and that could have easily
been reduced to just bash if desired (either 'ln -s /bin/bash
/sbin/init' or init=/bin/bash in LILO). Yes, I had to review 1.0 (which
I never completed) to remember exactly how it was done.
-- DJ Lucas
More information about the lfs-support