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.

AM6412: Boot device as EMMC

Other Parts Discussed in Thread: CSD

Hi Sir,

   I use the SDK:08_06_00_42.

   I refer the document:software-dl.ti.com/.../UG-Memory.html

   I change the boot mode to eMMC and want to boot from the boot0 partition.

   But I don't see anything about booting.

   I flash the files into UDA partition of eMMC and I can see the bootup messages.

   Could you provide any suggestion to me?

   Thanks.

 

Best regards

Talmud

  • The officially supported boot solution is to have all of U-Boot (3 stages) in the eMMC boot0 partition, and the rootfs in the user data area (UDA) partition, as per SDK documentation you found.

       I flash the files into UDA partition of eMMC and I can see the bootup messages.

    Which files did you flash where? Are you saying to have *everything* in the UDA partition (U-Boot, Linux rootfs), and it boots?

    Regards, Andreas

  • Also for reference, this E2E FAQ here has a lot of detailed and helpful info for both eMMC boot using the boot0 partition, and eMMC boot using the UDA approach. While it is for AM62Ax the basic concepts will also apply to other AM6x devices such as AM64x.

    https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1227320/am62a7-q1-faq-how-to-enable-emmc-uda-boot-mode-and-emmc-boot-mode-on-am62a

    Regards, Andreas

  • Hi Andreas,

    I use these commans below and  don't see any messages from the console.

    mmc dev 0 1
    fatload mmc 1 ${loadaddr} tiboot3.bin
    mmc write ${loadaddr} 0x0 0x800
    fatload mmc 1 ${loadaddr} tispl.bin
    mmc write ${loadaddr} 0x800 0x800
    fatload mmc 1 ${loadaddr} u-boot.img
    mmc write ${loadaddr} 0x1000 0x1000

    But I modify the commands below and can see the logs.

    mmc dev 0
    fatload mmc 1 ${loadaddr} tiboot3.bin
    mmc write ${loadaddr} 0x0 0x800

    The logs:

    U-Boot SPL 2021.01-OpenWrt-r0-ff4ee1f (May 31 2023 - 06:32:10 +0000)
    SYSFW ABI: 3.1 (firmware rev 0x0008 '8.6.4--v08.06.04 (Chill Capybar')
    SPL initial stack usage: 13424 bytes
    Trying to boot from MMC2
    Authentication passed
    Authentication passed
    Warning: Did not detect image signing certificate. Skipping authentication to prevent boot failure. This will fail on Security Enforcing(HS-SE) devices
    Warning: Did not detect image signing certificate. Skipping authentication to prevent boot failure. This will fail on Security Enforcing(HS-SE) devices
    Starting ATF on ARM64 core...


    U-Boot SPL 2021.01-OpenWrt-r0-ff4ee1f (May 31 2023 - 06:32:10 +0000)
    SYSFW ABI: 3.1 (firmware rev 0x0008 '8.6.4--v08.06.04 (Chill Capybar')
    Trying to boot from MMC2
    Warning: Did not detect image signing certificate. Skipping authentication to prevent boot failure. This will fail on Security Enforcing(HS-SE) devices
    Warning: Did not detect image signing certificate. Skipping authentication to prevent boot failure. This will fail on Security Enforcing(HS-SE) devices


    U-Boot 2021.01-OpenWrt-r0-ff4ee1f (May 31 2023 - 06:32:10 +0000)

    SoC: AM64X SR2.0 HS-FS
    Model: Texas Instruments AM642 SK
    DRAM: 1 GiB
    NAND: 0 MiB
    MMC: mmc@fa10000: 0, mmc@fa00000: 1
    Loading Environment from FAT... OK
    In: serial@4a00000
    Out: serial@4a00000
    Err: serial@4a00000
    Net: eth0: ethernet@8000000port@1, eth1: ethernet@8000000port@2
    Hit any key to stop autoboot: 0
    =>
    => mmc dev 0
    switch to partitions #0, OK
    mmc0(part 0) is current device
    => fatload mmc 1 ${loadaddr} tiboot3.bin
    579064 bytes read in 26 ms (21.2 MiB/s)
    => mmc write ${loadaddr} 0x0 0x800

    MMC write: dev # 0, block # 0, count 2048 ... 2048 blocks written: OK
    => 
    U-Boot SPL 2021.01-OpenWrt-r0-ff4ee1f (May 31 2023 - 06:32:10 +0000)
    Resetting on cold boot to workaround ErrataID:i2331
    resetting ...

    U-Boot SPL 2021.01-OpenWrt-r0-ff4ee1f (May 31 2023 - 06:32:10 +0000)
    SYSFW ABI: 3.1 (firmware rev 0x0008 '8.6.4--v08.06.04 (Chill Capybar')
    SPL initial stack usage: 13424 bytes
    Trying to boot from MMC1
    Authentication passed
    Authentication passed
    Warning: Did not detect image signing certificate. Skipping authentication to prevent boot failure. This will fail on Security Enforcing(HS-SE) devices
    Warning: Did not detect image signing certificate. Skipping authentication to prevent boot failure. This will fail on Security Enforcing(HS-SE) devices
    init_env from device 9 not supported!
    Starting ATF on ARM64 core...


    U-Boot SPL 2021.01-OpenWrt-r0-ff4ee1f (May 31 2023 - 06:32:10 +0000)
    SYSFW ABI: 3.1 (firmware rev 0x0008 '8.6.4--v08.06.04 (Chill Capybar')
    Trying to boot from MMC1
    mmc_load_image_raw_sector: mmc block read error
    ** Partition 1 not valid on device 0 **
    spl_register_fat_device: fat register err - -1
    spl_load_image_fat: error reading image u-boot.img, err - -1
    SPL: failed to boot from all boot devices
    ### ERROR ### Please RESET the board ###

    Best regards

    Talmud

  • U-Boot SPL 2021.01-OpenWrt-r0-ff4ee1f (May 31 2023 - 06:32:10 +0000)
    SYSFW ABI: 3.1 (firmware rev 0x0008 '8.6.4--v08.06.04 (Chill Capybar')
    Trying to boot from MMC1
    mmc_load_image_raw_sector: mmc block read error
    ** Partition 1 not valid on device 0 **
    spl_register_fat_device: fat register err - -1
    spl_load_image_fat: error reading image u-boot.img, err - -1
    SPL: failed to boot from all boot devices
    ### ERROR ### Please RESET the board ###

    Can you print your bootmode pin settings using the below U-Boot command and report back...

    => md.l 0x43000030 1

    Regards, Andreas

  • Hi Andreas,

       => md.l 0x43000030 1
    43000030: 0000144b K...

    I suspected it bootup failed from the primary boot mode.

    But I don't know why it fail.

    The logs:

    => mmc dev 0
    switch to partitions #0, OK
    mmc0(part 0) is current device
    => fatload mmc 1 ${loadaddr} tiboot3.bin
    579592 bytes read in 26 ms (21.3 MiB/s)
    => mmc write ${loadaddr} 0x0 0x800

    MMC write: dev # 0, block # 0, count 2048 ... 2048 blocks written: OK
    => fatload mmc 1 ${loadaddr} tispl.bin
    896919 bytes read in 40 ms (21.4 MiB/s)
    => mmc write ${loadaddr} 0x800 0x800

    MMC write: dev # 0, block # 2048, count 2048 ... 2048 blocks written: OK
    => fatload mmc 1 ${loadaddr} u-boot.img
    1126267 bytes read in 50 ms (21.5 MiB/s)
    => mmc write ${loadaddr} 0x1000 0x1000

    MMC write: dev # 0, block # 4096, count 4096 ... 4096 blocks written: OK
    => mmc dev 0 1
    switch to partitions #1, OK
    mmc0(part 1) is current device
    => fatload mmc 1 ${loadaddr} tiboot3.bin
    579592 bytes read in 26 ms (21.3 MiB/s)
    => mmc write ${loadaddr} 0x0 0x800

    MMC write: dev # 0, block # 0, count 2048 ... 2048 blocks written: OK
    => fatload mmc 1 ${loadaddr} tispl.bin
    896919 bytes read in 40 ms (21.4 MiB/s)
    => mmc write ${loadaddr} 0x800 0x800

    MMC write: dev # 0, block # 2048, count 2048 ... 2048 blocks written: OK
    => 
    U-Boot SPL 2021.01-OpenWrt-r0-ff4ee1f (May 31 2023 - 06:32:10 +0000)
    Resetting on cold boot to workaround ErrataID:i2331
    resetting ...

    U-Boot SPL 2021.01-OpenWrt-r0-ff4ee1f (May 31 2023 - 06:32:10 +0000)
    SYSFW ABI: 3.1 (firmware rev 0x0008 '8.6.4--v08.06.04 (Chill Capybar')
    SPL initial stack usage: 13424 bytes
    Trying to boot from MMC1

    add by yong, spl_mmc_boot_mode, boot_device=9 devstat:0x144b, bootmode_cfg:0x0
    add by yong, boot_mode=3

    [Talmud]spl_mmc_load(376):part=1
    Authentication passed
    Authentication passed
    Warning: Did not detect image signing certificate. Skipping authentication to prevent boot failure. This will fail on Security Enforcing(HS-SE) devices
    Warning: Did not detect image signing certificate. Skipping authentication to prevent boot failure. This will fail on Security Enforcing(HS-SE) devices
    init_env from device 9 not supported!
    Starting ATF on ARM64 core...


    U-Boot SPL 2021.01-OpenWrt-r0-ff4ee1f (May 31 2023 - 06:32:10 +0000)
    SYSFW ABI: 3.1 (firmware rev 0x0008 '8.6.4--v08.06.04 (Chill Capybar')
    Trying to boot from MMC1

    add by yong, spl_mmc_boot_mode, boot_device=9 devstat:0x144b, bootmode_cfg:0x0
    Warning: Did not detect image signing certificate. Skipping authentication to prevent boot failure. This will fail on Security Enforcing(HS-SE) devices
    Warning: Did not detect image signing certificate. Skipping authentication to prevent boot failure. This will fail on Security Enforcing(HS-SE) devices


    U-Boot 2021.01-OpenWrt-r0-ff4ee1f (May 31 2023 - 06:32:10 +0000)

    SoC: AM64X SR2.0 HS-FS
    Model: Texas Instruments AM642 SK
    DRAM: 1 GiB
    NAND: 0 MiB
    MMC: mmc@fa10000: 0, mmc@fa00000: 1
    Loading Environment from FAT... *** Warning - bad CRC, using default environment

    In: serial@4a00000
    Out: serial@4a00000
    Err: serial@4a00000
    Net: eth0: ethernet@8000000port@1, eth1: ethernet@8000000port@2
    Hit any key to stop autoboot: 0
    => md.l 0x43000030 1
    43000030: 0000144b K...
    =>

    Best regards

    Talmud

  • Hi Talmud,

    thanks for the additional logs. It'll take me a day or two before I can look into this again. Will be in touch,

    Regards, Andreas

  • Hi Andreas,

        OK.

        Thanks.

    Best regards

    Talmud

  • fatload mmc 1 ${loadaddr} tiboot3.bin
    mmc write ${loadaddr} 0x0 0x800
    fatload mmc 1 ${loadaddr} tispl.bin
    mmc write ${loadaddr} 0x800 0x800
    fatload mmc 1 ${loadaddr} u-boot.img
    mmc write ${loadaddr} 0x1000 0x1000

    There's one issue here, A53 SPL ("tispl.bin") expects to load A53 U-Boot ("u-boot.img") from offset 0x1800, NOT 0x1000. Please see the proper steps here: https://software-dl.ti.com/processor-sdk-linux/esd/AM64X/08_06_00_42/exports/docs/linux/Foundational_Components/U-Boot/UG-Memory.html?highlight=emmc#booting-tiboot3-bin-tispl-bin-and-u-boot-img-from-emmc-boot-partition-for-k3-class-of-socs 

    If the correct offset isn't used you won't be able to boot into A53 U-Boot.

    Regards, Andreas

  • Hi Andreas,

       Because the size of my boot partition is 4MB,I have to modify the offset.

    am64x_evm_a53_defconfig

       CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR from 0x1800 to 0x1000

       But my problem is that I can't boot from boot partition.

       My configurations are below:

         (1) the primary boot mode :eMMC

         (2) eMMC partconf: boot from boot0 partition

       If I don't flash tiboot3.bin into UDA partition(mmc dev 0),it will boot failed and I don't see any messages from the console. 

       Could you provide the suggestion to me?

       Thanks.

     

       The logs:

    =>mmc info
    Device: mmc@fa10000
    Manufacturer ID: 32
    OEM: 101
    Name: MMC8G
    Bus Speed: 52000000
    Mode: MMC High Speed (52MHz)
    Rd Block Len: 512
    MMC version 5.1
    High Capacity: Yes
    Capacity: 7.3 GiB
    Bus Width: 4-bit
    Erase Group Size: 512 KiB
    HC WP Group Size: 8 MiB
    User Capacity: 7.3 GiB
    Boot Capacity: 4 MiB ENH
    RPMB Capacity: 4 MiB ENH
    Boot area 0 is not write protected
    Boot area 1 is not write protected
    => mmc partconf 0
    EXT_CSD[179], PARTITION_CONFIG:
    BOOT_ACK: 0x1
    BOOT_PARTITION_ENABLE: 0x1
    PARTITION_ACCESS: 0x1
    =>
    => mmc dev 0
    switch to partitions #0, OK
    mmc0(part 0) is current device
    => mmc erase 0 0x2000

    MMC erase: dev # 0, block # 0, count 8192 ... 8192 blocks erased: OK
    => mmc dev 0 1
    switch to partitions #1, OK
    mmc0(part 1) is current device
    => mmc erase 0 0x2000

    MMC erase: dev # 0, block # 0, count 8192 ... 8192 blocks erased: OK
    => fatload mmc 1 ${loadaddr} tiboot3.bin
    580160 bytes read in 26 ms (21.3 MiB/s)
    => mmc write ${loadaddr} 0x0 0x800

    MMC write: dev # 0, block # 0, count 2048 ... 2048 blocks written: OK
    => fatload mmc 1 ${loadaddr} tispl.bin
    896731 bytes read in 40 ms (21.4 MiB/s)
    => mmc write ${loadaddr} 0x800 0x800

    MMC write: dev # 0, block # 2048, count 2048 ... 2048 blocks written: OK
    => fatload mmc 1 ${loadaddr} u-boot.img
    1127367 bytes read in 49 ms (21.9 MiB/s)
    => mmc write ${loadaddr} 0x1000 0x1000

    MMC write: dev # 0, block # 4096, count 4096 ... 4096 blocks written: OK
    =>
    => mmc dev 0
    switch to partitions #0, OK
    mmc0(part 0) is current device
    => fatload mmc 1 ${loadaddr} tiboot3.bin
    580160 bytes read in 26 ms (21.3 MiB/s)
    => mmc write ${loadaddr} 0x0 0x800

    MMC write: dev # 0, block # 0, count 2048 ... 2048 blocks written: OK
    => 
    U-Boot SPL 2021.01-OpenWrt-r0-ff4ee1f (May 31 2023 - 06:32:10 +0000)
    Resetting on cold boot to workaround ErrataID:i2331
    resetting ...

    U-Boot SPL 2021.01-OpenWrt-r0-ff4ee1f (May 31 2023 - 06:32:10 +0000)
    SYSFW ABI: 3.1 (firmware rev 0x0008 '8.6.4--v08.06.04 (Chill Capybar')
    SPL initial stack usage: 13424 bytes
    Trying to boot from MMC1

    [Talmud]spl_mmc_boot_mode(329):mmc->part_config=0x48
    add by yong, spl_mmc_boot_mode, boot_device=9 devstat:0x144b, bootmode_cfg:0x0
    add by yong, boot_mode=3

    [Talmud]spl_mmc_load(376):part=1
    Authentication passed
    Authentication passed
    Warning: Did not detect image signing certificate. Skipping authentication to prevent boot failure. This will fail on Security Enforcing(HS-SE) devices
    Warning: Did not detect image signing certificate. Skipping authentication to prevent boot failure. This will fail on Security Enforcing(HS-SE) devices
    init_env from device 9 not supported!
    Starting ATF on ARM64 core...


    U-Boot SPL 2021.01-OpenWrt-r0-ff4ee1f (May 31 2023 - 06:32:10 +0000)
    SYSFW ABI: 3.1 (firmware rev 0x0008 '8.6.4--v08.06.04 (Chill Capybar')
    Trying to boot from MMC1

    [Talmud]spl_mmc_boot_mode(329):mmc->part_config=0x48
    add by yong, spl_mmc_boot_mode, boot_device=9 devstat:0x144b, bootmode_cfg:0x0
    add by yong, boot_mode=3

    [Talmud]spl_mmc_load(376):part=1
    Warning: Did not detect image signing certificate. Skipping authentication to prevent boot failure. This will fail on Security Enforcing(HS-SE) devices
    Warning: Did not detect image signing certificate. Skipping authentication to prevent boot failure. This will fail on Security Enforcing(HS-SE) devices


    U-Boot 2021.01-OpenWrt-r0-ff4ee1f (May 31 2023 - 06:32:10 +0000)

    SoC: AM64X SR2.0 HS-FS
    Model: Texas Instruments AM642 SK
    DRAM: 1 GiB
    NAND: 0 MiB
    MMC: mmc@fa10000: 0, mmc@fa00000: 1
    Loading Environment from FAT... OK
    In: serial@4a00000
    Out: serial@4a00000
    Err: serial@4a00000
    Net: eth0: ethernet@8000000port@1, eth1: ethernet@8000000port@2
    Hit any key to stop autoboot: 0
    => md.l 0x43000030 1
    43000030: 0000144b K...

    Best regards

    Talmud

  • Hi Talmud,

    please allow a couple of days for a response. Thanks for your patience.

    Regards, Andreas

  • Hi Andreas,

        OK.

        Thank you.

    Best regards

    Talmud

  • Hi Andreas,

        Do you have any updates?

        Thanks.

    Best regards

    Talmud

  • Will try to get back to you early this week. Stay tuned.