Re: Shrinking kernel

Horst von Brand (vonbrand@inf.utfsm.cl)
Tue, 04 Nov 1997 17:48:31 -0300


"B. James Phillippe" <bryan@Terran.ORG> said:
> I'm faced with the task of reducing the size of a
> minimally-configured linux-2.0 kernel. [...]

Use the ROMFS for a filesystem (should be good for some 20Kb above the
alternatives). Pull the virtual console support out (or use just one
VT).

Check what you are running in userland; perhaps change to a leaner shell
(like ash) or just launch a statically compiled program as init that does
everything you need directly via fork()/exec()ing the relevant programs. In
the programs themselves get rid of stuff like internationalization, help
and error messages, ... I'd guess the userland fat is far larger than what
you can gain out of the kernel. And more portable to remove, too: The
kernel is lean as they come; the userland stuff is configured for
flexibility, not minimal size.

Have fun!

-- 
Dr. Horst H. von Brand                       mailto:vonbrand@inf.utfsm.cl
Departamento de Informatica                     Fono: +56 32 654431
Universidad Tecnica Federico Santa Maria              +56 32 654239
Casilla 110-V, Valparaiso, Chile                Fax:  +56 32 797513