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.

PROCESSOR-SDK-AM62X: Is it possible to configure TI AM62X U-BOOT to use dfu-util for eMMC loading?

Part Number: PROCESSOR-SDK-AM62X

Tool/software:

I have a USBDFU config for AM62X (am62x_evm_r5_usbdfu_defconfig and am62x_evm_a53_usbdfu_defconfig) with CONFIG_SET_DFU_ALT_INFO=y.  I load the unit using UART-BOOTMODE because eMMC is not set up yet.

When I try to switch u-boot to DFU Mode, I get the following message:

=> dfu 0 mmc 0
dynamic dfu_alt_info supported only for sf
"dfu_alt_info" env variable not defined!
exit not allowed from main input shell.

Is SF (serial flash), the only way to use DFU?  We were really banking on using DFU to load both u-boot and rootfs to eMMC using this bootmode due to NO space on board for microSD and no ethernet on board either.  We have WIFI designed onto board, but you know that's not a viable solution for loading either.

Other things I've tried to no avail are CCS to flash bootloader, it doesn't recognize the board.  JLink software doesn't seem to support AM62X.

Any assistance is much appreciated!

  • Hello,

    (am62x_evm_r5_usbdfu_defconfig and am62x_evm_a53_usbdfu_defconfig)

    You need to build using “am62x_evm_r5_usbdfu_defconfig” and  “am62x_evm_a53_defconfig”.

    Set the bootmode switches to USB peripheral mode: https://dev.ti.com/tirex/explore/node?node=AH0HH8Z-m5NoQXxu9-xB-A__XaWts8R__LATEST&search=am62

    A type-C USB connector is required to connect from port J13 on the EVM to the Linux host. Also connect power and open a UART console with the EVM.

    This FAQ has step by step procedure to flash eMMC using DFU: https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1127618/faq-sk-am62-how-to-flash-emmc-using-usb-dfu-on-am62x-sk-e2

    Let me know if you face any issues.

    Regards,
    Aparna

  • I am sorry, I should clarify that I am no longer on the EVM.  I am using a custom board.  As I mentioned in my original post here, I am using the usbdfu defconfig you mentioned for both A53 and R5.  We had the BOOTMODE set to USB peripheral, but it never came up as a DFU capable device.

  • I got nowhere with my custom board, so I went back to the AM62-SK Rev B board to see if I could get dfu-util going.  After fixing udev issues caused by Ubuntu black-listing TI DFU device and changing cable I was able to do the following:

    sudo dfu-util -l
    dfu-util 0.9

    Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
    Copyright 2010-2016 Tormod Volden and Stefan Schmidt
    This program is Free Software and has ABSOLUTELY NO WARRANTY
    Please report bugs to sourceforge.net/.../

    Found DFU: [0451:6165] ver=0200, devnum=40, cfg=1, intf=0, path="3-3", alt=1, name="SocId", serial="01.00.00.00"
    Found DFU: [0451:6165] ver=0200, devnum=40, cfg=1, intf=0, path="3-3", alt=0, name="bootloader", serial="01.00.00.00"

    Feeling good, I proceeded with programming.  I got an error and the entire process aborted.  See below output.  So then I looked into the u-boot patches called out in the link you sent on DFU usage.  I could not apply patch, and looked at TI-SDK-09. 02.01.10 u-boot source and could not find any references to where the patch would even apply.  What version of TI AM62X u-boot actually works with DFU?

    sudo dfu-util -R -a bootloader -D tiboot3.bin
    dfu-util 0.9

    Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
    Copyright 2010-2016 Tormod Volden and Stefan Schmidt
    This program is Free Software and has ABSOLUTELY NO WARRANTY
    Please report bugs to sourceforge.net/.../

    dfu-util: Invalid DFU suffix signature
    dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!
    Opening DFU capable USB device...
    ID 0451:6165
    Run-time device DFU version 0110
    Claiming USB DFU Interface...
    Setting Alternate Setting #0 ...
    Determining device status: state = dfuIDLE, status = 0
    dfuIDLE, continuing
    DFU mode device DFU version 0110
    Device returned transfer size 512
    Copying data from PC to DFU device
    Download [=========================] 100% 306042 bytes
    Download done.
    state(6) = dfuMANIFEST-SYNC, status(0) = No error condition is present
    dfu-util: unable to read DFU status after completion
    dfu-util: can't detach
    Resetting USB to switch back to runtime mode

  • Hi,

    You need to build using “am62x_evm_r5_usbdfu_defconfig” and  “am62x_evm_a53_defconfig”.

    Please notice carefully, you should use the USB defconfig for R5 and not A53.

    I could not apply patch,

    First step is to boot via DFU. Once you get the boot logs via DFU, we can proceed towards getting the U-boot binaries for eMMC ready, apply the patch if necessary.

    Could you open serial port logs on a different terminal using minicom or picocom and share the logs as you run the DFU commands.

    Regards,
    Aparna

  • As I told you before, I am using the designated defconfig you recommended for DFU.  I want to know what version of UBOOT I should be using.  I am getting a minimum amount of display on picocom session attached to ttyUSB0.  But I can only run 1 command and then it resets.

  • Here is output from host:

    sudo dfu-util -R -a bootloader -D tiboot3.bin
    [sudo] password for pholden:
    dfu-util 0.9

    Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
    Copyright 2010-2016 Tormod Volden and Stefan Schmidt
    This program is Free Software and has ABSOLUTELY NO WARRANTY
    Please report bugs to sourceforge.net/.../

    dfu-util: Invalid DFU suffix signature
    dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!
    Opening DFU capable USB device...
    ID 0451:6165
    Run-time device DFU version 0110
    Claiming USB DFU Interface...
    Setting Alternate Setting #0 ...
    Determining device status: state = dfuIDLE, status = 0
    dfuIDLE, continuing
    DFU mode device DFU version 0110
    Device returned transfer size 512
    Copying data from PC to DFU device
    Download [=========================] 100% 306042 bytes
    Download done.
    state(6) = dfuMANIFEST-SYNC, status(0) = No error condition is present
    dfu-util: unable to read DFU status after completion
    dfu-util: can't detach
    Resetting USB to switch back to runtime mode

    Here is output on picocom session:

    U-Boot SPL 2023.04-00759-g43791d945f-dirty (Jul 31 2024 - 17:32:51 -0400)
    SYSFW ABI: 3.1 (firmware rev 0x0009 '9.1.8--v09.01.08 (Kool Koala)')
    SPL initial stack usage: 13384 bytes
    Trying to boot from DFU
    No USB device found
    usb_gadget_initialize failed
    SPL: failed to boot from all boot devices
    ### ERROR ### Please RESET the board ###

    I have USB C cable between host and AM62-SK-REVB, connected to J13.  There is no USB-C connected to J11.  I have microUSB cable connected to J15.

    I am using "am62x_evm_a53_usbdfu_defconfig" and "am62x_evm_r5_usbdfu_defconfig".

  • Good news.  I caught a problem with the defconfig I was trying to use for A53.  After that, I built new u-boot images.  I was never able to get my evm board to boot, but I just got my custom board configured with DFU and it successfully loaded all 3 files (tiboot3.bin, tispl.bin, and u-boot.img).  I broke into u-boot prompt.  Then I run "setenv dfu_alt_info ${dfu_alt_info_emmc}", followed by "dfu 0 mmc 0" and I get the following error message:

    Couldn't find part #1 on mmc device #0
    DFU entities configuration failed!
    (partition table does not match dfu_alt_info?)
    dfu - Device Firmware Upgrade

    Usage:
    dfu <USB_controller> [<interface> <dev>] [list]
    - device firmware upgrade via <USB_controller>
    on device <dev>, attached to interface
    <interface>
    [list] - list available alt settings

    I run "mmc part" and get the following:

    ## Unknown partition table type 0

    Now what do I do to configure eMMc partitions?  I am able to set up gpt partitions, but have no idea how to set partition 0 to be FAT.

    Any advice?

  • Hi, you are getting the above error as you have not partitioned eMMC correctly. 

    Steps to partition eMMC from Uboot: 3.1.1.4. SD, eMMC and USB — Processor SDK AM62Ax Documentation

    Regards,
    Aparna

  • Thanks, I was able to get tiboot3.bin, tispl.bin, and u-boot.img copied to eMMC successfully.  Now I have a problem trying to load the rootfs.ext4 file:

    $ sudo dfu-util -c 1 -i 0 -a 1 -D rootfs.ext4
    dfu-util 0.9

    Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
    Copyright 2010-2016 Tormod Volden and Stefan Schmidt
    This program is Free Software and has ABSOLUTELY NO WARRANTY
    Please report bugs to sourceforge.net/.../

    dfu-util: File size is too big: Success

    I tried to find a solution to this file size problem, but really didn't see anything available.  Any suggestions?  Is duf-util, v 0.9 the latest version?

    Thanks!

  • Hello,

    You can try using the tiny filesystem. In the latest 9.2 SDK, the base image could be found in ti-processor-sdk-linux-am62xx-evm-09.02.01.09/filesystem/am62xx-evm directory.

    s duf-util, v 0.9 the latest version?

    Please switch to the latest SDK version for latest updates. Use the latest dfu-util v0.11 for flashing large files.

    Regards,
    Aparna

  • I am using Buildroot for building the rootfs.ext4, it's much smaller than the Yocto images.  I will try dfu-util v0.11 and let you know how I make out.

  • I manually built dfu-util V0.11.  I am now getting error "symbol lookup error: dfu-util: undefined symbol: libusb_set_option" when running "dfu-util -l".  My host is Ubuntu 22.04 and I have libusb-1.0.0-dev installed.  Has anyone else run into this problem?

  • I worked with the author of dfu-util, and we got V0.11 working on my PC.  Now I get the following error from u-boot itself when I try to download rootfs.ext4 to eMMC:

    => printenv dfu_alt_info_emmc
    dfu_alt_info_emmc=rawemmc raw 0 0x800000 mmcpart 1; rootfs part 0 1; tiboot3.bin.raw raw 0x0 0x400 mmcpart 1; tispl.bin.raw raw 0x400 0x1000 mmcpart 1; u-boot.img.raw raw 0x1400 0x2000 mmcpart 1; u-env.raw raw 0x3400 0x100 mmcpart 1; sysfw.itb.raw raw 0x3600 0x800 mmcpart 1
    => setenv dfu_alt_info ${dfu_alt_info_emmc}
    => dfu 0 mmc 0
    generic_phy_get_bulk : no phys property
    Request would exceed designated area!

    The file rootfs.ext4 is only 2GB, eMMC size on our board is 16GB.

  • Hello,

    Could you run the following command at U-boot prompt and share the output:
    => mmc part

    We can accordingly make changes to the partition that dfu is trying to access.

    Regards,
    Aparna

  • This is what I've got:

    => mmc part

    Partition Map for MMC device 0 -- Partition Type: EFI

    Part Start LBA End LBA Name
    Attributes
    Type GUID
    Partition GUID
    1 0x00000022 0x00000061 "boot"
    attrs: 0x0000000000000000
    type: ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
    guid: 5dd0385b-a688-4e0e-98a9-168fd913463a
    2 0x00000062 0x01d327de "rootfs"
    attrs: 0x0000000000000000
    type: ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
    guid: c965b8bf-f9a3-4576-adf8-6f8379bd7dd5
    =>

    => printenv dfu_alt_info_emmc
    dfu_alt_info_emmc=rawemmc raw 0 0x800000 mmcpart 1; rootfs part 0 1; tiboot3.bin.raw raw 0x0 0x400 mmcpart 1; tispl.bin.raw raw 0x400 0x1000 mmcpart 1; u-boot.img.raw raw 0x1400 0x2000 mmcpart 1; u-env.raw raw 0x3400 0x100 mmcpart 1; sysfw.itb.raw raw 0x3600 0x800 mmcpart 1
    =>

  • Hello,

    According to the above logs, your rootfs should be flashed into the 2nd partition of UDA.

    Could you make the following change in the dfu_alt_info_emmc variable:

    => editenv dfu_alt_info_emmc

    dfu_alt_info_emmc=rawemmc raw 0 0x800000 mmcpart 1; rootfs part 0 2; tiboot3.bin.raw raw 0x0 0x400 mmcpart 1; tispl.bin.raw raw 0x400 0x1000 mmcpart 1; u-boot.img.raw raw 0x1400 0x2000 mmcpart 1; u-env.raw raw 0x3400 0x100 mmcpart 1; sysfw.itb.raw raw 0x3600 0x800 mmcpart 1

    => setenv dfu_alt_info ${dfu_alt_info_emmc}
    => dfu 0 mmc 0

    Regards,
    Aparna

  • ################################DOWNLOAD ... OK
    Ctrl+C to exit ...

    Thanks, next problem is that it doesn't boot from eMMC.

    I entered the following commands in uboot:

    => mmc partconf 0 1 1 1
    => mmc bootbus 0 2 0 0
    Set to BOOT_BUS_WIDTH = 0x2, RESET = 0x0, BOOT_MODE = 0x0
    => setenv mmcdev 0
    => setenv bootpart 0
    => boot

    It tries to boot via TFTP, we have no Ethernet on this board.  Here is the output I'm getting (clearly u-boot doesn't like something):

    switch to partitions #0, OK
    mmc0(part 0) is current device
    SD/MMC found on device 0
    Can't set block device
    Can't set block device
    ## Error: "main_cpsw0_qsgmii_phyinit" not defined
    Can't set block device
    Can't set block device
    libfdt fdt_check_header(): FDT_ERR_BADMAGIC
    No FDT memory address configured. Please configure
    the FDT address via "fdt addr <address>" command.
    Aborting!
    Bad Linux ARM64 Image magic!
    switch to partitions #0, OK
    mmc0(part 0) is current device
    MMC: no card present
    starting USB...
    Bus usb@31100000: generic_phy_get_bulk : no phys property
    Register 1000840 NbrPorts 1
    Starting the controller
    USB XHCI 1.10
    scanning bus usb@31100000 for devices... 1 USB Device(s) found
    scanning usb for storage devices... 0 Storage Device(s) found

    Device 0: unknown device
    link up on port 1, speed 10, half duplex
    BOOTP broadcast 1
    BOOTP broadcast 2
    BOOTP broadcast 3
    BOOTP broadcast 4
    BOOTP broadcast 5
    BOOTP broadcast 6
    BOOTP broadcast 7
    BOOTP broadcast 8
    BOOTP broadcast 9
    BOOTP broadcast 10
    BOOTP broadcast 11
    BOOTP broadcast 12
    BOOTP broadcast 13
    BOOTP broadcast 14
    BOOTP broadcast 15
    BOOTP broadcast 16
    BOOTP broadcast 17

    Retry time exceeded; starting again
    missing environment variable: pxeuuid
    Retrieving file: pxelinux.cfg/01-64-1c-10-2a-78-64
    link up on port 1, speed 10, half duplex
    *** ERROR: `serverip' not set
    Retrieving file: pxelinux.cfg/00000000
    link up on port 1, speed 10, half duplex
    *** ERROR: `serverip' not set
    Retrieving file: pxelinux.cfg/0000000
    link up on port 1, speed 10, half duplex
    *** ERROR: `serverip' not set
    Retrieving file: pxelinux.cfg/000000
    link up on port 1, speed 10, half duplex
    *** ERROR: `serverip' not set
    Retrieving file: pxelinux.cfg/00000
    link up on port 1, speed 10, half duplex
    *** ERROR: `serverip' not set
    Retrieving file: pxelinux.cfg/0000
    link up on port 1, speed 10, half duplex
    *** ERROR: `serverip' not set
    Retrieving file: pxelinux.cfg/000
    link up on port 1, speed 10, half duplex
    *** ERROR: `serverip' not set
    Retrieving file: pxelinux.cfg/00
    link up on port 1, speed 10, half duplex
    *** ERROR: `serverip' not set
    Retrieving file: pxelinux.cfg/0
    link up on port 1, speed 10, half duplex
    *** ERROR: `serverip' not set
    Retrieving file: pxelinux.cfg/default-arm-k3-am62x
    link up on port 1, speed 10, half duplex
    *** ERROR: `serverip' not set
    Retrieving file: pxelinux.cfg/default-arm-k3
    link up on port 1, speed 10, half duplex
    *** ERROR: `serverip' not set
    Retrieving file: pxelinux.cfg/default-arm
    link up on port 1, speed 10, half duplex
    *** ERROR: `serverip' not set
    Retrieving file: pxelinux.cfg/default
    link up on port 1, speed 10, half duplex
    *** ERROR: `serverip' not set
    Config file not found
    link up on port 1, speed 10, half duplex
    BOOTP broadcast 1
    BOOTP broadcast 2
    BOOTP broadcast 3
    BOOTP broadcast 4
    BOOTP broadcast 5
    BOOTP broadcast 6
    BOOTP broadcast 7
    BOOTP broadcast 8
    BOOTP broadcast 9
    BOOTP broadcast 10
    BOOTP broadcast 11
    BOOTP broadcast 12
    BOOTP broadcast 13
    BOOTP broadcast 14
    BOOTP broadcast 15
    BOOTP broadcast 16
    BOOTP broadcast 17

    Retry time exceeded; starting again
    link up on port 1, speed 10, half duplex
    BOOTP broadcast 1
    BOOTP broadcast 2
    BOOTP broadcast 3
    BOOTP broadcast 4
    BOOTP broadcast 5
    BOOTP broadcast 6
    BOOTP broadcast 7
    BOOTP broadcast 8
    BOOTP broadcast 9
    BOOTP broadcast 10
    BOOTP broadcast 11
    BOOTP broadcast 12
    BOOTP broadcast 13
    BOOTP broadcast 14
    BOOTP broadcast 15
    BOOTP broadcast 16
    BOOTP broadcast 17

    Retry time exceeded; starting again

  • I found that I forgot to load the eMMC boot folder with fitImage and Image.  Once I did that, I got the following error because there is no EEPROM on the custom board:

    EEPROM not available at 80, trying to read at 81
    Reading on-board EEPROM at 0x51 failed -121
    DRAM: no bloblist found!2 GiB
    Core: 72 devices, 32 uclasses, devicetree: separate
    MMC: mmc@fa10000: 0, mmc@fa00000: 1
    Loading Environment from nowhere... OK

    There is also no Ethernet available on custom board.  Can  I safely turn both off in uboot?

  • Hi,

    Can  I safely turn both off in uboot?

    This should not be an issue as long as it doesnot hamper with your booting process. We can make these configuration changes once we have the device booting.

    Are you still able to get the complete boot logs and boot into Linux?

    Regards,
    Aparna

  • My apologies for not sending status on this problem.  I was finally able to get a version of the kernel that booted.  I was able to turn off Ethernet, error messages I got the first time through boot went away.  Now I am trying to disconnect the USB-USB cable to allow it to boot by itself and it's not booting.  Do I need to add a uEnv file to get this going?  My boot mode is set to DFU-primary, eMMC-backup.

  • Hi,

    The bootmode should be set to eMMC for the board to boot from eMMC.

    Regards,
    Aparna

  • I don't have bootmode switches like that on the custom board we have designed.  The idea is for the custom board to use eMMC as primary boot with DFU as backup.  Will this not work?  Do we need to add switches?  There isn't a whole lot of room on the board for this.

  • Note, Per the spruiv7b.pdf, the bit 7 is reserved for eMMC boot (Alternative) settings above. 

    Patra, could this bit 7 (1) value be incorrect? Do you mean eMMC Boot Raw(1) Mode with BOOTMODE[6:3] = 1000b where BOOTMODE[7] would mean raw mode?

  • I have an inquiry out to the HW guys on what they set each BOOTMODE pin to on this board they have me working on.  I do still have the following question:

    If I have the board set in DFU bootmode as the primary mode and eMMC as backup mode, and I have successfully programmed uboot/rootfs to eMMC and verified I can boot the board from uboot prompt, should it then boot on its own eventually if I pull the DFU USB cable?

  • If DFU fails to enumerate on your PC I believe it should go back to emmc to boot if eMMC is the back up mode. 

    The eMMC tiboot3.bin, tispl.bin R5 and u-boot A53 code base needs to have the 

    CONFIG_BOOTCOMMAND="run envboot; run distro_bootcmd;" set in am62x_evm_a53_defconfig.

    This drives the u-boot to boot based on the envboot configuration and the follow up command distro_bootcmd.

    You can see these at the => u boot prompt before if you interrupt the boot process - this will let you confirm information. (printenv, bdinfo, mmc part, ls mmc 0, ls mmc 1, printenv dfu_alt_info_emmc,  printenv dfu_info_emmc, etc ...

  • Got bootmode pin configuration for our custom board from our HW people:

    The default population (eMMC primary, DFU backup) is:
    B[13-B0] = 00011101001011

    The population on the board I sent you (DFU primary, eMMC backup) is:
    B[13-B0] = 01011001010011

    Do these settings look correct to you?

  • Depends on custom board, is eMMC port 0 or port 1 in the custom board?

    See SPRUIV7B – MAY 2022 – REVISED SEPTEMBER 2023 - it describes the pins well. Note with my partconf settings I have not booted eMMC using BOOTMODE[6:3]=1000b succesfully. I believe this is tied to how the SoC running u-boot configures the part before running the eMMC tiboot3...images. So for me eMMC alternative works fine.

    Primary: For USB the mode is 0 which is correct for DFU.

    Backup: And you o have eMMC/SD for backup.

    But note the default custom board config is eMMC Boot (Alternative) which works fine for me as my primary boot.

    In linux my plan is to corrupt the eMMC boot0 flash space since it is single cell (thus has longer wear ratings) from Linux if I want o force the backup mode (in my case Ethernet to load a completely new image (factory level update)). Otherwise I will just update my applications using installation scripts or scp to onboard my latest code.

    FYI: I did get frustrated being new to this as well - UDA/boot0/boot1 (not even trying the DRM related encrypted storage) so I made a writeup here:

    https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1334061/processor-sdk-am62x-sk-am62x-evk---configuring-emmc-as-if-it-was-erased-factory-fresh-some-questions-about-mmc-hwpartion-mmc-partconf-gpt-and-related-commands

    See last response (let me know if you have the same conclusions - it took the u-boot .rst file discussing HW partitions to help me follow the memory layout better).

  • Robert,

    Thanks for your reply!  Based on what you stated and based on the BOOTMODE documentation, I believe we have correct settings on the custom board.

    Here is where I'm at:

    I have "mmcdev 0" as the boot device on the boot.  I used gpt partitions 1 (boot) and 2 (rootfs).  I successfully used dfu-util to load emmc boot partition with tiboot3.bin, tispl.bin, and u-boot.img.  I am able to break into uboot prompt, set up dfu and load emmc rootfs partition with rootfs.ext4.

    Once rootfs dfu-load is complete, I then enter the following commands:

    => setenv mmcdev 0

    => setenv bootpart 0:2

    => boot

    Kernel init seems to work ok but wifi doesn't come up.

    When I reboot the board  with USB-DFU cable disconnected, nothing happens.

    Here is some of the uboot info I've found:

    => printenv dfu_alt_info
    dfu_alt_info=rawemmc raw 0 0x800000 mmcpart 1; rootfs part 0 2; tiboot3.bin.raw raw 0x0 0x400 mmcpart 1; tispl.bin.raw raw 0x400 0x1000 mmcpart 1; u-boot.img.raw raw 0x1400 0x2000 mmcpart 1; u-env.raw raw 0x3400 0x100 mmcpart 1; sysfw.itb.raw raw 0x3600 0x800 mmcpart 1

    => printenv bootcmd
    bootcmd=run envboot; run distro_bootcmd;

    => printenv envboot
    envboot=mmc dev ${mmcdev}; if mmc rescan; then echo SD/MMC found on device ${mmcdev}; if run loadbootscript; then run bootscript; else if run loadbootenv; then echo Loaded env from ${bootenvfile}; run importbootenv; fi; if test -n $uenvcmd; then echo Running uenvcmd ...; run uenvcmd; fi; fi; fi;

    => printenv distro_bootcmd
    distro_bootcmd=for target in ${boot_targets}; do run bootcmd_${target}; done

    Do I need a special uEnv.txt loaded into eMMC too?  Currently I do not have one defined and loaded into eMMC.

  • my eMMC is on physical device 0 as well.

    I am using eMMC alternative - not eMMC Filesys/Raw That is boot0 contains raw FSBL files, and UDA is my  bootpart 0 that consists of a GPT with two filesystems partitions. For me that means mmc partconf 0 1 1 1  (the second 1? is 1 indexed => boot0 for FSBL).

    If you have booted Linux before check /dev/mmcXXXX 

    => setenv mmcdev 0

    => setenv bootpart 0:2

    => boot

    Not sure if this helps but check (my eMMC Alternate mode):

    brw-rw---- 1 root disk 179, 0 Apr 28 17:57 /dev/mmcblk0       (mmc dev 0 0)                                      Confusing right? this is UDA area
    brw-rw---- 1 root disk 179, 32 Apr 28 17:57 /dev/mmcblk0boot0 (mmc dev 0 1) 
    brw-rw---- 1 root disk 179, 64 Apr 28 17:57 /dev/mmcblk0boot1 (mmc dev 0 2)
    brw-rw---- 1 root disk 179, 1 Apr 28 17:57 /dev/mmcblk0p1 (gpt partition 1 on dev 0 0)                  UDA Filesystem partition 1
    brw-rw---- 1 root disk 179, 2 Apr 28 17:57 /dev/mmcblk0p2 (gpt partition 2 on dev 0 0)                  UDA Filesystem partition 2
    crw------- 1 root root 240, 0 Apr 28 17:57 /dev/mmcblk0rpmb   (mmc dev 0 3)

    I beleive the other method for SD card and eMMC with file system follows this:

    SD card and eMMC 

    /dev/mmcblk0 - UDA

    /dev/mmcblk0p1 - FAT 16/32 with files tiboot3.bin, tispl.bin, and u-boot.image (?) should follow the SD card

    /dev/mmcblk0p2 - EXT4 linux filesystem to hold the Linux RFS image.

    I believe you are using this approach? And I'm the manual - IT IMPLIES you can not use 1001b (alternate) modes. you must use

    "When eMMC boot is used as a backup boot option, only User Data Area (UDA) in filesystem mode is supported.
    Raw mode is not supported. Additionally, boot will only occur in 1-bit mode during backup booting."

    So the above commands SD/eMMC card layout with FAT/EXT4 Filesystems for backup.  If yours works for eMMC Primary (alternate mode) it wont work for UDA Filesystem backup mode. 

    - Robert

  • We don't have an SD card on this custom board at all, so I don't need to worry about that wrt booting and I don't need to worry about FAT/EXT4 partitions.  This board I have been working on is DFU primary, eMMC mode backup.  Our other boards have eMMC as eMMC primary, DFU backup.  So I think what needs to happen next, is the board I have needs to be reverted back to eMMC RAW primary boot mode.

    I still have the question:  do I need a uEnv file to force the board to use mmc bootpart 0:2?

  • What I've done is when I program eMMC I place a uEnv.txt file at 0x3400 (up to 0x800 blocks) with commands to run (it defines a user_commands)
    So this is bootstrapped into the resident eMMC u-boot image THUS:
    -CONFIG_BOOTCOMMAND="run envboot; run distro_bootcmd;"
    +CONFIG_BOOTCOMMAND="mmc dev 0 1; mmc read ${loadaddr} 0x3400 0x800; env import -t ${loadaddr} 0x800; run user_commands;"
    This creates a flexible way to modify how your boad boots (via uEnv.txt). 
    My concern about the BOOT mode switch settings is that you showed eMMC alternative BOOTMODE[7:0] 01001011 - boot0/boot1 (per partconf) and UDA for ext4. 
    From Manual:
    When eMMC boot is used as a backup boot option, only User Data Area (UDA) in filesystem mode is supported.
    Raw mode is not supported. Additionally, boot will only occur in 1-bit mode during backup booting.
    So this implies (again) you will need FAT16/32 and ext4 Partitions in flash - and I think this excludes boot0/boot1.
    please try this on the UDA partition if you want to use it this way. the Other way eMMC Alternative is not available as a backup options as stated in the manual.
  • A little context:  The BOOTMODE settings that I showed are just what I'm using now to get the eMMC programmed.  We have 3 different prototypes with various BOOTMODE settings configured to try to get the eMMC programmed.  Without ethernet and SD card available for this custom design, it's been difficult to cobble together tools and get it going.

    So basically, if I switch to a board the designed BOOTMODE settings (eMMC raw as primary, DFU/USB as backup), I think we should be ok.  We are going to try that out now that I've got some scripts going and working.

    I understand the eMMC boot as backup option more clearly now, thanks.  From documentation I've read, I don't think it is possible to set up FAT boot and EXT4 partitions in eMMC from uboot prompt.  I have read information about doing this using SD card, but I don't have that option with this board.  Currently, I am using XMODEM/YMODEM to get uboot going, then I create the eMMC partitions.  After that, I run dfu-util to program eMMC with uboot and rootfs files.

    If there is another way to create eMMC FAT/EXT4 partitions, I will try that out and any suggestions are welcome.

  • I think your original question has been answered - how to program eMMC via USB DFU?

    Please close thread and open a new one with a table of primary and back up modes you desire.

    I believe with GPT you can partion two disks with one as fat16 and the other as ext4. (tiboot3 et all on fat16/32) and RFS on ext4. This should allow you to run eMMC filesystem mode backup (or primary) letting you standardize.

    https://software-dl.ti.com/processor-sdk-linux/esd/AM64X/latest/exports/docs/linux/Foundational_Components/U-Boot/UG-Memory.html?highlight=gpt%20uuid

    NOTE: here are some referenecs of my own doing this research period (where you are now):

    https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1334061/processor-sdk-am62x-sk-am62x-evk---configuring-emmc-as-if-it-was-erased-factory-fresh-some-questions-about-mmc-hwpartion-mmc-partconf-gpt-and-related-commands/5121739?tisearch=e2e-sitesearch&keymatch=gpt%20AM623#5121739

  • Thanks for all your assistance.  I will open another topic as you suggested, since this has migrated to another topic at this point.