i.MX 8ULP mmc boot partition fallback detection

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

i.MX 8ULP mmc boot partition fallback detection

143 Views
martinetd
Contributor IV

Hi

When booting from eMMC boot0/boot1 partitions (through ext_csd PARTITION_CONFIG setting), the i.MX 8ULP boot rom (?) automatically falls back to the other partition if a partition was not bootable.

For example, writing the imx-boot image onto /dev/mmcblk0boot1 (of 0/1) but setting the MMC to 1 (of 1/2) will still successfully boot.

 

Our problem is that our current code bases the decision to pick the u-boot env partition and linux root partition based on EXT_CSD_EXTRACT_BOOT_PART(mmc->part_config), but that might not be the partition that actually booted.

In that case, further updates can overwrite the "good" imx-boot version on the "other" side when trying to replicate what they think is the imx-boot that currently booted, rendering the device unbootable without physical intervention (serial downloader or similar)

 

So, is there a way to get the currently booted partition of the MMC device in case of MMC boot?

For exampe we currently query the boot device through the rom api (rom_api_query_boot_infor(QUERY_BT_DEV...)), perhaps it has an API I didn't see that would allow querying the actually booted bootpart?

 

Thank you

0 Kudos
Reply
0 Replies