Jeff Garzik <[EMAIL PROTECTED]> writes:
> "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?
Not yet. What I have done so far is disable shmem.c and disabling the
printk's in BUG, disabling the iovirt code. This removed 64K in
.rodata but only 6K compressed :) The other bit I did is to disable
/proc and the fix all of the #ifdefs so all of the /proc code was
disabled.
I really want to have a general purpose system when I am done, and am
after bang for the buck improvements.
> 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.
That might be useful. Immediately possibly more with linuxBIOS then
for the kernel. But a strategy base
this does sound like a bang for the buck
> 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.
I'm trying to get general stuff. The tricky bit is lots of code is
only a couple of bytes big, so disabling it doesn't help much.
Eric