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.

Linux: DFU fails in USB Peripheral boot mode

Other Parts Discussed in Thread: AM5718, AM4377

Tool/software: Linux

Hi Ti:

We want to download u-boot to a empty emmc on AM5718.

We follow sop below.

Build u-boot-spl.img and do it below.

sudo ./usbboot-stand-alone -S u-boot-spl.bin
sudo ./dfu-util c 1 -i 0 -a 0 -D "u-boot.img" -R

After we execute ./dfu-util c 1 -i 0 -a 0 -D "u-boot.img" -R, we can't see u-boot up.

And we can't enter any command too.

Can you help to check it the root cause?

host.log
ompany@ubuntu:~/Workspace2/ti/usb_download$ sudo ./usbboot-stand-alone -S u-boot-spl.bin
reading ASIC ID
CHIP: 4a45
rom minor version: 01
IDEN: 0000000000000000000000000000000000000000
MPKH: 0000000000000000000000000000000000000000000000000000000000000000
CRC0: d017dd32
CRC1: 00000000
device is GP
sending 2ndstage to target...
company@ubuntu:~/Workspace2/ti/usb_download$ sudo ./dfu-util c 1 -i 0 -a 0 -D "u-boot.img" -R
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:5678
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%       497679 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

uart.log
U-Boot SPL 2017.01-g9a905f8-dirty (Dec 06 2017 - 05:44:16)
DRA722-GP ES2.0
Trying to boot from DFU
Using default environment

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

DarkHou

  • Why u-boot-spl.bin? This is used for UART boot only.

  • Hi Biser:
    AM5718 support full usb download
    The SOP is below.
    It should can boot up u-boot from SPL-DFU.
    But we failed followed by SOP.

    SOP:
    processors.wiki.ti.com/.../Linux_Core_U-Boot_User's_Guide

    USB Peripheral boot mode on DRA7x/AM57x (SPL-DFU support)

    The USB Peripheral boot mode is used to boot DRA7x EVM using USB interface using SPL-DFU feature. Same steps could be used on an AM57x SoC where board support USB peripheral boot mode.

    Enable the SPL-DFU feature in u-boot and build MLO/u-boot binaries.
    Load the MLO and u-boot.img using the dfu-util from host PC.
    Once the u-boot is up, use DFU command from u-boot to flash the binary images from Host PC (using dfu-utils tool) to the eMMC, or QSPI to fresh/factory boards.

    Example provided here is for dra7xx platform.

    Use default "dra7xx_evm_defconfig" to build spl/u-boot-spl.bin, u-boot.img.

    host$ make dra7xx_evm_defconfig
    host$ make menuconfig

    select SPL/DFU support
    menuconfig->SPL/TPL--->
    ..
    [*] Support booting from RAM
    [*] Support USB Gadget drivers
    [ ] Support USB Ethernet drivers
    [*] Support DFU (Device Firmware Upgrade)
    DFU device selection (RAM device) -->

    Unselect CONFIG_HUSH_PARSER
    menuconfig--->Command Line interface
    [*] Support U-boot commands
    [ ] Use hush shell

    Build spl/u-boot-spl.bin and u-boot.img

    host$ make

    Set SYSBOOT SW2 switch to USB Peripheral boot mode

    SW2[7..0] = 00010000 (refer to TRM for various booting order)

    Connect EVM Superspeed port (USB1 port) to PC (Ubuntu) through USB cable.
    From Ubuntu (or the host) PC, fetch and build usbboot application. usbboot pre-built binaries for particular distributions may be available in processor SDK already. Here are the steps to build usbboot application.

    host$ git clone git://git.omapzoom.org/repo/omapboot.git
    host$ cd omapboot
    host$ checkout 609ac271d9f89b51c133fd829dc77e8af4e7b67e
    host$ make -C host/tools

    This results in host side tool called usbboot-stand-alone

    For loading spl/u-boot-spl.bin to EVM, issue the command below and reset the board.

    host$ sudo usbboot-stand-alone -S spl/u-boot-spl.bin

    Load the u-boot.img to RAM.

    host$ sudo dfu-util -l

    Found DFU: [0451:d022] devnum=0, cfg=1, intf=0, alt=0, name="kernel"
    Found DFU: [0451:d022] devnum=0, cfg=1, intf=0, alt=1, name="fdt"
    Found DFU: [0451:d022] devnum=0, cfg=1, intf=0, alt=2, name="ramdisk"

    host$ sudo dfu-util c 1 -i 0 -a 0 -D "u-boot.img" -R

    Now EVM will boot to u-boot prompt.

    Best Reg
  • It doesn't solve my problem.
    I follow sop.
    But when I do sudo dfu-util c 1 -i 0 -a 0 -D "u-boot.img" -R.
    The u-boot image can't run on the target.
    I don't know why.
    DarkHou
  • I am not sure either why the downloaded u-boot.img doesn't run on the board. but comparing your host log with the video in the link I referred above, your dfu-util version is v0.9, but the one used in the video is v0.5 which comes with Ubuntu v14.04.

    And your host log has the following message but the referred video doesn't. So I am wondering if it is because of the tool version. Is it possible for you to test with Ubuntu 14.04 host PC?

    dfu-util: Invalid DFU suffix signature
    dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!
  • Have you got the test result with Ubuntu 14.04 (or dfu-util v0.5) yet?
  • Not yet,

    We will test it later

  • Hi Bin,

    I am trying the same thing on IDK-AM4377 i.e flashing the binaries on qspi using DFU.
    Can you tell me how to put the board in usb boot mode as I don't have jumper settings here.Referring to your tutorial - https://training.ti.com/am57x-dra7x-dfu-boot-mode-with-linux-host

    BR,Abhinav

  • Abhinav,

    I don't think AM4377 ROM supports DFU. The tutorial video you referred doesn't apply to AM437x.

    By the way, please open a new forum thread when you have a new query, which will expose it to a much wider audience, so you get responses much quickly.

  • Thanks Bi for the prompt reply. I need fast response for the same and that's why commented on this discussion.Though created two new discussions.Please share your views

    e2e.ti.com/.../660645

    e2e.ti.com/.../660644

    BR,Abhinav
  • Abhinav,

    I replied both new threads. Please update them if you have further questions. I am closing this thread.