SK-AM62B-P1: Booting issue via USB_DFU

Part Number: SK-AM62B-P1

Tool/software:

Hello TI Expert,
I am flashing the bootloader via usb-dfu mode and then I have to go to the uboot prompt and create emmc partitions but the board is not booting. I use of the GPT support in U-Boot to write a GPT partition table to eMMC.

I have attached the logs please find it.

U-Boot SPL 2021.01 (Jul 14 2023 - 17:40:18 +0530)
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 DFU
###############################################DOWNLOAD ... OK
Ctrl+C to exit ...
Authentication passed
Authentication passed
Authentication passed
Authentication passed
Authentication passed
Loading Environment from MMC... MMC Device 0 not found
*** Warning - No MMC card found, using default environment
                                                                                                                      
init_env from device 10 not supported!                                                                                
Starting ATF on ARM64 core...                                                                                         
                                                                                                                      
NOTICE:  BL31: v2.8(release):v2.8-226-g2fcd408bb3-dirty                                                               
NOTICE:  BL31: Built : 05:06:58, Feb 24 2023

U-Boot SPL 2021.01 (Jul 14 2023 - 17:40:10 +0530)
SYSFW ABI: 3.1 (firmware rev 0x0008 '8.6.4--v08.06.04 (Chill Capybar')
Trying to boot from DFU
####DOWNLOAD ... OK
Ctrl+C to exit ...
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 (Jul 14 2023 - 17:40:10 +0530)

SoC:   AM62X SR1.0 HS-FS
Model: Texas Instruments AM625 SK
EEPROM not available at 0x50, trying to read at 0x51
Reading on-board EEPROM at 0x51 failed -1
DRAM:  2 GiB
MMC:   mmc@fa10000: 0, mmc@fa00000: 1, mmc@fa20000: 2
In:    serial@2800000
Out:   serial@2800000
Err:   serial@2800000
EEPROM not available at 0x50, trying to read at 0x51
Reading on-board EEPROM at 0x51 failed -1
Net:   Could not get PHY for ethernet@8000000port@1: addr 0
am65_cpsw_nuss_port ethernet@8000000port@1: phy_connect() failed
No ethernet found.

Hit any key to stop autoboot:  0 
#DOWNLOAD ... OK
Ctrl+C to exit ...
## Warning: Input data exceeds 1048576 bytes - truncated
## Info: input data size = 1048578 = 0x100002
##DOWNLOAD ... OK
Ctrl+C to exit ...
#####DOWNLOAD ... OK
Ctrl+C to exit ...
####DOWNLOAD ... OK
Ctrl+C to exit ...

suraj@suraj-HP-Laptop-15s-fr2xxx:/opt/ti-processor-sdk-linux-am62xx-evm-09.02.01.09/bin/DFU_flash$ sudo python3 dfu_flash.py -d am62xx-evm -t hsfs -c /opt/ti-processor-sdk-linux-am62xx-evm-09.02.01.09/bin/DFU_flash/bin/am62xx-evm/hsfs/flash-files.cfg
2025-01-08 13:38:34 INFO: Starting the flashing tool
2025-01-08 13:38:34 INFO: Validating the requirements before flashing...
2025-01-08 13:38:34 INFO: Validated the CLI arguments and the paths to the DFU boot binaries
2025-01-08 13:38:34 INFO: Parsing the flash configuration file {/opt/ti-processor-sdk-linux-am62xx-evm-09.02.01.09/bin/DFU_flash/bin/am62xx-evm/hsfs/flash-files.cfg}...
2025-01-08 13:38:34 INFO: Found 3 flash images
<<DFU_FLASH_CONF
----------------------- ------------------------------------------------- ------- -------- ----- ----------
                    Alt Path                                                 Size   Offset Media Attributes
----------------------- ------------------------------------------------- ------- -------- ----- ----------
tiboot3-am62x-hs-fs-evm /home/suraj/Downloads/tiboot3-am62x-hs-fs-evm.bin  295502      0x0 EMMC  raw,1,-   
                  tispl /home/suraj/Downloads/tispl.bin-am62xx-evm        1182907  0x80000 EMMC  raw,1,-   
      u-boot-am62xx-evm /home/suraj/Downloads/u-boot-am62xx-evm.img        968683 0x280000 EMMC  raw,1,-   
----------------------- ------------------------------------------------- ------- -------- ----- ----------
DFU_FLASH_CONF
2025-01-08 13:38:34 INFO: Found 4 boot images
<<DFU_BOOT_CONF
---------- ------------------------------------------------------------------------------------------------ ------
       Alt Path                                                                                               Size
---------- ------------------------------------------------------------------------------------------------ ------
bootloader /opt/ti-processor-sdk-linux-am62xx-evm-09.02.01.09/bin/DFU_flash/bin/am62xx-evm/hsfs/tiboot3.bin 333163
 tispl.bin /opt/ti-processor-sdk-linux-am62xx-evm-09.02.01.09/bin/DFU_flash/bin/am62xx-evm/hsfs/tispl.bin   960044
u-boot.img /opt/ti-processor-sdk-linux-am62xx-evm-09.02.01.09/bin/DFU_flash/bin/am62xx-evm/hsfs/u-boot.img  894876
  uEnv.txt /opt/ti-processor-sdk-linux-am62xx-evm-09.02.01.09/bin/DFU_flash/bin/am62xx-evm/hsfs/uEnv.txt       174
---------- ------------------------------------------------------------------------------------------------ ------
DFU_BOOT_CONF
2025-01-08 13:38:34 INFO: Number of USB DFU devices detected: 1
2025-01-08 13:38:34 INFO: Starting flashing for 1 identified devices
2025-01-08 13:38:34 INFO: Spawning 1 parallel processes
2025-01-08 13:38:35 INFO:             1-1 Sent! /opt/ti-processor-sdk-linux-am62xx-evm-09.02.01.09/bin/DFU_flash/bin/am62xx-evm/hsfs/tiboot3.bin
2025-01-08 13:38:38 INFO:             1-1 Sent! /opt/ti-processor-sdk-linux-am62xx-evm-09.02.01.09/bin/DFU_flash/bin/am62xx-evm/hsfs/tispl.bin
2025-01-08 13:38:42 INFO:             1-1 Sent! /opt/ti-processor-sdk-linux-am62xx-evm-09.02.01.09/bin/DFU_flash/bin/am62xx-evm/hsfs/u-boot.img
2025-01-08 13:38:47 INFO:             1-1 Sent! /opt/ti-processor-sdk-linux-am62xx-evm-09.02.01.09/bin/DFU_flash/bin/am62xx-evm/hsfs/uEnv.txt
2025-01-08 13:38:49 INFO:             1-1 Sent! /home/suraj/Downloads/tiboot3-am62x-hs-fs-evm.bin
2025-01-08 13:38:50 INFO:             1-1 Sent! /home/suraj/Downloads/tispl.bin-am62xx-evm
2025-01-08 13:38:51 INFO:             1-1 Sent! /home/suraj/Downloads/u-boot-am62xx-evm.img
2025-01-08 13:38:51 INFO:             1-1 Flashing Successful...
2025-01-08 13:38:51 INFO: Flashed 1 out of 1 identified devices successfully...
^C2025-01-08 13:40:06 INFO: Exiting!!!

I want to ask whether we can flash bootloaders through dfu? Or else I will have to flash through UART because my end goal is to complete the whole process using DFU like creating dual partition in EMMC and flashing dual rootfs in both partitions.

  • Hello TI Experts,

    The eMMC device typically ships without any partition table. We make use of the GPT support in U-Boot to write a GPT partition table to eMMC. In this case we need to use the uuidgen program on the host to create the UUIDs used for the disk and each partition.

    $ uuidgen
    ...first uuid...
    $ uuidgen
    ...second uuid...
    
    U-Boot # printenv partitions
    uuid_disk=${uuid_gpt_disk};name=rootfs,start=2MiB,size=-,uuid=${uuid_gpt_rootfs}
    U-Boot # setenv uuid_gpt_disk ...first uuid...
    U-Boot # setenv uuid_gpt_rootfs ...second uuid...
    U-Boot # gpt write mmc <device num> ${partitions} /* <device num> is device index obtained from mmc list for eMMC */
    

    A reset is required for the partition table to be visible.


    To create an EMMc partition, I will have to go to uboot and create a partition table, but I am not able to go to uboot, so how will it be possible to create a partition? Please tell me a solution.

    I have attached content of uEnv.txt, please have a look once.

    user_commands=setenv dfu_alt_info "tiboot3-am62x-hs-fs-evm raw 0x0 0x242 mmcpart 1;tispl raw 0x400 0x907 mmcpart 1;u-boot-am62xx-evm raw 0x1400 0x764 mmcpart 1";dfu 0 mmc 0;

  • Hi Suraj,

    You can follow this guide on DFU boot for AM62x here: https://dev.ti.com/tirex/explore/node?node=A__AeVbwnGEP1NObR9gnw1lhA__AM62-ACADEMY__uiYMDcq__LATEST

    Please note that to enable DFU support, you need to rebuild U-Boot using defconfig am62x_r5_usbdfu.config, this is mentioned in the guide as well, please try these steps and let me know if you still face the issue.


    Best Regards,

    Meet.

  • Also, if you are trying to boot from eMMC for the very first time then you also need to perform some additional eMMC Configuration steps mentioned here in 3.1.1.4.1.4. section: https://software-dl.ti.com/processor-sdk-linux/esd/AM62X/10_01_10_04/exports/docs/linux/Foundational_Components/U-Boot/UG-Memory-K3.html#emmc-boot-configuration

    Please make sure you are following these as well if you are booting for the first time.

    Best Regards,

    Meet.

  • Hello Meet,

    My end goal is to create multiple partitions in emmc and flash linux image via dfu in the respective partition of emmc.
    so is everything possible through dfu instead of sd card?

    Task 1:-
    To boot from any eMMC, the master (ROM) will require some configuration which can be set using the mmc bootbus and mmc partconf commands.

    Boot from boot0 HW partition of eMMC:

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

    Task 2:-
    We make use of the GPT support in U-Boot to write a GPT partition table to eMMC.
    U-Boot # printenv partitions
    uuid_disk=${uuid_gpt_disk};name=rootfs,start=2MiB,size=-,uuid=${uuid_gpt_rootfs}
    U-Boot # setenv uuid_gpt_disk ...first uuid...
    U-Boot # setenv uuid_gpt_rootfs ...second uuid...
    U-Boot # gpt write mmc <device num> ${partitions} /* <device num> is device index obtained from mmc list for eMMC 
    Because to create a partition table I will have to go to uboot prompt and create a gpt partition table, 
    so for that I will first have to flash the bootloader via dfu flash configuration files.
    I am using TI processor SDK version 09.02.01.09.
    Can i do both the tasks given above through dfu boot mode instead of sd card?
    Because the new board has nothing so need to do from the scratch.

    Regards,
    Suraj
  • Hi Suraj,

    Yes, It is possible to boot u-boot just using the DFU. Even in the logs that you attached in the first description, you can see the flashing was successful, so your procedure is correct. You can see it says Ctrl+C to exit, so once you press Ctrl+C you will see the u-boot prompt, after that you can do all the settings required for eMMC from the u-boot prompt as you mentioned in the previous response.

    Best Regards,

    Meet.

  • Hello Meet,

    Thanks, it is working. Now I want to ask one thing. This is happening for single rootfs but if I want to flash multiple rootfs then I will have to allocate multiple partitions in emmc for that.

    So I am allocating space through gpt tool but while writing in emmc it is showing gpt error so please check whether the syntax or the partitions variable format is not correct.

    => printenv partitions
    partitions=uuid_disk=6f131349-ae01-4409-8b86-e5256c965aba
    => setenv part1 name=rootfs_1,start=2048,size=2095105,uuid=eb94bf6b-6865-4a8c-9fc2-45c1be45eda1
    => setenv part2 name=rootfs_2,start=2099200,size=29358081,uuid=5b247693-4f9b-40e2-88d4-d455664b5b55
    => setenv part3 name=data,start=31459328,size=30701568,uuid=91ebba34-f04d-4ab5-9b86-21a7d6f6902a
    => setenv partitions "uuid_disk=6f131349-ae01-4409-8b86-e5256c965aba;${part1};${part2};${part3};"
    => printenv partitions
    partitions=uuid_disk=6f131349-ae01-4409-8b86-e5256c965aba;name=rootfs_1,start=2048,size=2095105,uuid=eb94bf6b-6865-4a8c-9fc2-45c1be45eda1;name=rootfs_2,start=2099200,size=29358081,uuid=5b247693;
    => gpt write mmc 0 ${partitions}
    Writing GPT: error!
    => mmc dev 0
    switch to partitions #0, OK
    mmc0(part 0) is current device
    => mmc rescan
    => mmc info
    Device: mmc@fa10000
    Manufacturer ID: 13
    OEM: 4e
    Name: G1M15L 
    Bus Speed: 200000000
    Mode: HS200 (200MHz)
    Rd Block Len: 512
    MMC version 5.1
    High Capacity: Yes
    Capacity: 29.6 GiB
    Bus Width: 8-bit
    Erase Group Size: 512 KiB
    HC WP Group Size: 8 MiB
    User Capacity: 29.6 GiB WRREL
    Boot Capacity: 31.5 MiB ENH
    RPMB Capacity: 4 MiB ENH
    Boot area 0 is not write protected
    Boot area 1 is not write protected
    => gpt verify mmc 0
    No partition list provided - only basic check
    Verify GPT: error!
    => printenv partitions
    partitions=uuid_disk=6f131349-ae01-4409-8b86-e5256c965aba;name=rootfs_1,start=2048,size=2095105,uuid=eb94bf6b-6865-4a8c-9fc2-45c1be45eda1;name=rootfs_2,start=2099200,size=29358081,uuid=5b247693;
    => printenv partitions
    partitions=uuid_disk=6f131349-ae01-4409-8b86-e5256c965aba;name=rootfs_1,start=2048,size=2095105,uuid=eb94bf6b-6865-4a8c-9fc2-45c1be45eda1;name=rootfs_2,start=2099200,size=29358081,uuid=5b247693;
    => gpt write mmc 0 ${partitions}
    Writing GPT: error!
    

    Please find attached log, and my end goal is to create as given below:

    root@am62xx-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.
    
    Device does not contain a recognized partition table.
    Created a new DOS disklabel with disk identifier 0x6dfd00a0.
    
    
    Command (m for help): p
    Disk /dev/mmcblk0: 29.64 GiB, 31826378752 bytes, 62160896 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disklabel type: dos
    Disk identifier: 0x2dc2dfb8
    
    Device         Boot    Start      End  Sectors  Size Id Type
    /dev/mmcblk0p1          2048  2097152  2095105 1023M 83 Linux
    /dev/mmcblk0p2       2099200 31457280 29358081   14G 83 Linux
    /dev/mmcblk0p3      31459328 62160895 30701568 14.6G 83 Linux

    Possible Issues:-

    1. The partitions variable is not correctly formatted or recognized.
    2. The GPT structure on the MMC device is corrupted or not properly initialized.
    3. The MMC device is not accessible or writable.

    Regards,

    Suraj

  • Hi Suraj,

    I will test this on my EVM and get back to you as soon as I have an update.

    Best Regards,

    Meet.

  • Hi Meet,

    Thank you for the quick response. Please let me know how it goes on your EVM.

    Boot from boot0 HW partition of eMMC:

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

    And I want to know one more thing, if I have a completely new board, can I configure the boot ROM directly via DFU?

    Regards,

    Suraj

  • Hi Suraj,

    It is not possible to configure boot ROM via DFU or any other means. It is possible to configure the emmc for the first time boot via DFU as discussed previously but not the boot ROM.

    Regards,

    Meet.

  • For creating multiple GPT partitions in eMMC, you can refer to this thread and try to follow the steps mentioned here: AM625: How to create partitions in TI AM625 for linux. - Processors forum - Processors - TI E2E support forums