I am trying to implement A/B partition scheme for OTA updates. The partition structure could look like this:
1. uboot partition 1
2. uboot partition 2
3 rootfs 1 (includes kernel and dtb)
4 rootfs 2 (includes kernel and dtb)
I am trying to understand how does the i.MX 8MM "knows" where to load the bootloader from ? Is there a way to tell the firmware to load the bootloader (u-boot) from a different partition ?
I could go with a simpler approach where I have one u-boot partition and two rootfs. However this comes with a risk of breakage if an OTA update of the u-boot partition goes bad due to some reason. Hence I was wondering if it's possible to have bootloader redundancy in the iMX platform ?
Instead of two different partitions for u-boot, I guess if there was a way to keep two copies of u-boot in that partition and for the firmware to somehow have a way to decide which one to load.
something similar to how the Raspberry Pi recently introduced tryboot.txt option.
Of course in the absence of such a possibility the only way would be to never update u-boot over OTA. However that doesn't really sound like a "good" approach IMO. How would we patch any u-boot CVEs then or bug in the bootloader ?
Hi Omer
>I am trying to understand how does the i.MX 8MM "knows" where to load the bootloader from ?
one can look at Table 1. Image layout, Table 53. Board-specific default values i.MX Linux User’s Guide
some addresses (like loadaddr) can be found in
https://source.codeaurora.org/external/imx/uboot-imx/tree/include/configs/imx8mm_evk.h?h=lf_v2021.04
Best regards
igor