i.MX 6ULZ: How to boot Linux in under 2s

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

i.MX 6ULZ: How to boot Linux in under 2s

i.MX 6ULZ: How to boot Linux in under 2s

This article describes how to speed-up the Linux boot time on i.MX 6ULZ to under 2s.

Software: Linux BSP 6.12.20-2.0.0

Boot device: SD card

The attached imx6ulz-fast-boot.tar.gz archive contains a series of patches which reduces the boot time of the i.MX 6ULZ to ~1.9s. What you'll find in the archive:

  • U-Boot patches:
    • Set the BOOTDELAY to 0 in U-Boot
    • Increase the CPU frequency from 396MHz to 792MHz
    • Add quiet to the kernel bootargs, to suppress the kernel's output during boot
  • Kernel patches:
    • Trim down the kernel to create a minimal version
    • Use LZ4 compression type for the kernel image
  • Minimal rootfs based on BusyBox

How to?

1. Prepare the Yocto environment according to Section 3, 4, 5 in i.MX Yocto Project User's Guide. Version 6.12.20-2.0.0, for other versions, you may need to make adjustments.

2. Unzip the imx6ulz-fast-boot.tar.gz archive in the sources directory of your Yocto environment just created.

cd ~/imx-yocto-bsp/sources
tar -xvpzf imx6ulz-fast-boot.tar.gz -C .

3. Remove additional machine features. Add the configuration below in your conf/local.conf:

MACHINE_FEATURES:remove = "\
    optee \
    alsa \
    touchscreen screen \
    wifi bluetooth \
    bcm4339 bcm43455 \ 
    nxp8987-sdio  nxpwifi-all-sdio \ 
    rtc qemu-usermode"

 4. Build the image.

bitbake core-image-busybox

The resulted core-image-busybox-imx6ulz-14x14-evk.rootfs.wic should have ~38M.

5. Write the image on an SD card, and boot. It should boot under 2s from reset to prompt. If you are connected to the serial port of the board, press any key continuously to stop in U-Boot.

Attachments
No ratings
Version history
Last update:
2 weeks ago
Updated by: