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/AM3352: About Uniflash for eMMC programming by using USB0 and the progress is 0%

Part Number: AM3352
Other Parts Discussed in Thread: UNIFLASH,

Tool/software: Linux

Hi Sir 

We use AM3352 PG2.1 with latest SDK. And we would like to use uniflash to program emmc and the progress is 0%. we analyzed the opentftp log and found the transmission for u-boot-spl-restore.bin is completed.

And there is no UART output from MB

(1) MB Setting Status

      a. refer to BBB design and USB0 is OTG mode.  Sysboot is MMC1 / MMC0 / UART0 / USB0,

      b. SDK version is Processor-SDK-Linux-AM335X 05_01_00_11. UBOOT used am335x_evm_deconfig to generate MLO/u-boot.img/u-boot.dtb and put them in SDCard (MMC0).

          It can boot successfully and go into kernel stage. 

     c. Uniflash version is 3.4

     d.the tftp folder of uniflash includes u-boot-spl-restore.bin 、u-boot-restore.img 、u-boot-restore.dtb、zImage、am335x_evmsk.dtb、debrick.sh、boot_partition.tar.gz、rootfs_partition.tar.gz

(2) Question about Uniflash 

    a, the content of emmc is empty. And we unplug emmc.  Turn on the MB and we found the Ethernet device from PC device manager. And then we set the IP as 192.168.2.1

    b. in Unilfash , we set DHCP 192.168.2.1,TFTP Server为192.168.2.1. And then Start Flash. And we found the target device (IP 192.168.2.2)

    c.the progress is always 0%. open opentftp log to do analysis.  We found it finished "Client 192.168.2.2:1234 C:\AM335x_Flashtool\images\u-boot-spl-restore.bin, 208 Blocks Served".

      And then there is no response. No console output.

    d.We saw the IP of target board was still 192.168.2.1

(3) Analysis

    a. after sending u-boot-spl-restore.bin from PC to MB, it should be able to see the console output message. But there is no message output. 

    b. It seems u-boot-spl-restore doesn't run. But we try this image by using SD-Card. It can boot well with message output.

 

please advise and thanks.

  • Sam,

    Can you please try the prebuilt MLO that is in the board support/prebuilt-images directory of the SDK. I just booted it and confirmed it boots for me.

    Thanks.
  • Hi Sir

    Do you mean we can use prebuilt-image  MLO for uniflash ? 

    And I just re-name the file from MLO to u-boot-spl-restore.bin ?

    BR

    Yimin

  • Yimin,

    Sorry, I should have been more clear. You can use the prebuilt SPL binary, u-boot-spl.bin-am335x-evm, which you should rename appropriately (u-boot-spl-restore.bin). And yes, that should boot over USB and go fetch U-Boot via TFTP. You can also use the prebuilt U-Boot image, u-boot-am335x-evm.img for U-Boot. This should get you to a U-Boot prompt where you can do a lot of powerful things to validate the next steps in the process.

    I hope this is more clear and I apologize again for any confusion I caused.
  • Hi Sir

    thanks for your reply.

    Do you mean I can use latest SDK to build MLO/U-boot image without doing any modification ( like use am335x_evm_usbspl_tftpboot_config).

    And then it can be used to boot over USB as you described ?

    If not, could you offer the detailed SOP how to build SPL/uboot image which can support USB boointg (with TFTP)

    BR
    Yimin
  • Hi SIr 

    update the debug progress.

    We can use uniflash to do USB booting but it hangs in kernel 

    below is the log message

    Uniflash_Log.TXT

    The log message shows  it hangs in starting kernel.  System will reboot after 10 seconds

    a. in uboot configuration

       a-1 set CONFIG_OF_EMBED=y

       a-2 set CONFIG_BOOTCOMMAND="if test ${boot_fit} -eq 1; then run update_to_fit; fi; setenv fdtfile am335x-evmsk.dtb; setenv bootargs 'console=ttyS0,115200n8 earlyprintk';setenv console ttyS0,115200n8;

             setenv autoload no; setenv ethact usb_ether; dhcp; tftp 0x82000000 zImage; tftp 0x88000000 am335x-evmsk.dtb; bootz 0x82000000 - 0x88000000;"

       a-3 extend USB RNDIS connection time from 3s ->90s

       a-4 use am335x_evm_defconfig

    b. in uniflash

       b-1 : set  DHCP/tftp server IP:192.168.2.1

       b-2 : put all necessary file in the folder

         

      c. the issue description 

          c-1: zImage/am335x-evmsk.dtb file can download from tftp to system. use bootz to activate kernel. it hangs in starting kernel. there is message output. 

          c-2: the log is attached.

    please advise and thanks.

    BR
    Yimin

     

  • Hi Sir

    Do you have any update

  • Yimin,

    This is usually a problem with console or dtb file. Can you please confirm that your bootargs are similar as the functional SD Card case? Also, is the same dtb file being used in both?

    Please confirm.
  • Thanks

    this issue is fixed due to kerenl image size issue.
  • Yimin,

    Thanks so much for getting back. So, the zImage was too large and led to overwriting the DTB file? So, you needed to move the DTB file load address to a larger address to give more room for the zImage?

    Thanks again!