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.

TMDS64EVM: emmc boot fail

Part Number: TMDS64EVM


Dear TI support team,

I bought a TMDS64EVM board and booted it normally with tisdk-default-image on sdcard that is created by ti-processor-sdk-linux-am64xx-evm-09.00.00.03/bin/create-sdcard.sh.

And then I tried to boot it on emmc as follows:

  1) write the prebuilt images on sdcard into emmc

    $ cd /media/mmcblk1p1
    $ echo 0 > /sys/block/mmcblk0boot0/force_ro
    $ dd if=tiboot3-am64x_sr2-hs-fs-evm.bin of=/dev/mmcblk0boot0 seek=0
    $ dd if=tispl.bin of=/dev/mmcblk0boot0 seek=2048
    $ dd if=u-boot.img of=/dev/mmcblk0boot0 seek=6144

  2) change the boot mode switch to primary-emmc, backup-sdcard
 
    SW2[1:8] = 11010010, SW3[1:8] = 01101100

But I got the following error messages during booting:


  U-Boot SPL 2023.04-g24098ea90d (Jul 06 2023 - 12:59:40 +0000)
  Resetting on cold boot to workaround ErrataID:i2331
  Please resend tiboot3.bin in case of UART/DFU boot
  resetting ...

  U-Boot SPL 2023.04-g24098ea90d (Jul 06 2023 - 12:59:40 +0000)
  SYSFW ABI: 3.1 (firmware rev 0x0009 '9.0.5--v09.00.05 (Kool Koala)')
  SPL initial stack usage: 13376 bytes
  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 tispl.bin, err - -1
  SPL: failed to boot from all boot devices
  ### ERROR ### Please RESET the board ###


Would you help me to solve it please?

Best regards,
Hugh Chang

  • Hi Hugh,

    This is a newly discovered issue with eMMC boot in 9.0 SDK. It is an ongoing debug. Will update here once we have fix. Or if you wish to change to MMCSD boot (eMMC Boot using UDA) in FS mode, here is a reference log:

    root@am64xx-evm:~# fdisk /dev/mmcblk0
    
    Welcome to fdisk (util-linux 2.37.4).
    Changes will remain in memory only, until you decide to write them.
    Be careful before using the write command.
    
    
    Command (m for help): o
    Created a new DOS disklabel with disk identifier 0x2f173067.
    
    Command (m for help): n
    Partition type
       p   primary (0 primary, 0 extended, 4 free)
       e   extended (container for logical partitions)
    Select (default p): 
    
    Using default response p.
    Partition number (1-4, default 1): 
    First sector (2048-31080447, default 2048): 
    Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-31080447, default 31080447): +400M
    
    Created a new partition 1 of type 'Linux' and of size 400 MiB.
    Partition #1 contains a vfat signature.
    
    Do you want to remove the signature? [Y]es/[N]o: y
    
    The signature will be removed by a write command.
    
    Command (m for help): t
    Selected partition 1
    Hex code or alias (type L to list all): c
    Changed type of partition 'Linux' to 'W95 FAT32 (LBA)'.
    
    Command (m for help): a
    Selected partition 1
    The bootable flag on partition 1 is enabled now.
    
    Command (m for help): w
    The partition table has been altered.
    Calling ioctl() to re-read partition table.[  418.135281]  mmcblk0: p1
    
    Syncing disks.
    
    root@am64xx-evm:~# fdisk /dev/mmcblk0
    
    Welcome to fdisk (util-linux 2.37.4).
    Changes will remain in memory only, until you decide to write them.
    Be careful before using the write command.
    
    
    Command (m for help): n
    Partition type
       p   primary (1 primary, 0 extended, 3 free)
       e   extended (container for logical partitions)
    Select (default p): 
    
    Using default response p.
    Partition number (2-4, default 2): 
    First sector (821248-31080447, default 821248): 
    Last sector, +/-sectors or +/-size{K,M,G,T,P} (821248-31080447, default 31080447): 
    
    Created a new partition 2 of type 'Linux' and of size 14.4 GiB.
    
    Command (m for help): w
    The partition table has been altered.
    Calling ioctl() to re-read partition table.
    [  431.351716]  mmcblk0: p1 p2
    Syncing disks.
    
    root@am64xx-evm:~# [  431.364987]  mmcblk0: p1 p2
    
    root@am64xx-evm:~# sudo mkfs -t vfat /dev/mmcblk0p1
    mkfs.fat 4.2 (2021-01-31)
    root@am64xx-evm:~# mount /dev/mmcblk0p1 emmc
    root@am64xx-evm:~# ls
    emmc  sdboot
    root@am64xx-evm:~# cd emmc
    root@am64xx-evm:~/emmc# ls
    root@am64xx-evm:~/emmc# cp ../sdboot/original/tiboot3.bin ./
    root@am64xx-evm:~/emmc# cp ../sdboot/original/tispl.bin ./
    root@am64xx-evm:~/emmc# cp ../sdboot/original/u-boot.img ./
    root@am64xx-evm:~/emmc# ls
    tiboot3.bin  tispl.bin	u-boot.img
    root@am64xx-evm:~/emmc# cd ../
    root@am64xx-evm:~# umount emmc/
    root@am64xx-evm:~# umount sdboot/
    root@am64xx-evm:~# lsblk
    NAME         MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS
    mtdblock0     31:0    0    1M  0 disk 
    mtdblock1     31:1    0    2M  0 disk 
    mtdblock2     31:2    0    4M  0 disk 
    mtdblock3     31:3    0  256K  0 disk 
    mtdblock4     31:4    0  256K  0 disk 
    mtdblock5     31:5    0 55.8M  0 disk 
    mtdblock6     31:6    0  256K  0 disk 
    mmcblk1      179:0    0 14.6G  0 disk 
    |-mmcblk1p1  179:1    0  128M  0 part /run/media/boot-mmcblk1p1
    |                                     /media/mmcblk1p1
    `-mmcblk1p2  179:2    0 14.4G  0 part /
    mmcblk0      179:32   0 14.8G  0 disk 
    |-mmcblk0p1  179:33   0  400M  0 part 
    `-mmcblk0p2  179:34   0 14.4G  0 part 
    mmcblk0boot0 179:64   0 31.5M  1 disk 
    mmcblk0boot1 179:96   0 31.5M  1 disk 
    root@am64xx-evm:~# 
    U-Boot SPL 2023.04-00001-g4446269d4e-dirty (Aug 16 2023 - 10:41:47 -0500)
    Resetting on cold boot to workaround ErrataID:i2331
    Please resend tiboot3.bin in case of UART/DFU boot
    resetting ...
    
    U-Boot SPL 2023.04-00001-g4446269d4e-dirty (Aug 16 2023 - 10:41:47 -0500)
    SYSFW ABI: 3.1 (firmware rev 0x0009 '9.0.5--v09.00.05 (Kool Koala)')
    SPL initial stack usage: 13376 bytes
    Trying to boot from MMC2
    Authentication passed
    Authentication passed
    Authentication passed
    Authentication passed
    Loading Environment from MMC... *** Warning - No MMC card found, using default environment
    
    Starting ATF on ARM64 core...
    
    NOTICE:  BL31: v2.8(release):v2.8-226-g2fcd408bb3-dirty
    NOTICE:  BL31: Built : 00:42:57, Jan 13 2023
    I/TC: 
    I/TC: OP-TEE version: 3.20.0 (gcc version 11.3.0 (GCC)) #1 Fri Jan 20 15:42:54 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 0x0009 '9.0.5--v09.00.05 (Kool Koala)')
    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 2023.04-00001-g4446269d4e-dirty (Aug 16 2023 - 10:42:02 -0500)
    SYSFW ABI: 3.1 (firmware rev 0x0009 '9.0.5--v09.00.05 (Kool Koala)')
    Trying to boot from MMC2
    Authentication passed
    Authentication passed
    
    
    U-Boot 2023.04-00001-g4446269d4e-dirty (Aug 16 2023 - 10:42:02 -0500)
    
    SoC:   AM64X SR2.0 HS-FS
    Model: Texas Instruments AM642 EVM
    Board: AM64-EVM rev C
    DRAM:  2 GiB
    Core:  59 devices, 29 uclasses, devicetree: separate
    MMC:   mmc@fa10000: 0, mmc@fa00000: 1
    Loading Environment from MMC... *** Warning - bad CRC, using default environment
    
    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 7 1
    => mmc bootbus 0 2 0 0
    Set to BOOT_BUS_WIDTH = 0x2, RESET = 0x0, BOOT_MODE = 0x0
    => 
    U-Boot SPL 2023.04-g24098ea90d (Jul 06 2023 - 12:59:40 +0000)
    Resetting on cold boot to workaround ErrataID:i2331
    Please resend tiboot3.bin in case of UART/DFU boot
    resetting ...
    
    U-Boot SPL 2023.04-g24098ea90d (Jul 06 2023 - 12:59:40 +0000)
    SYSFW ABI: 3.1 (firmware rev 0x0009 '9.0.5--v09.00.05 (Kool Koala)')
    SPL initial stack usage: 13376 bytes
    Trying to boot from MMC1
    mmc_load_image_raw_sector: mmc block read error
    Authentication passed
    Authentication passed
    Authentication passed
    Authentication passed
    Loading Environment from MMC... *** Warning - bad CRC, using default environment
    
    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 : 00:42:57, Jan 13 2023
    I/TC: 
    I/TC: OP-TEE version: 3.20.0 (gcc version 11.3.0 (GCC)) #1 Fri Jan 20 15:42:54 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 0x0009 '9.0.5--v09.00.05 (Kool Koala)')
    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 2023.04-g24098ea90d (Jul 06 2023 - 12:59:40 +0000)
    SYSFW ABI: 3.1 (firmware rev 0x0009 '9.0.5--v09.00.05 (Kool Koala)')
    Trying to boot from MMC1
    mmc_load_image_raw_sector: mmc block read error
    Authentication passed
    Authentication passed
    
    
    U-Boot 2023.04-g24098ea90d (Jul 06 2023 - 12:59:40 +0000)
    
    SoC:   AM64X SR2.0 HS-FS
    Model: Texas Instruments AM642 EVM
    Board: AM64-EVM rev C
    DRAM:  2 GiB
    Core:  59 devices, 29 uclasses, devicetree: separate
    MMC:   mmc@fa10000: 0, mmc@fa00000: 1
    Loading Environment from MMC... *** Warning - bad CRC, using default environment
    
    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 
    => 
    => 
    


    Boot Mode SW setting is: SW2:11000010 SW3:00000000

    ~ Judith

  • Hi Judith,

    Thank you very much for your fast and detailed reply.

    I'll test it and write the result soon.

    Best regards,

    Hugh Chang

  • Hi Hugh,

    No problem, let me know if it works.

    ~ Judith

  • Hi Judith,

    I'm sorry for my late reply. Now I can boot from emmc in fs mode and I write my test results below:

    - Boot Mode Pins
        * primary-sdcard/fs, backup-emmc/fs: sdcard ok, emmc not ok
            + GP EVM : SW2[1:8] = 11000010, SW3[1:8] = 01101000
        * primary-emmc/fs, backup-sdcard/fs: sdcard ok, emmc ok
            + GP EVM : SW2[1:8] = 11000010, SW3[1:8] = 00101100

        I tried to set sdcard as primary boot device and emmc as backup boot device, but it was not successful.

        The opposite was ok and I'm happy with primary-emmc and backup-sdcard setting.

    - Partition scheme
        * Master Boot Record (MBR) : ok
        * GUID Partition Table (GPT) : not ok for fs mode boot

        I tried to use GPT but I could not boot from it.

        I can boot from MBR and I'm happy with it.

    I made a ramdisk image and now it boots from emmc_fs to linux/tiny ramdisk image.

    Again, I greatly appreciate your help.

    Best regards,

    Hugh Chang