Long time before ROCK 4 boots

So I finally was able to do some measurement using the serial console and I found that the most of the time in U-Boot is spent with USB scanning. This takes about 10 seconds. I compared Radxa vs Armbian and noticed that Armbian’s U-Boot does not use “preboot” that starts USB initialization before booting.

I guess this is done to support USB keyboard in bootmenu. Since display (HDMI/DSI) is disabled in U-Boot, I see this as unnecessary. Since we don’t use USB/network boot, I disabled USB/Network in U-Boot completely and now it boots much faster.

# CONFIG_NET is not set
# CONFIG_USB is not set
# CONFIG_USE_PREBOOT is not set

There is also some FAN53555 regulator that takes an additional second and is not enabled Armbian but I’m not sure about its purpose: bsp/u-boot/.common/kconfig.conf at main · radxa-repo/bsp · GitHub

Additional 3 seconds are taken by loading a kernel image. It’s only a minor time but if someone wants fastest boot as possible the question could be why loading 28 MB file takes 3 seconds.

[2023-11-13 09:45:28.810] Retrieving file: /boot/vmlinuz-5.10.110-1-rockchip
[2023-11-13 09:45:31.737] Retrieving file: /boot/initrd.img-5.10.110-1-rockchip
[2023-11-13 09:45:32.616] append: root=UUID=c99b0645-5ec5-4162-a01e-b3a9ae7371d9 console=ttyFIQ0,1500000n8 quiet splash loglevel=4 rw earlycon consoleblank=0 console=tty0 coherent_pool=2M irqchip.gicv3_pseudo1