By the way, you can tune boot times further. My print server board boots in 8 seconds to Debian 12 (bootloader + kernel + userspace).
1. Make sure the bootloader (u-boot) loads the kernel as fast as possible.
- Disable automatic Ethernet/USB/other subsystems initialization (you can keep them enabled, just don't activate unless requested in the shell manually by the user)
- Tune `distro_bootcmd` command
- Make sure that MicroSD/eMMC/SSD works full-speed (with proper clocks and speed protocol)
2. Use fast decompression algorithm for the kernel and initramfs
- It's either zstd or gzip
3. Collect boot file access data and sort the files on the filesystem
- The benefit in near-linear access & read-ahead
I'm pretty sure that the current 20 seconds could be shrunk down to 14 or so.