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.

AM625: Unable to load Linux to eMMC using USB DFU support

Part Number: AM625


Hi I am trying to get this working again and still have the same issue with flashing image to eMMC via USB.

Log;

PS C:\Users\mitesh.hiran\Downloads\dfu-util-0.11-binaries.tar\dfu-util-0.11-binaries\win64> .\dfu-util.exe -l
dfu-util 0.11

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2021 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=13, cfg=1, intf=0, path="1-2.2.2", alt=1, name="SocId", serial="01.00.00.00"
Found DFU: [0451:6165] ver=0200, devnum=13, cfg=1, intf=0, path="1-2.2.2", alt=0, name="bootloader", serial="01.00.00.00"


PS C:\Users\mitesh.hiran\Downloads\dfu-util-0.11-binaries.tar\dfu-util-0.11-binaries\win64> .\dfu-util.exe -R -a bootloader -D 'C:\Users\mitesh.hiran\Downloads\AM62 U-boot - DFU\tiboot3.bin'
dfu-util 0.11

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

Warning: Invalid DFU suffix signature
A valid DFU suffix will be required in a future dfu-util release
Cannot open DFU device 17e9:4307 found on devnum 20 (LIBUSB_ERROR_NOT_FOUND)
Opening DFU capable USB device...
Device ID 0451:6165
Device DFU version 0110
Claiming USB DFU Interface...
Setting Alternate Interface #0 ...
Determining device status...
DFU state(2) = dfuIDLE, status(0) = No error condition is present
DFU mode device DFU version 0110
Device returned transfer size 512
Copying data from PC to DFU device
Download [=========================] 100% 330614 bytes
Download done.
DFU state(6) = dfuMANIFEST-SYNC, status(0) = No error condition is present
unable to read DFU status after completion (LIBUSB_ERROR_PIPE)

PS C:\Users\mitesh.hiran\Downloads\dfu-util-0.11-binaries.tar\dfu-util-0.11-binaries\win64> .\dfu-util.exe -R -a tispl.bin -D 'C:\Users\mitesh.hiran\Downloads\AM62 U-boot - DFU\tispl.bin'
dfu-util 0.11

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

Warning: Invalid DFU suffix signature
A valid DFU suffix will be required in a future dfu-util release
Cannot open DFU device 17e9:4307 found on devnum 20 (LIBUSB_ERROR_NOT_FOUND)
Opening DFU capable USB device...
Device ID 0451:6165
Device DFU version 0110
Claiming USB DFU Interface...
Setting Alternate Interface #0 ...
Determining device status...
DFU state(2) = dfuIDLE, status(0) = No error condition is present
DFU mode device DFU version 0110
Device returned transfer size 4096
Copying data from PC to DFU device
Download [=========================] 100% 916184 bytes
Download done.
DFU state(7) = dfuMANIFEST, status(0) = No error condition is present
DFU state(2) = dfuIDLE, status(0) = No error condition is present
Done!
Resetting USB to switch back to Run-Time mode

PS C:\Users\mitesh.hiran\Downloads\dfu-util-0.11-binaries.tar\dfu-util-0.11-binaries\win64> .\dfu-util.exe -R -a u-boot.img -D 'C:\Users\mitesh.hiran\Downloads\AM62 U-boot - DFU\u-boot.img'
dfu-util 0.11

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

Warning: Invalid DFU suffix signature
A valid DFU suffix will be required in a future dfu-util release
Cannot open DFU device 17e9:4307 found on devnum 20 (LIBUSB_ERROR_NOT_FOUND)
No DFU capable USB device available
PS C:\Users\mitesh.hiran\Downloads\dfu-util-0.11-binaries.tar\dfu-util-0.11-binaries\win64>

  • And this is what I get on the console: 


    U-Boot SPL 2021.01-00002-g27f28e9f8f (Jun 29 2023 - 07:05:16 -0700)
    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 ...
    spl_load_fit_image: Skip load 'atf': image size is 0!
    Warning: Detected image signing certificate on GP device. Skipping certificate t
    o prevent boot failure. This will fail if the image was also encrypted
    Warning: Detected image signing certificate on GP device. Skipping certificate t
    o prevent boot failure. This will fail if the image was also encrypted
    Warning: Detected image signing certificate on GP device. Skipping certificate t
    o prevent boot failure. This will fail if the image was also encrypted
    Warning: Detected image signing certificate on GP device. Skipping certificate t
    o prevent boot failure. This will fail if the image was also encrypted
    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...

  • Hi Mitesh,

    ATF is size zero, meaning it is missing. What build instructions are you following?

    ~ Judith

  • Hi Mitesh,

    Those instructions should be up-to-date.

    I would check this command:

    make ATF=$(pwd)/../prebuilt-images/bl31.bin TEE=$(pwd)/../prebuilt-images/bl32.bin DM=$(pwd)/../prebuilt-images/ipc_echo_testb_mcu1_0_release_strip.xer5f O=build/arm64


    and verify that bl31.bin is in fact in the prebuilt-images directory.

    ~ Judith

  • Hi Judith, those files do exist. However notice this error when running the make command. 

    $ sudo make ATF=/home/miteshhiran/ti-processor-sdk-linux-am62xx-evm-08.06.00.42/board-support/prebuilt-images/bl31.bin TEE=/home/miteshhiran/ti-processor-sdk-linux-am62xx-evm-08.06.00.42/board-support/prebuilt-images/bl32.bin DM=/home/miteshhiran/ti-processor-sdk-linux-am62xx-evm-08.06.00.42/board-support/prebuilt-images/ipc_echo_testb_mcu1_0_release_strip.xer5f O=build/arm64
    make[1]: Entering directory '/home/miteshhiran/ti-processor-sdk-linux-am62xx-evm-08.06.00.42/board-support/u-boot-2021.01+gitAUTOINC+2ee8efd654-g2ee8efd654/build/arm64'
    ===================== WARNING ======================
    This board uses CONFIG_SPL_FIT_GENERATOR. Please migrate
    to binman instead, to avoid the proliferation of
    arch-specific scripts with no tests.
    ====================================================
    CFGCHK u-boot.cfg
    Using /home/miteshhiran/ti-processor-sdk-linux-am62xx-evm-08.06.00.42/board-support/u-boot-2021.01+gitAUTOINC+2ee8efd654-g2ee8efd654 as source for U-Boot
    UPD include/generated/timestamp_autogenerated.h
    CC lib/asm-offsets.s
    cc1: warning: unknown register name: x18
    cc1: error: bad value (‘armv8-a’) for ‘-march=’ switch
    cc1: note: valid arguments to ‘-march=’ switch are: nocona core2 nehalem corei7 westmere sandybridge corei7-avx ivybridge core-avx-i haswell core-avx2 broadwell skylake skylake-avx512 bonnell atom silvermont slm knl x86-64 eden-x2 nano nano-1000 nano-2000 nano-3000 nano-x2 eden-x4 nano-x4 k8 k8-sse3 opteron opteron-sse3 athlon64 athlon64-sse3 athlon-fx amdfam10 barcelona bdver1 bdver2 bdver3 bdver4 znver1 btver1 btver2
    /home/miteshhiran/ti-processor-sdk-linux-am62xx-evm-08.06.00.42/board-support/u-boot-2021.01+gitAUTOINC+2ee8efd654-g2ee8efd654/scripts/Makefile.build:155: recipe for target 'lib/asm-offsets.s' failed
    make[2]: *** [lib/asm-offsets.s] Error 1
    /home/miteshhiran/ti-processor-sdk-linux-am62xx-evm-08.06.00.42/board-support/u-boot-2021.01+gitAUTOINC+2ee8efd654-g2ee8efd654/Makefile:1846: recipe for target 'prepare0' failed
    make[1]: *** [prepare0] Error 2
    make[1]: Leaving directory '/home/miteshhiran/ti-processor-sdk-linux-am62xx-evm-08.06.00.42/board-support/u-boot-2021.01+gitAUTOINC+2ee8efd654-g2ee8efd654/build/arm64'
    Makefile:167: recipe for target 'sub-make' failed
    make: *** [sub-make] Error 2

  • Hi Mitesh,

    Since the command looks correct, it should work assuming your setup is correct. Did you follow the following documentation: https://software-dl.ti.com/processor-sdk-linux-rt/esd/AM62X/08_06_00_42/exports/docs/linux/Overview/Top_Level_Makefile.html and install all dependencies?

    ~ Judith

  • Hi Judith, 

    Yes I have done them all.

    I am able to build U-boot and Linux from top level make file but only when I go to u-boot directory of the SDK I get the said error. 

  • Hi Mitesh,

    Sorry for the delay. Ok, you are building from U-boot directory.

    Try the following:

    export ARCH=arm
    export CROSS_COMPILE=aarch64-none-linux-gnu-
    export PATH="<path-to-sdk>/linux-devkit/sysroots/x86\_64-arago-linux/usr/bin:$PATH"
    make am62x_evm_a53_defconfig O=build/arm64
    make ATF=<path-to-sdk>/board-support/prebuilt-images/bl31.bin TEE=/<path-to-sdk>/board-support/prebuilt-images/bl32.bin DM=<path-to-sdk>/board-support/prebuilt-images/ipc_echo_testb_mcu1_0_release_strip.xer5f O=build/arm64


    Just making sure you are building correctly. ATF size should not be zero. Once we have a correct build we can look into the USB DFU issue.

    ~ Judith

  • Hi Judith, still the same error:

    :~/ti-processor-sdk-linux-am62xx-evm-08.06.00.42/board-support/u-boot-2021.01+gitAUTOINC+2ee8efd654-g2ee8efd654$ export ARCH=arm


    miteshhiran@ubuntu:~/ti-processor-sdk-linux-am62xx-evm-08.06.00.42/board-support/u-boot-2021.01+gitAUTOINC+2ee8efd654-g2ee8efd654$ export CROSS_COMPILE=aarch64-none-linux-gnu-


    miteshhiran@ubuntu:~/ti-processor-sdk-linux-am62xx-evm-08.06.00.42/board-support/u-boot-2021.01+gitAUTOINC+2ee8efd654-g2ee8efd654$ echo $PATH
    ./../../linux-devkit/sysroots/x86_64-arago-linux/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin


    miteshhiran@ubuntu:~/ti-processor-sdk-linux-am62xx-evm-08.06.00.42/board-support/u-boot-2021.01+gitAUTOINC+2ee8efd654-g2ee8efd654$ sudo make am62x_evm_a53_defconfig O=build/arm64
    make[1]: Entering directory '/home/miteshhiran/ti-processor-sdk-linux-am62xx-evm-08.06.00.42/board-support/u-boot-2021.01+gitAUTOINC+2ee8efd654-g2ee8efd654/build/arm64'
    #
    # configuration written to .config
    #
    make[1]: Leaving directory '/home/miteshhiran/ti-processor-sdk-linux-am62xx-evm-08.06.00.42/board-support/u-boot-2021.01+gitAUTOINC+2ee8efd654-g2ee8efd654/build/arm64'


    miteshhiran@ubuntu:~/ti-processor-sdk-linux-am62xx-evm-08.06.00.42/board-support/u-boot-2021.01+gitAUTOINC+2ee8efd654-g2ee8efd654$ sudo make AFT=/home/miteshhiran/ti-processor-sdk-linux-am62xx-evm-08.06.00.42/board-support/prebuilt-images/bl31.bin TEE=/home/miteshhiran/ti-processor-sdk-linux-am62xx-evm-08.06.00.42/board-support/prebuilt-images/bl32.bin DM=/home/miteshhiran/ti-processor-sdk-linux-am62xx-evm-08.06.00.42/board-support/prebuilt-images/ipc_echo_testb_mcu1_0_release_strip.xer5f O=build/arm64
    make[1]: Entering directory '/home/miteshhiran/ti-processor-sdk-linux-am62xx-evm-08.06.00.42/board-support/u-boot-2021.01+gitAUTOINC+2ee8efd654-g2ee8efd654/build/arm64'
    scripts/kconfig/conf --syncconfig Kconfig
    CFG u-boot.cfg
    cc1: warning: unknown register name: x18
    GEN include/autoconf.mk
    GEN include/autoconf.mk.dep
    cc1: warning: unknown register name: x18
    CFG spl/u-boot.cfg
    cc1: warning: unknown register name: x18
    GEN spl/include/autoconf.mk
    ===================== WARNING ======================
    This board uses CONFIG_SPL_FIT_GENERATOR. Please migrate
    to binman instead, to avoid the proliferation of
    arch-specific scripts with no tests.
    ====================================================
    CFGCHK u-boot.cfg
    Using /home/miteshhiran/ti-processor-sdk-linux-am62xx-evm-08.06.00.42/board-support/u-boot-2021.01+gitAUTOINC+2ee8efd654-g2ee8efd654 as source for U-Boot
    UPD include/generated/timestamp_autogenerated.h
    CC lib/asm-offsets.s
    cc1: warning: unknown register name: x18
    cc1: error: bad value (‘armv8-a’) for ‘-march=’ switch
    cc1: note: valid arguments to ‘-march=’ switch are: nocona core2 nehalem corei7 westmere sandybridge corei7-avx ivybridge core-avx-i haswell core-avx2 broadwell skylake skylake-avx512 bonnell atom silvermont slm knl x86-64 eden-x2 nano nano-1000 nano-2000 nano-3000 nano-x2 eden-x4 nano-x4 k8 k8-sse3 opteron opteron-sse3 athlon64 athlon64-sse3 athlon-fx amdfam10 barcelona bdver1 bdver2 bdver3 bdver4 znver1 btver1 btver2
    /home/miteshhiran/ti-processor-sdk-linux-am62xx-evm-08.06.00.42/board-support/u-boot-2021.01+gitAUTOINC+2ee8efd654-g2ee8efd654/scripts/Makefile.build:155: recipe for target 'lib/asm-offsets.s' failed
    make[2]: *** [lib/asm-offsets.s] Error 1
    /home/miteshhiran/ti-processor-sdk-linux-am62xx-evm-08.06.00.42/board-support/u-boot-2021.01+gitAUTOINC+2ee8efd654-g2ee8efd654/Makefile:1846: recipe for target 'prepare0' failed
    make[1]: *** [prepare0] Error 2
    make[1]: Leaving directory '/home/miteshhiran/ti-processor-sdk-linux-am62xx-evm-08.06.00.42/board-support/u-boot-2021.01+gitAUTOINC+2ee8efd654-g2ee8efd654/build/arm64'
    Makefile:167: recipe for target 'sub-make' failed
    make: *** [sub-make] Error 2
    miteshhiran@ubuntu:~/ti-processor-sdk-linux-am62xx-evm-08.06.00.42/board-support/u-boot-2021.01+gitAUTOINC+2ee8efd654-g2ee8efd654$

  • Hi Mitesh,

    What Ubuntu version are you using to build the SDK? Ubuntu 18.04 is the version verified for 08.06 SDK, so I recommend using that version. Also, if you can build using the top level Makefile, why do you need to build in U-boot directory?

    ~ Judith

  • Yes, I am using 18.04 Ubuntu. 

    I don't have to build from U-Boot directory, I thought this is the only way to build if you want to build for USB DFU

  • Please let me know how to build u-boot for USB DFU using top level of the SDK.

    Currently, this is what I am following.

    https://dev.ti.com/tirex/explore/content/linux-academy-AM62X-8.3.0.0.v1/ch-develop/dev-build-uboot.html#dev-build-uboot 

  • I am able to build the files now but could you let me know which location should I take the following files:

    • tiboot3.bin
    • tispl.bin
    • u-boot.img

    .../build/r5 or .../build/arm64

    Thanks

  • so, to update, I have used tiboot3.bin from ../k3-image-<version>

    and the other two files from ../build/arm64.

    and now I get the following on the console: 

    U-Boot SPL 2021.01-00002-g27f28e9f8f (Jul 13 2023 - 04:14:06 -0700)
    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 ...
    Warning: Detected image signing certificate on GP device. Skipping certificate t
    o prevent boot failure. This will fail if the image was also encrypted
    Warning: Detected image signing certificate on GP device. Skipping certificate t
    o prevent boot failure. This will fail if the image was also encrypted
    Warning: Detected image signing certificate on GP device. Skipping certificate t
    o prevent boot failure. This will fail if the image was also encrypted
    Warning: Detected image signing certificate on GP device. Skipping certificate t
    o prevent boot failure. This will fail if the image was also encrypted
    Warning: Detected image signing certificate on GP device. Skipping certificate t
    o prevent boot failure. This will fail if the image was also encrypted
    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-00002-g27f28e9f8f (Jul 13 2023 - 04:20:03 -0700)
    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 ...


    U-Boot 2021.01-00002-g27f28e9f8f (Jul 13 2023 - 04:20:03 -0700)

    SoC: AM62X SR1.0 GP
    Model: Texas Instruments AM625 SK
    EEPROM not available at 0x50, trying to read at 0x51
    Board: AM62-SKEVM rev E3
    DRAM: 2 GiB
    MMC: mmc@fa10000: 0, mmc@fa00000: 1, mmc@fa20000: 2
    Loading Environment from MMC... OK
    In: serial@2800000
    Out: serial@2800000
    Err: serial@2800000
    Net: eth0: ethernet@8000000port@1
    Hit any key to stop autoboot: 0
    => mmc partconf 0 1 1 1
    => mmc bootbus 0 2 0 0
    => 

    Then powered cycle the board and connected the power back to J11 from J13.

    and changed the boot DIP switch to eMMC but doesn't boot Linux on. 

    Boot Settings 

    SW1 

    1 and 2 ON

    3 OFF

    4 ON

    5 & 6 OFF

    7 ON

    8 OFF

    and SW2 all Off.

  • And if I don't press any key during u-boot loading I get this:

    U-Boot SPL 2021.01-00002-g27f28e9f8f-dirty (Jul 13 2023 - 06:06:46 -0700)
    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 ...


    U-Boot 2021.01-00002-g27f28e9f8f-dirty (Jul 13 2023 - 06:06:46 -0700)

    SoC: AM62X SR1.0 GP
    Model: Texas Instruments AM625 SK
    EEPROM not available at 0x50, trying to read at 0x51
    Board: AM62-SKEVM rev E3
    DRAM: 2 GiB
    MMC: mmc@fa10000: 0, mmc@fa00000: 1, mmc@fa20000: 2
    Loading Environment from MMC... OK
    In: serial@2800000
    Out: serial@2800000
    Err: serial@2800000
    Net: eth0: ethernet@8000000port@1
    Hit any key to stop autoboot: 0
    MMC: no card present
    SD/MMC found on device 1
    MMC: no card present
    MMC: no card present
    MMC: no card present
    MMC: no card present
    MMC: no card present
    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!
    =>

  • Hi Mitesh,

    Try updating Rules.make Line 49. Change the regurlar R5 defconfig for the usb-dfu defconfig and rebuild U-boot with: "make u-boot" command.

    Then the tiboot3.bin should be in board-support/k3-image-gen-2022.01 and the other two should be in: board-support/u-boot_build/a53.


    Boot with USB-DFU using these files up to U-boot prompt stop.

  • Ok, After you boot with USB DFU to U-boot, stop at U-boot prompt and do the following:

    Verify partition exists in UDA for rootfs:
    => 
    => mmc part

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

    Part    Start LBA    End LBA        Name
        Attributes
        Type GUID
        Partition GUID
     1    0x00000800    0x01da3fde    ""
        attrs:    0x0000000000000000
        type:    024dee41-33e7-11d3-9d69-0008c781f39f
        guid:    3c0d0ba7-4adb-6847-92e6-6027f447dad0
    => 
    If not, create new partition in U-boot using:
    => gpt write mmc 0 $partitions

    setenv dfu_alt_info ${dfu_alt_info_emmc}
    dfu 0 mmc 0

    Hit any key to stop autoboot:  0 
    => 
    => 
    => setenv dfu_alt_info ${dfu_alt_info_emmc}
    => dfu 0 mmc 0

    Verify command above is running and go to Host PC to transfer files to eMMC


    At Linux host machine do:

    sudo dfu-util -a tiboot3.bin.raw -D tiboot3.bin
    sudo dfu-util -a tispl.bin.raw -D tispl.bin 
    sudo dfu-util -a u-boot.img.raw -D u-boot.img
    sudo dfu-util -a rootfs -D tisdk-base.ext4


    UART serial console should show:

    => dfu 0 mmc 0
    ##DOWNLOAD ... OK
    Ctrl+C to exit ...
    ####DOWNLOAD ... OK
    Ctrl+C to exit ...
    ####DOWNLOAD ... OK
    Ctrl+C to exit ...
    ################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################DOWNLOAD ... OK
    Ctrl+C to exit ...


    Now in U-boot do:
    => mmc partconf 0 1 1 1
    => mmc bootbus 0 2 0 0

    To boot rootfs from eMMC put the following in U-boot environment:

    => setenv mmcdev 0
    => setenv bootpart 0

    Reboot the board with eMMC boot

    ~ Judith

  • If you do not have the rootfs prepared do:

    # In the directory where tisdk-base-image-am62xx-evm.tar.xz is located

    dd if=/dev/null of=tisdk-base.ext4 bs=1M seek=300
    mkfs.ext4 -F tisdk-base.ext4
    mkdir mnt_fs
    sudo mount -t ext4 tisdk-base.ext4 mnt_fs
    cd mnt_fs
    sudo tar xvf ../tisdk-base-image-am62xx-evm.tar.xz
    cd ..
    sudo umount mnt_fs

    # Now use tisdk-base.ext4 to flash to emmc

    ~ Judith

  • Let me know if this works for you.

    ~ Judith

  • Hi Judith, all I get is this:


    U-Boot 2021.01-00002-g27f28e9f8f-dirty (Jul 13 2023 - 06:06:46 -0700)

    SoC: AM62X SR1.0 GP
    Model: Texas Instruments AM625 SK
    EEPROM not available at 0x50, trying to read at 0x51
    Board: AM62-SKEVM rev E3
    DRAM: 2 GiB
    MMC: mmc@fa10000: 0, mmc@fa00000: 1, mmc@fa20000: 2
    Loading Environment from MMC... OK
    In: serial@2800000
    Out: serial@2800000
    Err: serial@2800000
    Net: eth0: ethernet@8000000port@1
    Hit any key to stop autoboot: 0
    MMC: no card present
    SD/MMC found on device 1
    MMC: no card present
    MMC: no card present
    MMC: no card present
    MMC: no card present
    MMC: no card present
    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!
    => mmc part

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

    Part Start Sector Num Sectors UUID Type
    1 2048 32768 65e3b42b-01 0e Boot
    2 34816 31045632 65e3b42b-02 83
    =>

  • ALso can you please help me understand the following:

    so every time I am trying to get USB DFU boot working it seems to write on the on chip memory of the AM62x correct? r5 processor? 

    then I want to switch back to booting from sd card why can I just change the boot pins and insert the sd card?  what and how to write to r5 processor to get sd card boot working? 

    Thanks

  • Hi Mitesh,

    In log above, did you do:

    => setenv mmcdev 0
    => setenv bootpart 0
    => boot

    During eMMC boot at u-boot prompt?

  • so every time I am trying to get USB DFU boot working it seems to write on the on chip memory of the AM62x correct? r5 processor? 

    --> So first we boot using USB-DFU to U-boot prompt. Then, since we are flashing to eMMC using USB-DFU, we are writing to the on-board eMMC device, flashing directly to an address in eMMC.

    then I want to switch back to booting from sd card why can I just change the boot pins and insert the sd card?  what and how to write to r5 processor to get sd card boot working? 

    --> Please clarify, you have not been able to boot from SD card? If so, please try using "tisdk-default-image-am62xx-evm.wic.xz" image from the 08.06 SDK, flash to SD card using balena or alike, and verify the board can boot to Linux prompt.
    You have a GP device, so switch out the "tiboot3.bin" in the boot partition of the SD card after you flash it, with the one named "tiboot3-am62x-gp-evm.bin"

    ~ Judith

  • Hi Judith, I just tried doing that and following messages I got: 

    Err: serial@2800000
    Net: eth0: ethernet@8000000port@1
    Hit any key to stop autoboot: 0
    => setenv mmcdev 0
    => setenv bootpart 0
    => boot
    switch to partitions #0, OK
    mmc0(part 0) is current device
    SD/MMC found on device 0
    Failed to load 'boot.scr'
    Failed to load 'uEnv.txt'
    Failed to load '/boot/Image'
    Failed to load '/boot/k3-am625-sk.dtb'
    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!
    =>

  • Hi Judith, 

    no no, what I mean is, I by default can boot from sd card and all is working well in development phase.

    However, I want to use eMMC memory rather than sd card for production. And as part of my testing to get boot from eMMC working, I am working with you on this DFU USB section and as you can see we can now use the DFU USB and load the u-boot and we are still working to resolve this so in mean while, when I change the boot pins and insert the sd card the system doesn't boot from sd card. Any reason for this ?

    Are we changing M4 or R5 settings that needs re-programming to get boot to work from sc card? 

    Thanks. 

  • I just tried this... but can not sure if all that is one command or separate. 

    miteshhiran@ubuntu:~/ti-processor-sdk-linux-am62xx-evm-08.06.00.42$ cd ./filesystem/
    miteshhiran@ubuntu:~/ti-processor-sdk-linux-am62xx-evm-08.06.00.42/filesystem$ dd if=/dev/null of=tisdk-default.ext4 bs=1M seek=300
    0+0 records in
    0+0 records out
    0 bytes copied, 0.00027113 s, 0.0 kB/s
    miteshhiran@ubuntu:~/ti-processor-sdk-linux-am62xx-evm-08.06.00.42/filesystem$ mkfs.ext4-F tisdk-default.ext4
    mkfs.ext4-F: command not found
    miteshhiran@ubuntu:~/ti-processor-sdk-linux-am62xx-evm-08.06.00.42/filesystem$ dd if=/dev/null of=tisdk-default.ext4 bs=1M seek=300 mkfs.ext4 -F tisdk-default.ext4
    dd: invalid option -- 'F'
    Try 'dd --help' for more information.
    miteshhiran@ubuntu:~/ti-processor-sdk-linux-am62xx-evm-08.06.00.42/filesystem$

  • Hi Mitesh,

    Ok, it seems like you are not configuring rootfs correctly, in log above:

    Execute the commands one at at time in your Linux machine, for example:

    test:<path-to-sdk>/filesystem$ mkfs.ext4 -F tisdk-base.ext4
    mke2fs 1.46.5 (30-Dec-2021)
    The file tisdk-base.ext4 does not exist and no size was specified.
    test:<path-to-sdk>/filesystem$ dd if=/dev/null of=tisdk-base.ext4 bs=1M seek=300
    0+0 records in
    0+0 records out
    0 bytes copied, 0.000231378 s, 0.0 kB/s
    test:<path-to-sdk>/filesystem$ mkfs.ext4 -F tisdk-base.ext4
    mke2fs 1.46.5 (30-Dec-2021)
    Discarding device blocks: done                            
    Creating filesystem with 76800 4k blocks and 76800 inodes
    Filesystem UUID: 2963df85-a637-4103-9472-1da1c68f9246
    Superblock backups stored on blocks: 
    	32768
    
    Allocating group tables: done                            
    Writing inode tables: done                            
    Creating journal (4096 blocks): done
    Writing superblocks and filesystem accounting information: done
    
    test:<path-to-sdk>/filesystem$ mkdir mnt_fs
    test:<path-to-sdk>/filesystem$ sudo mount -t ext4 tisdk-base.ext4 mnt_fs
    test:<path-to-sdk>/filesystem$ cd mnt_fs
    test:<path-to-sdk>/filesystem/mnt_fs$ 
    test:<path-to-sdk>/filesystem/mnt_fs$ sudo tar xvf ../tisdk-base-image-am62xx-evm.tar.xz
    .....
    ./var/lib/opkg/status
    ./var/lib/systemd/
    ./var/local/
    ./var/lock
    ./var/log
    ./var/run
    ./var/spool/
    ./var/spool/mail/
    ./var/tmp
    ./var/volatile/
    test:<path-to-sdk>/filesystem/mnt_fs$ cd ..
    test:<path-to-sdk>/filesystem$ sudo umount mnt_fs

    For the "mkfs.ext4 -F" command, there is a space between the mkfs.ext4 and the -F part.

    After you finish this process, you will be left with a tisdk-base.ext4 file that you will use to transfer as the rootfs via USB-DFU.



    ~ Judith

  • However, I want to use eMMC memory rather than sd card for production. And as part of my testing to get boot from eMMC working, I am working with you on this DFU USB section and as you can see we can now use the DFU USB and load the u-boot and we are still working to resolve this so in mean while, when I change the boot pins and insert the sd card the system doesn't boot from sd card. Any reason for this ?

    --> It should work, make sure you are using cold boot. Power off the board and then back on. ROM then reads the boot mode and boot using that boot method. So up to R5 SPL it should work. I will verify here in a bit.

    ~ Judith

  • Hi Judith,

    That makes sense. Looks like ran out of memory...

    log:

    tar: ./var: Cannot mkdir: No space left on device
    tar: ./var/lib/opkg/info/kernel-module-videobuf2-dma-contig-5.10.168-g2c23e6c538.list: Cannot open: No such file or directory
    ./var/lib/opkg/info/kernel-module-videobuf2-dma-contig-5.10.168-g2c23e6c538.postinst
    tar: ./var: Cannot mkdir: No space left on device
    tar: ./var/lib/opkg/info/kernel-module-videobuf2-dma-contig-5.10.168-g2c23e6c538.postinst: Cannot open: No such file or directory
    ./var/lib/opkg/info/kernel-module-videobuf2-dma-contig-5.10.168-g2c23e6c538.postrm
    tar: ./var: Cannot mkdir: No space left on device
    tar: ./var/lib/opkg/info/kernel-module-videobuf2-dma-contig-5.10.168-g2c23e6c538.postrm: Cannot open: No such file or directory
    ./var/lib/opkg/info/kernel-module-videobuf2-dma-sg-5.10.168-g2c23e6c538.control
    tar: ./var: Cannot mkdir: No space left on device
    tar: ./var/lib/opkg/info/kernel-module-videobuf2-dma-sg-5.10.168-g2c23e6c538.control: Cannot open: No such file or directory
    ./var/lib/opkg/info/kernel-module-videobuf2-dma-sg-5.10.168-g2c23e6c538.list
    tar: ./var: Cannot mkdir: No space left on device
    tar: ./var/lib/opkg/info/kernel-module-videobuf2-dma-sg-5.10.168-g2c23e6c538.list: Cannot open: No such file or directory
    ./var/lib/opkg/info/kernel-module-videobuf2-dma-sg-5.10.168-g2c23e6c538.postinst

  • Hi Mitesh,

    tisdk-base.zip

    Here Ill share my file. You only have to unzip and and continue with flashing the eMMC using USB-DFU command.

    ~ Judith

  • Thanks Judith, I will try this, however, I would like to use tisdk-default filesystem rather than tisdk-base. 

    Would you let me know how to increase the memory of the partition to make this happen?

    thanks 

  • Hi Mitesh,

    Sure, but first lets verify the process works.

    ~ Judith

  • Makes sense.

    SO I have the tisdk-base-image but it as a mount. 

    can you please explain the next steps to be taken to install or transfer this mount drive to board using DFU USB please? 

  • Hi Mitesh,

    I am not sure I understood your question correctly. But if you are not trying to flash the tisdk-base-image to eMMC via USB-DFU, please follow the steps as before:

    At U-boot prompt after USB-DFU boot:

    Hit any key to stop autoboot:  0 
    => 
    => 
    => setenv dfu_alt_info ${dfu_alt_info_emmc}
    => dfu 0 mmc 0

    Verify command above is running and go to Host PC to transfer files to eMMC:


    At Linux host machine do:

    sudo dfu-util -a tiboot3.bin.raw -D tiboot3.bin
    sudo dfu-util -a tispl.bin.raw -D tispl.bin 
    sudo dfu-util -a u-boot.img.raw -D u-boot.img
    sudo dfu-util -a rootfs -D tisdk-base.ext4

    ~ Judith

  • HI Judith,

    I have tried the steps you gave:

    Not sure how to verify the commands but the boot command ''=>" is disappeared after 'dfu 0 mmc 0' 

    and then on windows PC using DFU USB I tried the following and have error:

    .\dfu-util.exe -a .\tiboot3.bin.raw -D .\tiboot3.bin
    dfu-util 0.11

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

    Warning: Invalid DFU suffix signature
    A valid DFU suffix will be required in a future dfu-util release
    No DFU capable USB device available
    PS C:\Users\mitesh.hiran\Downloads\dfu-util-0.11-binaries.tar\dfu-util-0.11-binaries\win64>

    Where to get the 'tiboot3.bin.raw' file ? we have tiboot3.bin and used this to boot u-boot with DFU USB. 

    I am using Windows PC to run DFU USB. 

    Thanks 

  • Hi Judith,

    now I tried using Linux machine and got lot further but now memory space issue:

  • tried this from your previous messages:

    gpt write mmc 0 $partitions

    and was able to download the entire rootfs. 

    Changed boot settings to boot from eMMC restarted the evm board and connected power to J11 and got the following error:

  • Hi Mitesh,

    The final boot log is expected. We are now trying to boot with eMMC boot and we cannot find tispl.bin. Now for the images that you are flashing to eMMC which should be tiboot3.bin, tispl.bin, and u-boot.img, as well as the  tisdk-base.ext4. Please flash using the following boot loader binaries below. They have the following changes:

    diff --git a/arch/arm/mach-k3/am625_init.c b/arch/arm/mach-k3/am625_init.c
    index d103c73770..4f54eeff82 100644
    --- a/arch/arm/mach-k3/am625_init.c
    +++ b/arch/arm/mach-k3/am625_init.c
    @@ -25,6 +25,9 @@
     #define K3RTC_KICK0_UNLOCK_VALUE       0x83e70b13
     #define K3RTC_KICK1_UNLOCK_VALUE       0x95a4f1e0
     
    +/*eMMC boot mode fix*/
    +#define EMMC_BOOT      9
    +
     #if defined(CONFIG_SPL_BUILD)
     
     /*
    @@ -245,6 +248,10 @@ u32 spl_mmc_boot_mode(const u32 boot_device)
     
            switch (boot_device) {
            case BOOT_DEVICE_MMC1:
    +               if (((devstat & MAIN_DEVSTAT_PRIMARY_BOOTMODE_MASK) >>
    +                     MAIN_DEVSTAT_PRIMARY_BOOTMODE_SHIFT) == EMMC_BOOT)
    +                       return MMCSD_MODE_EMMCBOOT;
    +
                    if ((bootmode_cfg & MAIN_DEVSTAT_PRIMARY_MMC_FS_RAW_MASK) >>
                         MAIN_DEVSTAT_PRIMARY_MMC_FS_RAW_SHIFT)
                            return MMCSD_MODE_EMMCBOOT;
    diff --git a/configs/am62x_evm_a53_defconfig b/configs/am62x_evm_a53_defconfig
    index d9bf9a5b7d..f3af0a6e51 100644
    --- a/configs/am62x_evm_a53_defconfig
    +++ b/configs/am62x_evm_a53_defconfig
    @@ -82,7 +82,7 @@ CONFIG_MULTI_DTB_FIT=y
     CONFIG_SPL_MULTI_DTB_FIT=y
     CONFIG_SPL_MULTI_DTB_FIT_NO_COMPRESSION=y
     CONFIG_ENV_IS_IN_MMC=y
    -CONFIG_SYS_MMC_ENV_PART=1
    +CONFIG_SYS_MMC_ENV_PART=2
     CONFIG_NET_RANDOM_ETHADDR=y
     CONFIG_DM=y
     CONFIG_SPL_DM=y


    https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/791/1258.tiboot3.bin
    https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/791/5516.tispl.bin
    https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/791/1588.u_2D00_boot.img

    Try these out and let me know if you get passed this last error.

    ~ Judith

  • Hi Judith,

    I tried again with your version of the files but still same issue:

  • Hi Mitesh,

    Would you be able to provide a log that shows the whole process, both the usb-dfu transfer and the serial console log. Perhaps there is something we are doing wrong. Please use the images I have provided first.

    ~ Judith

  • Hello, 

    Boot settings:

    SW1 = On On Off Off On Off On Off
    SW2 = Off Off Off Off Off Off Off Off

    then did load the three files build with dfu defconfigs 

    and then used your 3 files to load on emmc

    and then changed the boot settings to 

    SW1 = On On Off On Off Off On Off
    SW2 = Off Off Off Off Off Off Off Off

    reboot system and connetc power using J11 port. 

    and then get the error mentioned before. 

    Thanks 

    U-Boot SPL 2021.01-00002-g27f28e9f8f (Jul 13 2023 - 04:14:06 -0700)
    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 ...
    Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
    Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
    Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
    Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
    Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
    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-00002-g27f28e9f8f-dirty (Jul 13 2023 - 06:06:46 -0700)
    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 ...
    
    
    U-Boot 2021.01-00002-g27f28e9f8f-dirty (Jul 13 2023 - 06:06:46 -0700)
    
    SoC:   AM62X SR1.0 GP
    Model: Texas Instruments AM625 SK
    EEPROM not available at 0x50, trying to read at 0x51
    Board: AM62-SKEVM rev E3
    DRAM:  2 GiB
    MMC:   mmc@fa10000: 0, mmc@fa00000: 1, mmc@fa20000: 2
    Loading Environment from MMC... OK
    In:    serial@2800000
    Out:   serial@2800000
    Err:   serial@2800000
    Net:   eth0: ethernet@8000000port@1
    Hit any key to stop autoboot:  0
    =>
    => mmc part
    
    Partition Map for MMC device 0  --   Partition Type: EFI
    
    Part    Start LBA       End LBA         Name
            Attributes
            Type GUID
            Partition GUID
      1     0x00000022      0x01da3fde      "rootfs"
            attrs:  0x0000000000000000
            type:   ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
            guid:   5c4a275a-0a4a-0c4c-a899-6435809a686c
    => gpt write mmc 0 $partitions
    Writing GPT: success!
    => setenv dfu_alt_info ${dfu_alt_info_emmc}
    => dfu 0 mmc 0
    ##DOWNLOAD ... OK
    Ctrl+C to exit ...
    ####DOWNLOAD ... OK
    Ctrl+C to exit ...
    ####DOWNLOAD ... OK
    Ctrl+C to exit ...
    ################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################DOWNLOAD ... OK
    Ctrl+C to exit ...
    =>
    =>
    => mmc partconf 0 1 1 1
    => mmc bootbus 0 2 0 0
    => setenv mmcdev 0
    => setenv bootpart 0
    
    

    miteshhiran@ubuntu:~$ sudo dfu-util -R -a bootloader -D /home/miteshhiran/Desktop/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 http://sourceforge.net/p/dfu-util/tickets/
    
    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%       330614 bytes
    Download done.
    state(6) = dfuMANIFEST-SYNC, status(0) = No error condition is present
    state(2) = dfuIDLE, status(0) = No error condition is present
    Done!
    dfu-util: can't detach
    Resetting USB to switch back to runtime mode
    miteshhiran@ubuntu:~$ sudo dfu-util -R -a tispl.bin -D /home/miteshhiran/Desktop/tispl.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 http://sourceforge.net/p/dfu-util/tickets/
    
    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 4096
    Copying data from PC to DFU device
    Download	[=========================] 100%       962156 bytes
    Download done.
    state(7) = dfuMANIFEST, status(0) = No error condition is present
    state(2) = dfuIDLE, status(0) = No error condition is present
    Done!
    Resetting USB to switch back to runtime mode
    miteshhiran@ubuntu:~$ sudo dfu-util -R -a u-boot.img -D /home/miteshhiran/Desktop/u-boot.img 
    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 http://sourceforge.net/p/dfu-util/tickets/
    
    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 #1 ...
    Determining device status: state = dfuIDLE, status = 0
    dfuIDLE, continuing
    DFU mode device DFU version 0110
    Device returned transfer size 4096
    Copying data from PC to DFU device
    Download	[=========================] 100%       894788 bytes
    Download done.
    state(7) = dfuMANIFEST, status(0) = No error condition is present
    state(2) = dfuIDLE, status(0) = No error condition is present
    Done!
    Resetting USB to switch back to runtime mode
    miteshhiran@ubuntu:~$ sudo dfu-util -a tiboot3.bin.raw -D /home/miteshhiran/Desktop/ti\ e2e\ forum/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 http://sourceforge.net/p/dfu-util/tickets/
    
    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 #2 ...
    Determining device status: state = dfuIDLE, status = 0
    dfuIDLE, continuing
    DFU mode device DFU version 0110
    Device returned transfer size 4096
    Copying data from PC to DFU device
    Download	[=========================] 100%       332437 bytes
    Download done.
    state(7) = dfuMANIFEST, status(0) = No error condition is present
    state(2) = dfuIDLE, status(0) = No error condition is present
    Done!
    miteshhiran@ubuntu:~$ sudo dfu-util -a tispl.bin.raw -D /home/miteshhiran/Desktop/ti\ e2e\ forum/tispl.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 http://sourceforge.net/p/dfu-util/tickets/
    
    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 #3 ...
    Determining device status: state = dfuIDLE, status = 0
    dfuIDLE, continuing
    DFU mode device DFU version 0110
    Device returned transfer size 4096
    Copying data from PC to DFU device
    Download	[=========================] 100%       965188 bytes
    Download done.
    state(7) = dfuMANIFEST, status(0) = No error condition is present
    state(2) = dfuIDLE, status(0) = No error condition is present
    Done!
    miteshhiran@ubuntu:~$ sudo dfu-util -a u-boot.img.raw -D /home/miteshhiran/Desktop/ti\ e2e\ forum/u-boot.img 
    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 http://sourceforge.net/p/dfu-util/tickets/
    
    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 #4 ...
    Determining device status: state = dfuIDLE, status = 0
    dfuIDLE, continuing
    DFU mode device DFU version 0110
    Device returned transfer size 4096
    Copying data from PC to DFU device
    Download	[=========================] 100%       894532 bytes
    Download done.
    state(7) = dfuMANIFEST, status(0) = No error condition is present
    state(2) = dfuIDLE, status(0) = No error condition is present
    Done!
    miteshhiran@ubuntu:~$ sudo dfu-util -a rootfs -D /home/miteshhiran/ti-processor-sdk-linux-am62xx-evm-08.06.00.42/filesystem/tisdk-base.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 http://sourceforge.net/p/dfu-util/tickets/
    
    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 #1 ...
    Determining device status: state = dfuIDLE, status = 0
    dfuIDLE, continuing
    DFU mode device DFU version 0110
    Device returned transfer size 4096
    Copying data from PC to DFU device
    Download	[=========================] 100%    314572800 bytes
    Download done.
    state(7) = dfuMANIFEST, status(0) = No error condition is present
    state(2) = dfuIDLE, status(0) = No error condition is present
    Done!
    miteshhiran@ubuntu:~$ 
    

  • Hi Mitesh,

    Ok, this should have worked. I am looking over the driver and will get back to you.


    Not related to this error, but you could save the U-boot environment after these commands:
    =>
    => mmc partconf 0 1 1 1
    => mmc bootbus 0 2 0 0
    => setenv mmcdev 0
    => setenv bootpart 0

    => saveenv

    To boot the correct rootfs in eMMC after reboot.

    ~ Judith

  • was thinking to add that :) 

  • Hi Mitesh,

    Can you try to flash to eMMC the following binaries:
    https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/791/0702.tiboot3.bin
    https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/791/4150.tispl.bin

    https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/791/5582.u_2D00_boot.img
    I believe I replicated your issue and these binaries worked for me.
    ~ Judith

  • This worked!!! Thanks. 

    Can you tell me please, what changes I will need to do to get this working on my side?

    Thanks 

  • Hi Mitesh,

    There are two patches you must add. Here are the diffs:

    1. USB-DFU workaround found here: software-dl.ti.com/.../Release_Specific_Workarounds.html for boot via USB-DFU:

    diff --git a/include/configs/am62x_evm.h b/include/configs/am62x_evm.h
    index 97bd7c1fd7..992294acfe 100644
    --- a/include/configs/am62x_evm.h
    +++ b/include/configs/am62x_evm.h
    @@ -504,7 +504,7 @@
     
     #endif
     
    -#ifdef CONFIG_TARGET_AM625_A53_EVM
    +#if defined(CONFIG_TARGET_AM625_A53_EVM) || defined(CONFIG_SPL_DFU)
     #define EXTRA_ENV_DFUARGS \
            DFU_ALT_INFO_MMC \
            DFU_ALT_INFO_EMMC \
    


    2. The Fix eMMC patch that I had previously provided, for images you are flashing to eMMC. The first time I sent the wrong binaries, but this patch works.
    diff --git a/arch/arm/mach-k3/am625_init.c b/arch/arm/mach-k3/am625_init.c
    index d103c73770..4f54eeff82 100644
    --- a/arch/arm/mach-k3/am625_init.c
    +++ b/arch/arm/mach-k3/am625_init.c
    @@ -25,6 +25,9 @@
     #define K3RTC_KICK0_UNLOCK_VALUE       0x83e70b13
     #define K3RTC_KICK1_UNLOCK_VALUE       0x95a4f1e0
     
    +/*eMMC boot mode fix*/
    +#define EMMC_BOOT      9
    +
     #if defined(CONFIG_SPL_BUILD)
     
     /*
    @@ -245,6 +248,10 @@ u32 spl_mmc_boot_mode(const u32 boot_device)
     
            switch (boot_device) {
            case BOOT_DEVICE_MMC1:
    +               if (((devstat & MAIN_DEVSTAT_PRIMARY_BOOTMODE_MASK) >>
    +                     MAIN_DEVSTAT_PRIMARY_BOOTMODE_SHIFT) == EMMC_BOOT)
    +                       return MMCSD_MODE_EMMCBOOT;
    +
                    if ((bootmode_cfg & MAIN_DEVSTAT_PRIMARY_MMC_FS_RAW_MASK) >>
                         MAIN_DEVSTAT_PRIMARY_MMC_FS_RAW_SHIFT)
                            return MMCSD_MODE_EMMCBOOT;
    diff --git a/configs/am62x_evm_a53_defconfig b/configs/am62x_evm_a53_defconfig
    index d9bf9a5b7d..f3af0a6e51 100644
    --- a/configs/am62x_evm_a53_defconfig
    +++ b/configs/am62x_evm_a53_defconfig
    @@ -82,7 +82,7 @@ CONFIG_MULTI_DTB_FIT=y
     CONFIG_SPL_MULTI_DTB_FIT=y
     CONFIG_SPL_MULTI_DTB_FIT_NO_COMPRESSION=y
     CONFIG_ENV_IS_IN_MMC=y
    -CONFIG_SYS_MMC_ENV_PART=1
    +CONFIG_SYS_MMC_ENV_PART=2
     CONFIG_NET_RANDOM_ETHADDR=y
     CONFIG_DM=y
     CONFIG_SPL_DM=y
    

    ~ Judith

  • Also another thing I forgot to mention:

    USB-DFU boot at U-boot prompt:

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

    # Change boot mode to eMMC boot

    eMMC boot at U-boot prompt:
    => setenv mmcdev 0
    => setenv bootpart 0
    => saveenv

    This is the correct flow.

    ~ Judith

  • Thanks. I will try this and update you. 

    In terms of switching to SD card boot after flashing eMMC, do we need to change uboot env? 

    the following to something else for booting from sd card?

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

    # Change boot mode to eMMC boot

    eMMC boot at U-boot prompt:
    => setenv mmcdev 0
    => setenv bootpart 0