I once did an experimental build called
microsaurus.
It used Xvesa, jwm, rxvt and a small shell with a minimal kernel and custom init written in C.
Boot time: ~
0.5s
Total compressed size: ~
1Mb
RAM usage with X, jwm and rxvt running ~3Mb (5Mb with background image)
Limitations: everything else - This was the result of my
muntzing the entire Linux ecosystem to figure out the absolute minimum requirements.
What I learned:
1) init
* anything passed on the kernel command in the form VAR=VAL goes in envp...
* any remaining parameters go on argv
* It only takes ~10 lines of shell to set the system up to boot into X
* it takes more lines of C but you get finer control with no dependencies
2)X
* X (or X apps) need to have /tmp /proc /sys, /dev and /dev/pts mounted set prior to starting
* Xvesa starts in a fraction of a second whereas Xorg can take 20s+ just to initialize some video cards.
* the window manager fails if it tries to start before the xserver sets up its socket.
* it also helps to have a few environment variables set (HOME, USER, etc...)
* you don't need systemD, udev, or even mdev
* jwm's StartupCommand tag can be used to bring up the rest of the system
3)kernel
* You need unix sockets, tmpfs, devtmpfs, ELF binary, basic video, mouse and keyboard support
* but you don't need support for almost anything else - not even a single filesystem if you use a builtin initramfs
* Its actually is faster (and smaller) if you enable lz4 compression and compress the kernel image with lz4hc
* There is no need to compress the builtin initramfs separately if the kernel image is.
4)multicall binaries
* give you the benefits of shared libraries in a static build
* just about any program can be put into a MCB
* but its better if they share code - see goingnuts gtk1 MCB in the pupngo thread
Unfortunately I learned _too_ much with that experiment - I saw what was in the sausage.