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.

AM6441: SR2.0 eMMC boot issue after programming from successful µSD boot

Part Number: AM6441
Other Parts Discussed in Thread: AM6442

We've received 25 units of our 2nd rev PCA with the AM6442 SR2.0 installed, including the various features recommended in the TI app note regarding how to make a PCB compatible with both SR1 and SR2.

We're using the µSD boot mode to boot a "production test" SD card in Linux, which programs the onboard eMMC bootfs and rootfs with Linux.  Once programmed we move a jumper to change to eMMC boot mode, reboot, and perform production test before QA and ship.

This process worked on our first 25 (SR1.0) units. 

While watching the serial console we saw no activity when first attempting to boot our newly arrived SR2.0 units. 

I discovered in the various TI migration app notes the changes that are necessary in the boot files via the new SDK. 

Once we made a new µSD bootfs using those newly generated files the SD card did indeed boot, and the programming of the eMMC seems to have proceeded correctly.

However, when booting from the eMMC the symptom "no output on serial console" is back.  We updated the bootfs files that get programmed into /dev/mmcblk0boot0 using the same technique as worked for the SD card bootfs to no avail: we can't get the eMMC to boot; there is no output on the serial console.

  • I'm wondering if there are any diagnostics plausibly useful at the JTAG this early in the boot process... can anyone provide a link to some documentation or tutorial on using the Sitara JTAG for diagnostics?

  • We're now using ti-processor-sdk-linux-am64xx-evm-08.06.00.42

  • The tiboot3.bin file in the boot partition of the emmc for the SR2, can you double check it is the HS-FS version (tiboot3-am64-hs-evm.bin in the prebuilt SDK images).

      Pekka

  • Yes,we're using the updated tiboot3.bin.  However, after the script writes the file to the eMMC bootfs an attempt to verify it by reading it out with dd does not produce the same as what was written.  So we think the write itself is writing only a little valid data followed by garbage.  That is, we don't think the script succeeds in writing bootfs correctly  ... but it is possible that the *readback* is what is failing (both at boot time and during diagnostic dd).
    We've tried this on two SR2.0 PCAs so far, same results.

  • Hi John,

    Once we made a new µSD bootfs using those newly generated files the SD card did indeed boot, and the programming of the eMMC seems to have proceeded correctly.

    -- To double check, you booted SR2 devices using SD card boot. The board boots fine to U-boot prompt?

    Yes,we're using the updated tiboot3.bin.

    -- SR2 devices are HS-FS devices. By updated tiboot3.bin are you verifying it is the HS-FS 'tiboot3.bin'?


    Lastly, how are you flashing the binaries to eMMC device? The following instructions should work: 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 on both SR1 and SR2 devices.

    At U-boot do:

    => mmc partconf 0 1 1 1
    => mmc bootbus 0 2 0 0

    Then change boot mode switch setting to: SW2: 11010010 SW3: 00000000 and reboot.

    ~ Judith

  • All of the setup for the emmc is done on a running Linux image and not through the u-boot shell.

    The files are copied with dd commands, and the mmc commands are used for setting up the other bits.

    echo 0 > /sys/block/mmcblk0boot0/force_ro
    dd if=/opt/tiboot3.bin of=/dev/mmcblk0boot0 seek=0
    dd if=/opt/tispl.bin of=/dev/mmcblk0boot0 seek=1024
    dd if=/opt/u-boot.img of=/dev/mmcblk0boot0 seek=5120
    mmc hwreset enable /dev/mmcblk0
    mmc bootpart enable 1 1 /dev/mmcblk0
    mmc bootbus set single_backward x1 x8 /dev/mmcblk0
    I have read back the emmc after reboot and looked at the xxd output to verify that we are writing to the emmc and it appears to be working.
    The iboot3.bin is the tiboot3-am64x_sr2-hs-fs-evm.bin

    I am able to boot an SD card into the u-boot shell and then tell it to boot the emmc by setting the mmcdev and bootpart environment variables, but when I set the jumper to boot from EMMC I get zero output on the serial console.

    The u-boot images being flashed to the emmc are built such that they will boot from the emmc by default, and the u-boot images on the SD card are built so they will boot from the SD card by default.

    This method worked reliably with the SR1 hardware, and I am able to boot the SR2 hardware with the SD card after moving up to the new SDK. It is attempting to boot from the emmc that produces no output.
    -- Jay
  • Hello Jay,

    According to the eMMC layout found 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, try using 0x800 and 0x1800. Example below:

    am64xx-evm login: root
    root@am64xx-evm:~# echo 0 > /sys/block/mmcblk0boot0/force_ro
    root@am64xx-evm:~# mount /dev/mmcblk1p1 sdboot
    root@am64xx-evm:~# ls
    sdboot
    root@am64xx-evm:~# cd sdboot/
    root@am64xx-evm:~/sdboot# ls
    tiboot3-am64x_sr2-hs-evm.bin  tiboot3-gp.bin  tiboot3.bin  tispl.bin  u-boot.img  uEnv.txt  uboot.env
    root@am64xx-evm:~/sdboot# dd if=tiboot3.bin of=/dev/mmcblk0boot0 seek=0
    1127+1 records in
    1127+1 records out
    577307 bytes (577 kB, 564 KiB) copied, 0.0553009 s, 10.4 MB/s
    root@am64xx-evm:~/sdboot# dd if=tispl.bin of=/dev/mmcblk0boot0 seek=2048 
    1762+1 records in
    1762+1 records out
    902455 bytes (902 kB, 881 KiB) copied, 0.0764144 s, 11.8 MB/s
    root@am64xx-evm:~/sdboot# dd if=u-boot.img of=/dev/mmcblk0boot0 seek=6144
    2210+1 records in
    2210+1 records out
    1131919 bytes (1.1 MB, 1.1 MiB) copied, 0.100995 s, 11.2 MB/s
    
    root@am64xx-evm:~/sdboot# echo 1 > /sys/block/mmcblk0boot0/force_ro
    root@am64xx-evm:~/sdboot# �
    U-Boot SPL 2021.01-g2ee8efd654 (Feb 23 2023 - 22:21:41 +0000)
    Resetting on cold boot to workaround ErrataID:i2331
    resetting ...
    
    U-Boot SPL 2021.01-g2ee8efd654 (Feb 23 2023 - 22:21:41 +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
    Authentication passed
    Authentication passed
    Starting ATF on ARM64 core...
    
    NOTICE:  BL31: v2.8(release):v2.8-226-g2fcd408bb3-dirty
    NOTICE:  BL31: Built : 15:41:21, Jan 24 2023
    I/TC: 
    I/TC: OP-TEE version: 3.20.0 (gcc version 9.2.1 20191025 (GNU Toolchain for the A-profile Architecture 9.2-2019.12 (arm-9.10))) #1 Tue Feb 21 18:20:15 UTC 2023 aarch64
    I/TC: WARNING: This OP-TEE configuration might be insecure!
    I/TC: WARNING: Please check https://optee.readthedocs.io/en/latest/architecture/porting_guidelines.html
    I/TC: Primary CPU initializing
    I/TC: SYSFW ABI: 3.1 (firmware rev 0x0008 '8.6.4--v08.06.04 (Chill Capybar')
    I/TC: HUK Initialized
    I/TC: Activated SA2UL device
    I/TC: Enabled firewalls for SA2UL TRNG device
    I/TC: SA2UL TRNG initialized
    I/TC: SA2UL Drivers initialized
    I/TC: Primary CPU switching to normal world boot
    
    U-Boot SPL 2021.01-g2ee8efd654 (Feb 23 2023 - 22:21:31 +0000)
    SYSFW ABI: 3.1 (firmware rev 0x0008 '8.6.4--v08.06.04 (Chill Capybar')
    Trying to boot from MMC2
    Authentication passed
    Authentication passed
    
    
    U-Boot 2021.01-g2ee8efd654 (Feb 23 2023 - 22:21:31 +0000)
    
    SoC:   AM64X SR2.0 HS-FS
    Model: Texas Instruments AM642 EVM
    Board: AM64-EVM rev C
    DRAM:  2 GiB
    NAND:  0 MiB
    MMC:   mmc@fa10000: 0, mmc@fa00000: 1
    Loading Environment from FAT... OK
    In:    serial@2800000
    Out:   serial@2800000
    Err:   serial@2800000
    Unidentified board claims AM64-EVM in eeprom header
    Net:   eth0: ethernet@8000000port@1
    Hit any key to stop autoboot:  0 
    => 
    => 
    => mmc partconf 0 1 1 1
    => mmc bootbus 0 2 0 0
    => �      
    U-Boot SPL 2021.01-g2ee8efd654 (Feb 23 2023 - 22:21:41 +0000)
    Resetting on cold boot to workaround ErrataID:i2331
    resetting ...
    
    U-Boot SPL 2021.01-g2ee8efd654 (Feb 23 2023 - 22:21:41 +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
    Authentication passed
    Authentication passed
    init_env from device 9 not supported!
    Starting ATF on ARM64 core...
    
    NOTICE:  BL31: v2.8(release):v2.8-226-g2fcd408bb3-dirty
    NOTICE:  BL31: Built : 15:41:21, Jan 24 2023
    I/TC: 
    I/TC: OP-TEE version: 3.20.0 (gcc version 9.2.1 20191025 (GNU Toolchain for the A-profile Architecture 9.2-2019.12 (arm-9.10))) #1 Tue Feb 21 18:20:15 UTC 2023 aarch64
    I/TC: WARNING: This OP-TEE configuration might be insecure!
    I/TC: WARNING: Please check https://optee.readthedocs.io/en/latest/architecture/porting_guidelines.html
    I/TC: Primary CPU initializing
    I/TC: SYSFW ABI: 3.1 (firmware rev 0x0008 '8.6.4--v08.06.04 (Chill Capybar')
    I/TC: HUK Initialized
    I/TC: Activated SA2UL device
    I/TC: Enabled firewalls for SA2UL TRNG device
    I/TC: SA2UL TRNG initialized
    I/TC: SA2UL Drivers initialized
    I/TC: Primary CPU switching to normal world boot

    ~ Judith

  • Judith,

    Flashing to the suggested addresses worked. I am now able to boot the board from emmc without an SD card inserted. Thank you for the help.

    Regards,

    -- Jay