KP> Your comparison is far from accurate, include the memory taken by
KP> loaded kernel modules on both systems and then you might get some
KP> proper numbers.
Linux is known to _work_ on SOHO MIPS boxes, with 4MiB of flash and
16MiB of RAM. You could say about ``loaded kernel modules,'' but when
whole firmware, with all needed utils, like PPPoE client, Web-based
UI, DHCP server, etc, is only 3.5MiB (Ok, it is compressed, but
anyway it should work on 16MiB of RAM), it looks like functional
Linux kernel could be about 1MiB without any modules.
--
// Black Lion AKA Lev Serebryakov <l...@FreeBSD.org>
We have a good starting point. We can look at the code/data/bss from
each .o file that's included in the build.
You can build a bare-bones kernel and modules, and use that to see how
big things are.
You can group those by subsystem to get an idea of how big each
subsystem is. Whether or not it's loaded is (mostly) irrelevant - if
we compile out USB but then include it as a module, the underlying
size is almost the same anyway.
Thanks,
Adrian
Would clang's LTO help for size? I know work's starting on the bsd
elftools ld, but I doubt it has any LTO support yet. Running -Os on the
kernel as a whole instead of object files could probably help a lot
also. I might try to set it up and see a size comparision.
Also, what about the userland? Linux got popular for embedded partly
for busybox and uclibc. If Linux didn't exist, someone would have
ported minix instead.