I would like my pi zero to boot quickly (under 1 second) using Linux. In that case we can pretend it is embedded controller and not standard full blown (but slow) computer.
Do you have any (additional) tips how to achieve this goal?
What I have already tried:
- various options (like kernel parameters, custom kernels on std. distributions - arch, raspbian, tuning the systemd stuff etc.) - all slow in general
- I have found some resources about altering the chain of bootloaders, but currently I'm unable to tweak it at this level
- best results I could reach were provided by buildroot
Using following rules, I'm able to boot within (approx.) 4 seconds, but still, it is slow:
- don't use initrd
- don't use modules (embed required drivers into kernel)
- don't use multiple devices (lvm)
- don't use raid
- don't use debug
- debugfs
- kernel debug (in kernel hacks)
- don't use PCI/PCMCIA
- don't use SATA/ATA
- don't use bootup logo
- don't use full blown C library like
glibc
- don't use optimization for size
- configuration
cmdline.txt
- don't use serial console:
- delete
console=xxx
, where xxx is serial port- edit
/etc/inittab
(getty spawn)- setup root fs type:
rootfstype=ext4
config.txt
- don't use boot delay:
boot_delay=0
- don't use rainbow:
disable_splash=1
- don't care about safe mode:
avoid_safe_mode=1