On i.MX8QM, can U-Boot find out from which eMMC-Hardware partition it was loaded?

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

On i.MX8QM, can U-Boot find out from which eMMC-Hardware partition it was loaded?

309 Views
Tom2023
Contributor II

My understanding is, that if we configure boot0 as boot partition, and boot0 is corrupt, the SoC automatically tries to boot from boot1 and vice versa.

Is there a possibility to find out (in U-Boot) from which boot partition U-Boot has been loaded?

How actually does the SoC find out whether a boot partition contains a correct boot loader?

Thanks!

0 Kudos
Reply
2 Replies

287 Views
JosephAtNXP
NXP TechSupport
NXP TechSupport

Hi,

Thank you for your interest in NXP Semiconductor products,

Your understanding for switching is correct.

The ‘mmc partconf’ command shows or changes PARTITION_CONFIG field.

varname. When showing the PARTITION_CONFIG, an optional environment variable to store the current boot_partition value into.

boot_ack. boot acknowledge value

boot_partition. boot partition to enable for boot

    0x0. Device not boot enabled(default)

    0x1. Boot partition1 enabled for boot

    0x2. Boot partition2 enabled for boot

    0x7. User area enabled for boot

    others. Reserved

partition_access. partitions to access

The configs needed are:

CONFIG_SUPPORT_EMMC_BOOT=y

Regards

0 Kudos
Reply

282 Views
Tom2023
Contributor II

Thanks for your response.

What you describe is the configuration of the boot partition. However, I would like to know from which partition actually U-Boot was loaded.

Example: boot_partition is set to boot from boot1, bootloader in boot1 is for whatever reasons damaged, SoC loads automatically U-Boot from boot2. But how do I find you that U-Boot was loaded from boot2 and not, as configured via boot_partition, from boot 1?

0 Kudos
Reply