"Eric W. Biederman" wrote:
> 
> In the hope of being able to fit 2.4.x and linuxbios into a 256KB rom
> I have been playing around with a number things.  Adding config
> options to compile so of code out of the kernel is one of them.
> 
> Currently I have built a 226KB patched 2.4.2 kernel with a network
> device driver, and initrd support.  This isn't yet a useable size but
> it is close.
> 
> Using UPX seems to give a pretty steady 24KB reduction in kernel
> size, which makes the whole process easier.  The current gzip
> decompressor is only 8KB so it can't simply be that UPX needs a
> smaller decompressor.

Are you doing stuff like going through the drivers and core code you are
using, and removing syscalls and ioctls and kernel API functions which
will never be used?

Make sure to use -ffunction-sections to allow the linker a better chance
of removing never-referenced ELF sections.  There were more details on
this posted to lkml a while ago, search your favorite mail archive.

I've been thinking about tons of ways to make the Linux kernel smaller,
and it generally boils down to going through each and every source file,
and creating CONFIG_xxx options which allow you to disable code that is
less commonly used.

-- 
Jeff Garzik       | Sam: "Mind if I drive?"
Building 1024     | Max: "Not if you don't mind me clawing at the dash
MandrakeSoft      |       and shrieking like a cheerleader."

Reply via email to