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.

SK-AM62-LP: Request for Faster eMMC Image Transfer Method

Part Number: SK-AM62-LP
Other Parts Discussed in Thread: AM625

Hi Team,

We recently used dfu-util on the SK-AM62-LP to transfer an image to eMMC, but it currently takes approximately 10 minutes to transfer a 2 GB file.

Could you please suggest an easier and faster method for transferring images to eMMC — ideally optimized for production use and requiring minimal hardware setup?

Thanks and regards,
Gopal Sharma

  • Hi Meet,

    are we follow all dfu image prepartion method for snagboot like first prepare image for dfu util then second image for emmc and am62x_r5_usbmsc.config is use or am62x_a53_usbdfu.config is use for snagboot build image in Rules.make file changes. if any detailed method is available for AM62 snagboot or snagflash so please share.

    Regards,
    Gopal Sharma

  • Hi Gopal,

    So, the link shared by me above almost covers all the steps:

    1. You have to build the recovery/boot binaries using the following change in the Rules.make file:

    2. For the flashing binaries, you can use the binaries you intend to flash to eMMC, this can also be your prebuilt binaries. 

    Best Regards,

    Meet.

  • Hi Meet,

    We made changes to Rules.make 



    Then build the U-Boot image
    $ make u-boot_clean
    $ make u-boot
    $ make u-boot_stage

    After that, we copied the below files into a separate directory


    When we ran snagflash, the following error was generated

     snagflash -P dfu -p 0451:6165 -D 2:tiboot3.bin
    2025-11-11 12:11:15,399 [INFO] Running snagflash using protocol dfu
    2025-11-11 12:11:15,408 [INFO] Downloading tiboot3.bin to altsetting 2...
    2025-11-11 12:11:15,408 [INFO] Found DFU Functional descriptor: wTransferSize = 512
    Traceback (most recent call last):
      File "/home/gopal/.local/bin/snagflash", line 8, in <module>
        sys.exit(cli())
      File "/home/gopal/.local/lib/python3.10/site-packages/snagflash/cli.py", line 159, in cli
        dfu_cli(args)
      File "/home/gopal/.local/lib/python3.10/site-packages/snagflash/dfu.py", line 76, in dfu_cli
        dfu_download(dev, altsetting, path)
      File "/home/gopal/.local/lib/python3.10/site-packages/snagflash/dfu.py", line 50, in dfu_download
        dfu_cmd.download_and_run(blob, altsetting, 0, size, show_progress=True)
      File "/home/gopal/.local/lib/python3.10/site-packages/snagrecover/protocols/dfu.py", line 136, in download_and_run
        self.set_partition(partid)
      File "/home/gopal/.local/lib/python3.10/site-packages/snagrecover/protocols/dfu.py", line 205, in set_partition
        self.dev.set_interface_altsetting(interface=0, alternate_setting=partid)
      File "/home/gopal/.local/lib/python3.10/site-packages/usb/core.py", line 962, in set_interface_altsetting
        self._ctx.managed_set_interface(self, interface, alternate_setting)
      File "/home/gopal/.local/lib/python3.10/site-packages/usb/core.py", line 113, in wrapper
        return f(self, *args, **kwargs)
      File "/home/gopal/.local/lib/python3.10/site-packages/usb/core.py", line 212, in managed_set_interface
        raise ValueError('No matching interface (' + str(intf) + ',' + str(alt) + ')')
    ValueError: No matching interface (0,2)
    


    The board is currently in DFU (Device Firmware Update) mode.

    but After flashing tiboot3, tispl, and u-boot.img using dfu-util, the board reaches the U-Boot prompt. At that stage, we expect to flash the remaining images into eMMC using snagflash. Are these the correct steps?

    Also, how do we use Fastboot? We do not see the fastboot command available in the U-Boot prompt. Do we need to first flash the DFU images, then boot with a U-Boot image built using am6x_a53_snagfactory.config, flash that into eMMC, and only then the Fastboot command will appear for transferring the root filesystem?

    snagrecover is available for sk-am62-lp?


    Regards,
    gopal Sharma

  • Hi Gopal,

    The concerned expert is out of office. Please expect a delay in response.

    Thanking you

    Yashraj

  • Hi Gopal,

    The bootloader binaries that you built after making changes to Rules.make are used as recovery binaries, you first need to boot to u-boot via dfu-util by using the snagrecover command:

    Once you are in the u-boot, you can flash the individual binaries using snagflash instead of using dfu-util like it's done here: https://software-dl.ti.com/processor-sdk-linux/esd/AM62X/11_01_05_03/exports/docs/linux/Foundational_Components/U-Boot/UG-Memory-K3.html#flashing-an-mmc-device-using-usb-dfu 

    You can directly use the Snagfactory GUI for this instead of going with the command line, a reference config file (emmc.yaml) is already provided in the guide shared above by me, you can just modify it to make it work for am625.

    snagrecover is available for sk-am62-lp?

    Yes, you just have to use the binaries built using lpsk boards's configuration.

    Best Regards,

    Meet.

  • Hi Meet,

    We are currently testing boot through command-line flashing.
    U-Boot is now entering fastboot mode automatically after we first program the bootloader images using dfu-util.
    After exiting fastboot, the fastboot command is also available inside U-Boot, so the USB interface is working correctly.

    On the host side, we ran:

    snagflash -P fastboot -p 0451:6165 -f download:tiboot3.bin -f flash:0:1
    

    The download succeeded.

    Now we need to understand where the other images (tispl.bin, u-boot.img, rootfs, etc.) should go.
    Do we need to create additional eMMC partitions for fastboot flashing?

    Please advise.

    Regards,
    Gopal Sharma
     

  • Hi Gopal,

    It seems that you will have to make a vfat image containing all these 3 binaries (tiboot3.bin, tispl.bin, u-boot.img) and then download it using the command you shared. 

    Instead of this you can explore extended fastboot mode for u-boot: https://github.com/bootlin/snagboot/blob/main/docs/snagflash.md#extended-fastboot-mode-for-u-boot 

    You can also try to use the GUI tool instead of using this CLI interface, you will also need a YAML configuration file for flashing when using GUI, a reference yaml file for flashing to eMMC is already provided in the documentation: 

    https://software-dl.ti.com/processor-sdk-linux/esd/AM62X/11_01_05_03/exports/docs/linux/Foundational_Components/Tools/Flash_via_Fastboot.html#connections

    Best Regards,
    Meet.

  • Hi Meet,

    Thanks for your support.

    We are now able to flash images over USB using DFU and Snagflash without any issues. However, for configuring partconf and bootbus we still need to use the serial terminal, because the Fastboot OEM commands for these settings are failing.

    Fastboot does provide commands such as oem-partconf, but when we try to use them, they return an error. Below is the console log and the commands we executed.


    snagflash -P fastboot -p 0451:6165 -f oem-partconf:111

    Error:-

    The command below works correctly and prints the current partconf status on the console please see console logs.

    snagflash -P fastboot -p 0451:6165 -f oem-partconf:


    dwc3-generic-peripheral usb@31000000: request 00000000fde97b80 was not queued to ep1in-bulk
    Execute: mmc partconf 0 111 0
    mmc - MMC sub system
    
    Usage:
    mmc info - display info of the current MMC device
    mmc read addr blk# cnt
    mmc write addr blk# cnt
    mmc erase blk# cnt
    mmc erase partname
    mmc rescan [mode]
    mmc part - lists available partition on current mmc device
    mmc dev [dev] [part] [mode] - show or set current mmc device [partition] and set mode
      - the required speed mode is passed as the index from the following list
        [MMC_LEGACY, MMC_HS, SD_HS, MMC_HS_52, MMC_DDR_52, UHS_SDR12, UHS_SDR25,
        UHS_SDR50, UHS_DDR50, UHS_SDR104, MMC_HS_200, MMC_HS_400, MMC_HS_400_ES]
    mmc list - lists available devices
    mmc wp [PART] - power on write protect boot partitions
      arguments:
       PART - [0|1]
           : 0 - first boot partition, 1 - second boot partition
             if not assigned, write protect all boot partitions
    mmc hwpartition <USER> <GP> <MODE> - does hardware partitioning
      arguments (sizes in 512-byte blocks):
       USER - <user> <enh> <start> <cnt> <wrrel> <{on|off}>
            : sets user data area attributes
       GP - <{gp1|gp2|gp3|gp4}> <cnt> <enh> <wrrel> <{on|off}>
            : general purpose partition
       MODE - <{check|set|complete}>
            : mode, complete set partitioning completed
      WARNING: Partitioning is a write-once setting once it is set to complete.
      Power cycling is required to initialize partitions after set to complete.
    mmc bootbus <dev> <boot_bus_width> <reset_boot_bus_width> <boot_mode>
     - Set the BOOT_BUS_WIDTH field of the specified device
    mmc bootpart-resize <dev> <boot part size MB> <RPMB part size MB>
     - Change sizes of boot and RPMB partitions of specified device
    mmc partconf <dev> [[varname] | [<boot_ack> <boot_partition> <partition_access>]]
     - Show or change the bits of the PARTITION_CONFIG field of the specified device
       If showing the bits, optionally store the boot_partition field into varname
    mmc rst-function <dev> <value>
     - Change the RST_n_FUNCTION field of the specified device
       WARNING: This is a write-once field and 0 / 1 / 2 are the only valid values.
    mmc setdsr <value> - set DSR register value
    
    dwc3-generic-peripheral usb@31000000: request 00000000fde97b80 was not queued to ep1in-bulk
    Execute: mmc partconf 0  0
    EXT_CSD[179], PARTITION_CONFIG:
    BOOT_ACK: 0x1
    BOOT_PARTITION_ENABLE: 0x1 (boot0)
    PARTITION_ACCESS: 0x0 (user)
    dwc3-generic-peripheral usb@31000000: request 00000000fde97b80 was not queued to ep1in-bulk
    

    Please help us understand why these Fastboot OEM commands are failing and how we can resolve the issue.
    If these commands work, we will no longer need to use the serial interface to send commands for flashing the image.

    Regards,
    Gopal Sharma

  • Hi Gopal,

    Please try the following command: 

    oem_run: mmc partconf 0 1 1 1
    oem_run: mmc bootbus 0 2 0 0

    Best Regards,

    Meet.