Some products require a very fast boot time. If you are developing such a product, you should read the following tips for reducing boot time.
The tips in this blog post describe typical optimization actions that can be done on Variscite’s System on Modules to gain shorter boot times.
U-Boot optimization
- Remove the U-Boot splash screen on SOMs that support it.
You can disable the splash screen using the U-Boot command line by following this example.
To completely remove the splash screen support from your U-Boot you should also disable CONFIG_VIDEO in the U-Boot source code. - Change CONFIG_BOOTDELAY to 0 in U-Boot to save the second of delay before the autoboot occurs.
- If your application requires an extremely fast boot, consider implementing Falcon mode for further time reduction – skipping U-Boot completely and loading the kernel from SPL.
Note: make sure you are not skipping important code from the U-Boot board file. If needed, move such code from U-Boot to SPL.
Read this guide to learn more about how to add support for Falcon Mode. - Append “quiet” to the kernel command line – it will quiet down the prints during boot, which takes time.
Linux optimization
- Remove unneeded drivers from the default kernel configuration to gain a slimmer and cleaner kernel image that can be loaded faster.
- Remove or disable unneeded nodes from the device tree.
- Build as modules required drivers that can be loaded at the end of the boot.
Rootfs optimization
- Remove from the filesystem unneeded packages that run on startup. Using Yocto, we recommend starting with core-image-minimal or core-image-base as a minimal image and adding to it only the packages you need.
- If it makes sense for your application, you can consider running your filesystem from a RAM disk: this is sometimes used for small read-only filesystems.