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.

AM3358: How to use Uniflash with Processor SDK 5.02?

Part Number: AM3358
Other Parts Discussed in Thread: UNIFLASH

The user guide in 3.5.2.2. Sitara Uniflash did not tell how to patch the Processor SDK to build u-boot-restore.img and u-boot-spl-restore.bin to works with uniflash.

http://software-dl.ti.com/processor-sdk-linux/esd/docs/latest/linux/Foundational_Components_Tools.html#flash-tools

And the Patch URL in the hyperlink is broken:

I was told the Processor SDK works with Uniflash in default, So I rename u-boot.img to u-boot-restore.img, rename u-boot-spl.bin to u-boot-spl-restore.bin, and put them under uniflash tftp folder, power on the board get below console output:

  

  • Forgot to mention, this customer wants to flash eMMC.
  • Tony,

    Is this a TI EVM or custom board?

    If it is a custom board, what has been done to validate USB before trying this?

    Thanks.
  • Ron,

    I did it on Startkit.

    it is same as customer's observation, from the console, we can see SPL downloaded to board and run already, I don't think it related to USB communication. 

    From the log, seems the SPL does't support the feature in default as you mentioned before.

    If anybody validated it before, please show me the log if have.

    Thanks.

  • Tony,

    Yes, I do it quite frequently on a Beaglebone Black. Just to double check things, I did it on a starterkit as well and you can see the log from boot to a U-Boot prompt, which is what I indicated is supported, here:

    => CCCCCCCC
    U-Boot SPL 2018.01-g313dcd69c2 (Dec 16 2018 - 09:01:09)
    Trying to boot from USB eth
    ** Bad device mmc 0 **
    Using default environment

    <ethaddr> not set. Validating first E-fuse MAC
    Could not get PHY for cpsw: addr 0
    cpsw, usb_ether
    Error: usb_ether address not set.

    using musb-hdrc, OUT ep1out IN ep1in STATUS ep2in
    MAC c4:ed:ba:8b:28:51
    HOST MAC de:ad:be:ef:00:00
    RNDIS ready
    musb-hdrc: peripheral reset irq lost!
    high speed config #2: 2 mA, Ethernet Gadget, using RNDIS
    USB RNDIS network up!
    BOOTP broadcast 1
    BOOTP broadcast 2
    BOOTP broadcast 3
    BOOTP broadcast 4
    DHCP client bound to address 192.168.2.17 (1776 ms)
    Using usb_ether device
    TFTP from server 192.168.2.1; our IP address is 192.168.2.17
    Filename 'u-boot-restore.img'.
    Load address: 0x82000000
    Loading: #################################################################
    ##############################################################
    2 MiB/s
    done
    Bytes transferred = 648000 (9e340 hex)


    U-Boot 2018.01-g9d984f4548 (Apr 06 2019 - 07:42:30 +0000)

    CPU : AM335X-GP rev 2.1
    Model: TI AM335x EVM-SK
    DRAM: 256 MiB
    NAND: 0 MiB
    MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
    ** Bad device mmc 0 **
    Using default environment

    <ethaddr> not set. Validating first E-fuse MAC
    Net: Could not get PHY for cpsw: addr 0
    cpsw, usb_ether
    Hit any key to stop autoboot: 0
    =>

    This is using the prebuilt images from the board-support/prebuild-images folder in the SDK, v5.02. I copied the below files:

    sudo cp u-boot-spl.bin-am335x-evm /tftpboot/u-boot-spl-restore.bin
    sudo cp u-boot-am335x-evm.img /tftpboot/u-boot.img

    As you can see this gets me to a U-Boot prompt.

    I'm sorry you are having trouble, but yes this has been verified.
  • Ron,

    Thanks. I follow steps as yours, got same result, seems I found the issue, it may due to host WIN7 did not response DHCP  request in time. are you using Linux as host? Would you please verify it on Window PC host?

    U-Boot SPL 2018.01-g313dcd69c2 (Dec 16 2018 - 09:01:09)
    Trying to boot from USB eth
    ** Bad device mmc 0 **
    Using default environment

    <ethaddr> not set. Validating first E-fuse MAC
    cpsw, usb_ether
    Error: usb_ether address not set.

    using musb-hdrc, OUT ep1out IN ep1in STATUS ep2in
    MAC c8:a0:30:b0:22:02
    HOST MAC de:ad:be:ef:00:00
    RNDIS ready
    musb-hdrc: peripheral reset irq lost!
    cpsw Waiting for PHY auto negotiation to complete......... TIMEOUT !
    Problem booting with BOOTP
    SPL: failed to boot from all boot devices
    ### ERROR ### Please RESET the board ###

    There should be another Ethernet connection in below snapshot as when I verify this with ti-sdk6, 

  • Tony,

    Yes, I used Linux as I was just trying to validate that the Prebuilt Images do indeed boot over USB (shouldn't matter if Linux or Windows (Uniflash)).

    Yes, I could see the problem you are seeing coming from the host not replying to BOOTP messages, causing BOOTP to fail. You are highlighting CPSW in the above, but if you are still using the Starterkit, I believe it will only boot over USB. I used USB in my case. It doesn't appear that you are getting either of the USB ethernet interfaces to show up. That could certainly cause a problem.

    What version of Windows are you using? I know of issues with Windows 10 and RNDIS problems. This is more on the host side and a bit outside of our control as we rely on Windows to associate the AM335x with RNDIS and load the Microsoft provided RNDIS driver.

    You can use Wireshark to validate that the target is indeed sending BOOTP messages.

    I hope this is helpful.
  • Tony,

    I pulled out my Windows test machine to make sure that the current prebuilt images do indeed work from Uniflash on Windows and was able to boot to a prompt successfully:

    U-Boot SPL 2016.05-00304-gad06f64-dirty (Sep 11 2017 - 11:06:42)
    Trying to boot from USB eth
    Using default environment

    usb_ether
    Error: usb_ether address not set.

    using musb-hdrc, OUT ep1out IN ep1in STATUS ep2in
    MAC 38:d2:69:62:73:e2
    HOST MAC de:ad:be:af:00:00
    RNDIS ready
    musb-hdrc: peripheral reset irq lost!
    high speed config #2: 2 mA, Ethernet Gadget, using RNDIS
    USB RNDIS network up!
    BOOTP broadcast 1
    BOOTP broadcast 2
    BOOTP broadcast 3
    BOOTP broadcast 4
    BOOTP broadcast 5
    DHCP client bound to address 192.168.2.5 (3992 ms)
    Using usb_ether device
    TFTP from server 192.168.2.1; our IP address is 192.168.2.5
    Filename 'u-boot-restore.img'.
    Load address: 0x807fffc0
    Loading: #############################
    930.7 KiB/s
    done
    Bytes transferred = 415764 (65814 hex)


    U-Boot 2016.05-00304-gad06f64-dirty (Sep 11 2017 - 11:06:42 -0500)

    CPU : AM335X-GP rev 2.1
    Watchdog enabled
    I2C: ready
    DRAM: 512 MiB
    NAND: 0 MiB
    MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
    Card did not respond to voltage select!
    ** Bad device mmc 0 **
    Using default environment

    <ethaddr> not set. Validating first E-fuse MAC
    Net: cpsw, usb_ether
    Hit any key to stop autoboot: 0

    I hope this is helpful to you.
  • Tony,

    I was wrong. The image I used above was from a much older SDK. I apologize. I've reproduced what you are seeing and will try to figure out what is going on and get back to you.
  • Tony,

    It seems that the timing has changed and it is now very difficult to get the Windows driver installed for the second (SPL/U-Boot) USB RNDIS networking device. 

    As a workaround, I changed the U-Boot config to use the same VID/PID as the ROM and it associated the driver much better. Here's what I changed in the config:

    This allowed me to boot from Uniflash on a Widows machine using Processor SDK v5.02.

    Could you please try this and see if it solves the problem for you as well? Thank you.

  • Ron,

    It works.

    Would you please update the USB configuration to Processor SDK user guide, and remove outdated uniflash user guide in the PSDK user guide, it lead to misunderstanding.

  • Tony,

    Absolutely, it is clearly on our to do list. I'm sorry it caused you trouble

    Thanks.