This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

SK-AM62: Boot partition 1 as primary boot mode and UDA as backup boot.

Part Number: SK-AM62

Hello,

I'm trying to boot image from UDA(backup boot mode) when boot partition 1(primary boot mode) is not working.

When I erase Boot Partition 1, it can boot from UDA(backup boot mode), but it stuck at SPL.

Then I need to go back to DFU mode and set these two things to boot from UDA manually:

1.Partconfig to UDA

mmc partconf 0 1 7 1
mmc bootbus 0 2 0 0

2. Set environment

setenv mmcdev 0
setenv bootpart 0:2
saveenv
boot 

Do we have any method to make it boot from backup image(UDA) automatically if Boot Partition 1 is not working?

  • Hi,

    A few questions,

    1. Are you using TI EVM?
    2. What PSDK are you using?
    3. Does your board boot using eMMC boot mode? (Boot from hardware Boot0 partition).

    ~ Judith

  • Hi, 

    1. Yes, Im using TI EVM AM62x

    2. Im using ti-processor-sdk-linux-am62xx-evm-08.04.01.03

    3. Using eMMC boot mode. Boot from boot1 partition as primary boot mode and UDA as backup boot mode.

    ~ Hong

  • Hi,

    There might be an issue booting from eMMC hardware boot partition on AM62x. Can you please try the following patch as an experiment: https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1233869/faq-am625-how-to-boot-with-emmc-boot-mode-on-am62x

    ~ Judith

  • Hi,

    By refer to your link, its about the issue booting from eMMC hardware boot partition. But my question is, do we have any method that I can boot from UDA(backup boot mode) if boot1(primary boot mode) fail? The only way to switch from Boot1 to UDA is only to set the partconf manually, but I need it to switch automatically.
    The output is shown in the picture, it success to switch to UDA(backuo boot mode) when I erase boot partition 1, but it stuck at SPL

  • Hi Hong,

    ROM should switch to backup boot mode automatically if we fail to boot from primary boot mode. U-boot then copies boot index info (information whether ROM booted from primary vs secondary media) from ROM. So here ROM will first try to boot from eMMC Boot0 partition, if not successful, it will boot from UDA. This information is then copied to U-boot which will continue booting from the boot mode that worked for ROM.

    ~ Judith

  • So U-boot does not have the functionality to decide whether to choose primary boot media or secondary boot media, only ROM does. Once ROM decides which boot mode works, U-boot will continue booting with that boot mode.

    ~ Judith

  • In summary, backup boot method should work automatically.

    That being said, if you look at Table 5.3.1.2 of the AM62x TRM, there is a list of all the possible backup boot modes. Since MMCSD Boot (eMMC Boot using UDA) is not specified, it may not be supported as a backup boot mode.

    I will verify on my end and post here soon.

    ~ Judith

  • Ya, ROM switch to backup boot mode automatically, but it just only boot SPL as I mention before.

  • Hi Hong,

    As mentioned above:

    -- If you look at Table 5.3.1.2 of the AM62x TRM, there is a list of all the possible backup boot modes. Since MMCSD Boot (eMMC Boot using UDA) is not specified, it may not be supported as a backup boot mode.

    Is there a reason you need to use eMMC boot using UDA, given that it is not listed as a backup boot mode?

    ~ Judith

  • Just need to have a backup image if image in boot partition 1 is corrupted.
    Im now able to boot from UDA, but it stuck at SPL.
    Another thing is, I had followed your step to modify the configs file, but it has warning during build:


    And I need to confirm again, Im now flashing image into boot partition 1 boot mode(primary) and UDA boot mode(backup), is it the changes only make in boot partition 1?

  • Hi Hong,

    Just need to have a backup image if image in boot partition 1 is corrupted.
    -- Understood, my concern is booting from UDA is not listed as backup boot mode and may not been verified as backup boot mode.

    Im now able to boot from UDA, but it stuck at SPL.
    -- Is this the log you showed above? That is issue with U-boot. It seems that ROM has booted from UDA successfully. Is it the whole log? It seems to have stopped at ATF. I would verify the image that you flashed to UDA.

    Another thing is, I had followed your step to modify the configs file, but it has warning during build:
    -- My understanding is that CONFIG_SYS_MMC_ENV_PART=1 is to save to BOOT0, but you are using this for eMMC boot, so if you change to CONFIG_SYS_MMC_ENV_PART=2, you should be able to use:
    setenv mmcdev 0
    setenv bootpart 0:2
    saveenv
    boot 

    Im now flashing image into boot partition 1 boot mode(primary) and UDA boot mode(backup), is it the changes only make in boot partition 1?
    -- Can you rephrase the question?


    I will go ahead and try this on my end and get back to you today.

    ~ Judith

  • Hi Hong,

    I was able to make it work.

    I re-built Linux DTB with the second patch found here: https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1233869/faq-am625-how-to-boot-with-emmc-boot-mode-on-am62x which reduces eMMC speed at Linux stage to be able to flash rootfs in Linux.


    Then verified MMCSD Boot (eMMC Boot using UDA) worked, board booted Linux Kernel.


    Then change boot mode dip switch to: SW2:001010000 SW3:11010010 where primary boot mode is eMMC boot and secondary is MMCSD Boot (eMMC Boot using UDA). I did not flash eMMC boot0, but the board boots from UDA successfully.

    ~ Judith

  • Since you are using eMMC boot mode, please apply the first patch in this link: https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1233869/faq-am625-how-to-boot-with-emmc-boot-mode-on-am62x and re-build u-boot binaries before flashing to eMMC Boot0 partition.

    ~ Judith

  • Correction: My mistake, I did not boot from the correct boot mode.

    I tried again: SW2:001010000 SW3:11010010 after
    mmc partconf 0 1 1 1
    mmc bootbus 0 2 0 0
    setenv bootpart 0:2
    saveenv

    and ran into tispl.bin not found error. It seems we cannot boot with UDA fs mode, only UDA raw mode. I believe if we set up to boot from UDA in raw mode, it should work.

    Actually this might be a bug in U-boot, but for now, UDA in raw mode should work.

    ~ Judith

  • Hi Judith,

    Thanks for your guide, may I know, these two changes in (+) [FAQ] AM625: How to boot with eMMC boot mode on AM62x - Processors forum - Processors - TI E2E support forums:
    1. Re-build U-boot with the following eMMC patch,
    2. In Linux Kernel, rebuilt the DTB with the following patch,

    I need to make changes for both boot partition 1 and UDA or just only UDA?

  • I had tried your method, I erase image in boot partition 1(primary), it can switch and boot from UDA(backup), but still stuck at SPL:

    By referring the result above, it's only the way I can boot from UDA by using the step below:
    1. Switch to boot mode boot 1.
    mmc partconf 0 1 1 1 
    mmc bootbus 0 2 0 0

    2. Set partconf to UDA:
    mmc partconf 0 1 7 1
    mmc bootbus 0 2 0 0

    Then my image can boot normally from UDA(backup).
     =

    I'm now able to boot from emmc Boot1 and UDA. What I need is, when my image in boot partition 1 is corrupted or I switch the boot mode pin, it will automatically boot from the desire boot mode without set partconf again and again.

    This is my changes in ks-am62-main.dtsi, may you help me to check if I'm doing wrong, because my original content has some different with yours:

  • Yes Hong,

    What I need is, when my image in boot partition 1 is corrupted or I switch the boot mode pin, it will automatically boot from the desire boot mode without set partconf again and again.

    -- Yes, ROM needs to fail booting from BOOT0 in order for it to boot UDA and then U-boot will simply copy this "working" boot method and continue booting with it.


    This is my changes in ks-am62-main.dtsi, may you help me to check if I'm doing wrong, because my original content has some different with yours:

    -- Your DTS changes look good, in summary:

    If you have the following, remove them:
    ti,otap-del-sel-mmc-hs = <0x0>;
    ti,otap-del-sel-ddr52 = <0x5>;
    tti,otap-del-sel-hs200 = <0x5>;

    and add these:
    /delete-property/mmc-ddr-1_8v;
    /delete-property/mmc-hs200-1_8v;

    ~ Judith

  • Hi,

    I have question here:

    /configs/am62x_evm_a53_defconfig
    -CONFIG_SYS_MMC_ENV_PART=1
    +CONFIG_SYS_MMC_ENV_PART=2

    a. What will happened if I make these changes?
    b. What does each number in the code represent?
    0 is represent UDA?
    1 is represent Boot 1?
    2 is represent Boot 2?

  • Hi Hong,

    CONFIG_SYS_MMC_ENV_PART specifies which MMC partition the environment is stored in. If not set, defaults to partition 0, the user area. Common values might be 1 (first MMC boot partition), 2 (second MMC boot partition).

    Since we are using first hardware boot0 partition for eMMC boot, CONFIG_SYS_MMC_ENV_PART=2 changes environment to hardware boot1 partition.

    For more information, you could look at <path-to-ti-u-boot>/env/Kconfig --> config ENV_IS_IN_MMC.

    ~ Judith

  • Hi Judith,

    I need to use Boot 1 as primary boot mode and UDA as backup boot mode, how can I configure the CONFIG_SYS_MMC_ENV_PART?
    0 is represent UDA?
    1 is represent Boot 1?
    2 is represent Boot 2?

  • Hi Hong,

    0 represents UDA
    1 represents boot0
    2 represents boot1

    You are using UDA and boot0 (first hardware boot partition), so you could set CONFIG_SYS_MMC_ENV_PART=2 to save u-boot environment in boot1 (second hardware boot partition). Now this is optional as you could also save u-boot environment in uEnv.txt.

    ~ Judith