Because of the Thanksgiving holiday in the U.S., TI E2E™ design support forum responses may be delayed from November 25 through December 2. Thank you for your patience.

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.

PROCESSOR-SDK-DRA8X-TDA4X: Flashing emmc boot partitions

Part Number: PROCESSOR-SDK-DRA8X-TDA4X

Hi TI,
I am using TI release 7.0. We have emmc version 5.1.
I have flashed the bootloaders and rootfs in emmc as per steps given by TI documentation:
Instructions to flash eMMC and boot.
-1-
Flash bootloader binaries using instructions from below link
software-dl.ti.com/.../Foundational_Components_U-Boot.html

-2-
Flash rootfs to eMMC using instructions from below link
software-dl.ti.com/.../How_to_flash_emmc_device.html
--------------------------

I observe that the bootloader tiboot3.bin is also needed in the /dev/mmcblk0p1 for device to boot successfully.

So my understanding is as below:
1.) All Bootloaders are installed in mmcblk0boot0. This is the raw writes that are done from uboot in step 1 above.
2.) There is some issue with tiboot3.bin hence it boots the bootloader from partition /dev/mmcblk0p1
3.) 2 is as per the table "ROM Code Boot Modes" in J721E_DRA829_TDA4VM_AM752x_SR1.0_NDA_TRM_vA.pdf
eMMC eMMC flash N N Boot from boot partition with auto-fall back to file system

I need to flash emmc with all the required data after linux boot. So i would like to understand below
1.) Is my above understanding correct ?
2.) What is the TI recommended partitions for writing bootloaders. mmcblk0boot0 or mmcblk0p1, currently i have flashed both.
3.) How to debug the failure to load tiboot3.bin from mmcblk0boot0. Currently i dont see any failure logs. Also same tiboot3.bin from mmcblk0p1 works.
4.) If we can resolve the issue is there need for boot partition mmcblk0p1 for emmc.
5.) I am using dd for flashing to mmcblk0boot0 from linux. Does ti has any other recommendations.

Best regards
Amit

  • Hi Amit,

    https://e2e.ti.com/support/processors/f/791/p/886980/3282312#3282312

    I believe that was resolved. Why are you writing tiboot3.bin again to /dev/mmcblk0p1?

    Was this something you did on 6.02 as well? I just follow the: http://software-dl.ti.com/jacinto7/esd/processor-sdk-linux-jacinto7/latest/exports/docs/linux/Foundational_Components_U-Boot.html#booting-tiboot3-bin-tispl-bin-and-u-boot-img-from-emmc-boot-partition

    I am able to boot from eMMC. Are you seeing issue specific to 7.0?

    Best Regards,
    Keerthy

  • Hi Keerthy,

    - Writing tiboot3.bin to /dev/mmcblk0p1: Yes i did write tiboot3.bin to boot partition in release 6.0. I ran same script for installing emmc as was done for sdcard.

    - I can also boot from emmc if the tiboot3.bin is present in the p1 boot partition. But this seems some backup mode when booting from the mmcblk0boot0. 

    - I have flashed same tiboot3.bin from bootloader but still it needs the binary in the boot, fat partition.

    - Actually only tiboot3.bin is required in the fat partition p1. Others it does refer from the mmcblk0boot0 partition.

    - Can you give any pointer how to debug this. If all bootloaders can be used from mmc0boot0 then whole of emmc user partition is available for rootfs.

    Best regards

    Amit

  • Hi Arun,

    If you are using a custom board then you may want to check the dip switch settings that map
    to the below config on TI Board:

    SW 8:

    1    2    3    4    5    6    7    8
    On Off Off Off Off Off Off Off

    SW 9:

    1    2    3    4    5    6    7    8
    Off On Off Off Off Off Off Off

    On TDA4 TI board i have no need to have a replica of tiboot3.bin on the other partitions.

    Best Regards,
    Keerthy

  • Hi Arun,

    As I understand now, the customer board has only one eMMC boot mode whereas on the EVM we have two modes: 1. eMMC (user) and 2. eMMC (boot0).

    We can start with determining which one of the two is there on the customer board.

    For that, can you please let me know the values of the following registers: (see TRM section 4.3 for details)

    1. CTRLMMR_MAIN_DEVSTAT   -> 0x0010_0030

    2. CTRLMMR_WKUP_DEVSTAT -> 0x4300_0030

    Regards,

    Karan

  • Hi Karan,

    Following is the values for
    1. CTRLMMR_MAIN_DEVSTAT -> 0x0010_0030 = 0x000000AB
    2. CTRLMMR_WKUP_DEVSTAT -> 0x4300_0030 = 0x00000000

    Please see the options possible as per our HW design(Attachment). I am setting
    below value for the table. 
    1.) Primary bootmode B Pin = 1
    2.) Primary bootmode A Pin, MCU 5 = 0
    3.) Primary bootmode A Pin, MCU 4 = 0 (Always 0)
    3.) Primary bootmode A Pin, MCU 3 = 0 

    I see "Trying to boot from MMC1" so booting from emmc.

    Can you suggest what the value should be for using the emmc bootpartition.
    Best regards
    Amit

  • Hi Amit,

    1. The results you shared are for the eMMC boot on custom board? (Please confirm)

    2. In case of SD boot, do you see the values different? 

    Regards,

    Karan

  • Hi Karan,

    I confirm these values are for emmc boot on custom board. EMMC is flashed with bootloaders(both raw and boot partition) and rootfs for.

    If the emmc is formatted it falls back to SDcard boot.

    Along with the emmc flash i use the following bootloader environment variables for emmc boot.

    setenv bootpart "0:2"
    setenv mmcdev 0

    With these i can boot without sdcard till linux shell and even vision_apps work.

    Best regards

    Amit

  • Hi Amit,

    -0-

    Please confirm the below understanding:

    Status

    Works

    mmcblk0boot0

     

    mmcblk0p1

    tiboot3.bin, tispl.bin, u-boot.img, sysfw.itb ...

    mmcblk0p2

    File system

    Status

    Does not work

    mmcblk0boot0

    tiboot3.bin, tispl.bin, u-boot.img, sysfw.itb ...

    mmcblk0p1

     

    mmcblk0p2

    File system

    Status

    Works

    mmcblk0boot0

    tispl.bin, u-boot.img, sysfw.itb ...

    mmcblk0p1

    tiboot3.bin

    mmcblk0p2

    File system

    -1-

    Can you please confirm the values of the below in case of SD boot too? Just like you have shared for eMMC boot.

    1. CTRLMMR_MAIN_DEVSTAT   -> 0x0010_0030

    2. CTRLMMR_WKUP_DEVSTAT -> 0x4300_0030

    -2-

    Amit Kamath said:
    Along with the emmc flash i use the following bootloader environment variables for emmc boot.

    By eMMC flash do you mean mmcblk0boot0? And by eMMC boot do you mean mmcblk0p1?

    Regards,

    Karan

  • Hi Karan,
    -0-
    Yes The understanding from table is correct.

    -1-
    The values from the registers are same for SD and emmc boot.
    devmem2 0x00100030 = 0x000000AB
    devmem2 0x43000030 = 0x00000000

    Please see the logs emmc_boot.txt and sdcard_boot.txt for the same.
    In bootloader context i consider MMC1=emmc and MMC2=sdcard
    In linux context i consider mmcblk0=emmc and mmcblk1=sdcard.

    -2-
    emmc flash means writing to the user partitions of emmc.
    emmc boot: Is booting without SDcard. I am not sure from where exactly
    the BOOTROM picks the bootloaders.

    Best regards
    Amit

    sdcard_boot.txt

  • Hi Amit,

    Having both the CTRLMMR_MAIN_DEVSTAT and CTRLMMR_WKUP_DEVSTAT same in SD and eMMC boot seems strange. Let me check more on this.

    Regards,

    Karan

  • Hi Amit,

    The values (apart from being same for SD and eMMC in your case) also seem different from what is expected.

    From you settings I draw the following conclusions:

    1. Your Primary boot mode = MMC/SD with Port 0 i.e. actually eMMC user partition.

    2. Your backup boot mode = MMC/SD with Port 1 i.e. actually MMC/SD card itself.

    3. Changing the boot switch setting on your custom board is not taking in effect.

    This explains why when you put tiboot3.bin in eMMC user partition, it boot. Doesn't explain though that how it picks the tispl.bin, sysfw.itb and u-boot.img from the eMMC boot0 partition.

    ---

    If you look at Table 4-10 of TRM, the following are not in line with my understanding:

    1. MCU_BOOTMODE[3] = MCU 3 = 1 for eMMC and 0 for MMC/SD -> This is 0 for the value you observe (see CTRLMMR_WKUP_DEVSTAT[3])

    2. BOOTMODE[6] = Port = 0 for eMMC and 1 for MMC/SD (as SD card is port1) -> This is 0 for the value you observe (see CTRLMMR_MAIN_DEVSTAT[6])

    ---

    Can you please try the following:

    a. Read the same registers from u-boot. Halt and use md <HEX address> 1

    b. Check on a different board the same registers.

    Regards,

    Karan

  • Hi Karan,

    a. I see same values from u-boot as below:

    --- Bootloader
    => md 0x00100030 1
    00100030: 000000ab ....
    => md 0x43000030 1
    43000030: 00000000 ....

    b. I will update with other board data ASAP.

    Best regards

    Amit

     

  • Hi Karan,

    b. All the boards are having same board data.

    Best regards

    Amit

  • Hi Amit,

    Will you be able to get some insights on the bootmodes exposed from your HW team? Seems like booting from eMMC boot partition is not enabled from the boot mode pins exposed on your custom board.

    I can help you explain the basis of the conclusions I drew (in my previous reply) in details if need be.

    Regards,

    Karan

  • Hi Amit,

    Did you get a chance to confirm with the HW team on the boot modes exposed and their mapping to the boot switches on your custom hardware?

    Regards,

    Karan

  • Hi Karan,

    I got response from HW Architect we have low on for SYS_BOOTMODE0 and MCU_BOOTMODE03.

    Changing that would need reworks that might not be possible for everyone with our custom boards.

    Maybe in next version of HW spin we can change that. 

    For this case can you just confirm that we can continue with the current sequence. We can close with the conclusion.

    We can have both HW and SW boot partitions populated for now.

    Best regards

    Amit

  • Hi Amit,

    Thanks for checking this with your HW team.

    You can continue to use the current sequence.

    Regards,

    Karan

  • Hi Karan,

    With HW Architects help we could find that the BOOTMODE is set for Single lane emmc configuration. With changing eboot mmc bootbus 0 0 0 0 we are able to resolve issue with tiboot3 from emmc boot partition.

    Thanks

    Amit