Boot to Qt in 5 sec
To achieve boot time optimization we have made following described changes in the Boot loader, Kernel and Rootfs.
Older u-boot is taking approximately 3sec to load/run kernel image. So we made following optimizations in U-boot.
We are not initialising some hardware peripherals that we don’t need so it would save some time.
We removed delay in u-boot stage and we removed code for rescanning the mmc card & bootscript and hard coded the bootcmd and bootargs in it.
Finally we able to load/run kernel image within one second.
We have used Linux kernel18.104.22.168.1.1 and compatible toolchain for imx6. In the Kernel after configuring for the imx6_defconfig we removed following things
- Network options
- Ethernet options
- Disable File system ext2,3 support, File system debugging.
- Disable wifi,CAN,Bluetooth support
- HDMI support etc.
There are some board specific configuration you can't disable by menuconfig so you have to do it by yourself manually.
And we used this Optimized kernel Image to reach this boot time.you can change kernel command line as per your requirement or keep it as it is.
We have used buildroot to make minimal rootfs for Qt. We have built only Qt libraries and its dependencies and touch screen libraries (tslib) and its dependencies and few necessary libraries. we built the sample qt application with touch support. we have removed unnecessary start up scripts and launched out Qt app on start up script with QWS.