Hello,
I would like to reduce boot time for 4.9.11 NXP kernel on imx6ul platform.
I have two sections where kernel where boot process spends a lot of time:
First is when unpacking rootfs. I tried changing to LZ4 compression mode but were no improvements:
0.394669] Trying to unpack rootfs image as initramfs...
[ 2.553149] random: fast init done
[ 9.138342] Freeing initrd memory: 46208K (8267b000 - 8539b000)
Second is when starting udev. I do not know how o reduce the time here:
Starting udev
[ 11.294191] udevd[135]: starting version 3.1.5
Populating dev cache
Does anyone have suggestions/experience on this topic?
Thanks,
Mihaita
Hello Mihaita,
There are a couple of documents with suggestions. These refer to an older kernel but the principles remain, like removing all unused modules.
https://community.nxp.com/docs/DOC-93619
https://community.nxp.com/docs/DOC-94738
Another alternative is using U-boot Falcon mode. There is a little video example of this on the following external blog.
https://imxdev.gitlab.io/video/tutorial/Booting-iMX6-under-one-second/
Some users have also used other smaller bootloaders, but U-boot Falcon mode would be preferred as U-boot is the recommended bootloader for the i.MX6. There is some more information on how the Falcon mode works on the link below:
https://www.denx.de/wiki/pub/U-Boot/MiniSummitELCE2013/2013-ELCE-U-Boot-Falcon-Boot.pdf
I hope this helps!
Regards,
Thanks for your answer and info.
But I want to keep using barebox for the moment.
I have read that if the kernel stays longer at "Starting udev" it means that I should disable autoloading of modules.
But I do not know how to so it globally. Only to add modules in blacklist
Does anybody has experience with this topic?
Thanks,
Mihaita
Hello Mihaita,
You may blacklist modules to keep them from loading. You may also disable them or set them as loadable on the kernel configuration screen (the menuconfig screen of the Kernel). Just be careful with this configuration since it may cause errors if the modules are required by a driver or feature. The kernel configuration will allow to disable any modules while you can only blacklist modules that are not built into the kernel.
I hope this helps!
Regards,