How does the boot sequence on iMX7 exactly work? From my understanding IPL (initial program loader) loads SPL (Secondary prorgram loader) and then u-boot is loaded. Per default u-boot is located in /dev/mdt1 and /dev/mtd2 (with the default image from Toradex).
Am I correct in the assumption that IPL can’t be updated? How is SPL updated? How does SPL decide from which partition it should load U-Boot? How can I enable console output for SPL to see potential issues? Is SPL part of the U-Boot-Toradex recipe in Yocto?
I’m asking those questions as I noticed that on my system the bootloader from /dev/mtd2 was loaded rather than /dev/mtd1. Is this the behavior when SPL detects that /dev/mtd1 is corrupt?
You can find the boot flow in the technical reference manual from NXP:
The boot ROM (IPL) loads the SPL and SPL load U-Boot. However, SPL is part of U-Boot and just a smaller version of it so that it fits into the internal memory before RAM is available.If you build U-Boot according to this article the SPL will already be attached to the image:
Toradex Easy Installer flashes U-Boot to both mtd1 and mtd2 for redundancy:
So it might be that your mtd1 is corrupted. However, you can always recover your module even if all boot partitions are corrupted with recovery mode:
This forces the boot ROM to receive a boot image over USB and allows you to flash Toradex Easy Installer again.