Boot Time Optimizations - Tslib Static Modules

I am trying to speed up the boot process of my little initramfs.

It currently takes about 8.5 seconds from power to the graphical menu. I tested the different kernel compression methods with a patch from Albin Tonnerre which should hopefully end up in 2.6.33. My mesurements show that an LZO compressed kernel saves about 0.5-0.6 seconds.

In kernel land I need to read up on a few things like async/deferred initcalls.

On the user space front I tried to link my boot application statically which should have 2 advantages.

  • The resulting statically linked binary should be smaller than the dynamically linked one with all the shared objects it needs. The linker will be able to only include the symbols which are actually used by my app.
  • At runtime the dynamic linker will not have to resolve a huge amount of symbols although this probably hasn’t a big impact because everything is already in RAM so there should be no expensive I/O

One thing I need to try out is to link everything statically expect libc which is required by other stuff (kexec, dropbear, busybox).

I *think* this should work with a few linker flags but I am not yet sure how it behaves in practice.

-Wl,-Bstatic -leina -lts ... -Wl,-Bdynamic -lc

Fortunately the modular design of the EFL which dlopen(3) modules at runtime also has an option to build said modules statically which means the code will be embedded into the main shared object. This can be enabled at compile time with

./configure --enable-$FOO=static

Unfortunately the same is not possible with stock tslib plugins which is why I wrote a patch to support it.

On a somewhat unrelated note the only thing I hate more than mailing list which are configured for member only posts are mailing lists with slow moderation for non member posts. Grumble.

Marc