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.

AM437x Uniflash questions

Other Parts Discussed in Thread: UNIFLASH

Hi All,


I am trying to flash SPL and u-boot flasher images onto the target by using the Ethernet interface and AM437x boot ROM code by changing the sysboot mode settings on both AM437x GP-EVM target and AM437x EVK platforms.

Here I am using the Uniflash tool for download the SPL and u-boot flasher images using the Ethernet interface. But it was failing to load this images. I have followed the below link to use and flash images using the Uniflash tool.

processors.wiki.ti.com/.../Sitara_Uniflash_Quick_Start_Guide

I have followed the below link to generate SPL and u-boot flasher images. In this link mentioned that patch (AM437x - [U-Boot Patch to Add TFTP Boot Configurations]) need to be apply to support flasher images (SPL, u-boot) for Ethernet/USB boot-mode, but this patch was not matching with the u-boot source which referred in the same link.

Example: From the patch one file is does not exit in the u-boot source, i.e "boards.cfg".

processors.wiki.ti.com/.../Sitara_Uniflash_Flash_Programming_with_Linux

I want to understand is there any u-boot source that can be download and use for flasher images instead of regular git u-boot source as mentioned in below link.

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

Could you please any one suggest me,

1. From where do I get the compatible working u-boot source for AM437x to generate SPL and u-boot flasher images.

2. Reference links which guide me the proper way to generate SPL flasher images for AM437x target platform and flash onto the target using the Uniflash tool(using interface Ethernet).

I appreciate your support on this.

Thanks for support in advance.

Thanks & Regards

Ch. Siva

  • Hi,

    Please check the AM437x Silicon Revision on your boards. Peripheral boot is not supported on SR1.1 devices (AM437x Errata Advisory 10).
  • Hi Biser,

    Thanks for your quick response.

    By the way I am using the silicon revision 1.2 not 1.1. And as per the errata this AM437x Silicon Revision (1.2) supports the peripheral boot mode support.

    On the AM437x SOC I have found the silicon details number as "AM4378BZDN100", it gives me confirmation that it is the silicon revision 1.2.

    Could you please suggest me from where do I get below things for AM437x platform.

    1. From where do I get the compatible working u-boot source for AM437x to generate SPL and u-boot flasher images.

    2. Reference links which guide me the proper way to generate SPL flasher images for AM437x target platform and flash onto the target using the Uniflashtool(using interface Ethernet).

    For your information, I want to validate this process on AM437x development platform before going to my custom board of AM437x.

    I appreciate your support on this.

    Thanks for support in advance.

  • siva ch61,

    I will help develop an example for you to work with. I need to base the code off of the latest Processor SDK, 3.0.0.4.

    You mentioned you want to use ethernet to boot from, which is fine.

    What type of memory do you want to program (NAND, QSPI, eMMC, etc.)?

    Thank you.

  • Hi Ron,

    Thanks for your support.

    You mean, Latest processor SDK 3.0.0.4 supports the flasher image boot u-boot source?

    I am plan to use NAND and eMMC memory devices to flash bootable images(u-boot, zImage, filesystem) using the flasher images through Ethernet interface.

    I was struck at this point and not able to proceed further.

    Thanks in Advance for your support.

    Thanks & Regards
    Ch. Siva
  • Hi Ron,

    Still I am facing this issue on AM437x GP EVM development platform and my custom target. Here I want to flash flasher images (u-boot, spl) into NAND flash.
    Are you able to flash flasher images onto the AM437x development platform using the Uniflash tool(Ethernet interface)?

    I am struck at this point and not able to proceed with my development.
    We appreciate your timely support on this.

    Thanks & Regards
    Ch. Siva
  • Ch. Siva,

    I am able to boot the EVM over Ethernet and flash the NAND and boot from the NAND.

    Let's start with getting you to a U-Boot prompt as that is usually the hardest part by far.

    I don't use Uniflash as I work on a Linux box daily and it works better for me. However, the TFTP server is really irrelevant and getting Uniflash to work once the process is nailed down is usually not a problem.

    Here are the steps I follow to get to a U-Boot prompt:

    1. Connect the EVM to a 10/100 network. Their is a known issue preventing the EVM from booting on a Gigabit network. I use linux commands to set the interface on my Linux host to 10/100 only, but you could also use a 10/100 switch.
    2. Build U-Boot using am43xx_evm_ethboot_config
    3. Copy MLO and u-boot.img to tftp directory (usually tftpboot on Linux).
    4. Set the SYSBOOT switch settings (SW12) on the EVM to 00111 (“0” is set switch in the “up” position or on, while “1” is “down” or off.)
    5. Power on the EVM.
    6. Use any key to halt U-Boot at the prompt to enter the instructions to program the NAND.
    7. If you don't get to a U-Boot prompt, double-check everything and use Wireshark to see if you are getting BOOTP requests from the EVM.
    8. If you are, double-check your TFTP server settings on the host.

    I would highly recommend getting this process to work using an EVM, then moving on to your custom boards.

  • Hi Ron,

    As you mentioned Ethernet speed concern b/w EVM and Linux PC.
    I have changed the Ethernet speed of the LAN card of PC using the Ethernet tool for 10Mbps and 100Mbps as shown below.

    1. sudo ethtool -s eth0 speed 100 duplex full
    2. sudo ethtool -s eth0 speed 10 duplex full

    But Still I am observing that the target not sending the BOOTP request to Linux PC to get IP address. Here I am using the wire-shark to capture it.
    Could you please let us know is there any changes need to be done for the AM437x EVK target(like Ethernet speed).

    I would like to update you that, With my custom board I am able to get the IP address with out any PC limitations(Ethernet speed).
    And with my custom board I am facing the SPL/u-boot issue.

    We will appreciate your support on this.

    Thanks & Regards
    Ch. Siva
  • Ch. Siva,

    Here are some more details on the EVM and why it doesn't reliably boot over a Gigabit ethernet connection.

    There is an issue with the AM437x ROM and the GP EVM Ethernet pin strapping. If you try to connect to a 1G capable remote PHY, the ROM (which can only boot in 10/100 modes) will attempt to disable advertisement of 1G, full duplex (which it does), but it does not disable advertisement of 1G, half duplex (which the Ethernet Controller does not support).  Thus the link is established at 1G, half duplex, and ROM can’t send out BOOTP.  The EVM errata workaround straps the PHY so that it precludes the 1G, half duplex mode.  Thus, the link successfully establishes back down to 100M and the ROM can successfully transmit BOOTP.

    If you'd like to modify your board to change this, simply install R437, remove R438 to change the strapping. This will be fixed in a future EVM.

    As a work around using a 10/100 switch will reliably make sure the ROM can boot as well.

    I would also recommend a similar fix for your customer board.

  • Hi Ron,

    Thanks for your valuable support!!

    Now we are able to see the BOOTP request message from the AM437x EVK board by configuring the ethernet speed at 10Mbps at host side and with proper DIP switch settings.

    But now we are observing the issue while SPL execution on EVK, For your reference I have copied the console log information below.
    Could you please have a look and suggest how can we override this issue and get the u-boot console.

    =~=~=~=~=~=~=~=~=~=~=~= PuTTY log 2016.08.23 21:27:41 =~=~=~=~=~=~=~=~=~=~=~=

    U-Boot SPL 2016.05-00230-g5bf448d-dirty (Aug 03 2016 - 16:25:11)
    Trying to boot from net
    Using default environment

    <ethaddr> not set. Validating first E-fuse MAC
    cpsw
    cpsw Waiting for PHY auto negotiation to complete...... done
    link up on port 0, speed 10, full 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
    Problem booting with BOOTP
    SPL: failed to boot from all boot devices
    ### ERROR ### Please RESET the board ###


    Thanks & Regards
    Ch. Siva

  • Ch. Siva,

    Is this with LInux or Uniflash (Windows) as the host? Can you please use Wireshark to see if the host is seeing the BOOTP messages? If so, it seems like something is amiss with the DHCP/TFTP server.

  • Hi Ron,

    Here I am using the Linux setup for load the Flasher images.

    I have observed the BOOTP message coming from the AM437x EVM and Linux host able to assign the IP to target.

    Here TFTP server also working fine because AM437x target able to load the "u-boot-spl-restore.bin" form TFTP server path and executing as shown above log.

    I am observing the issue to load u-boot-restore.bin" to execute from the above log.

    You mean, after u-boot-spl-restore.bin execution will target sends BOOTP requests?

    I am attaching the dhcp configuration file which I am using at our side, please have a look and let us know is there any addition configurations need to be done. 

    In this configuration I am using the "host am437x_evm" section.

    dhcpd_conf.txt.txt
    #
    # Sample configuration file for ISC dhcpd for Debian
    #
    # Attention: If /etc/ltsp/dhcpd.conf exists, that will be used as
    # configuration file instead of this file.
    #
    #
    
    # The ddns-updates-style parameter controls whether or not the server will
    # attempt to do a DNS update when a lease is confirmed. We default to the
    # behavior of the version 2 packages ('none', since DHCP v2 didn't
    # have support for DDNS.)
    ddns-update-style none;
    
    # option definitions common to all supported networks...
    #option domain-name "example.org";
    #option domain-name-servers ns1.example.org, ns2.example.org;
    
    #default-lease-time 600;
    #max-lease-time 7200;
    
    # If this DHCP server is the official DHCP server for the local
    # network, the authoritative directive should be uncommented.
    #authoritative;
    
    # Use this to send dhcp log messages to a different log file (you also
    # have to hack syslog.conf to complete the redirection).
    log-facility local7;
    
    # No service will be given on this subnet, but declaring it helps the 
    # DHCP server to understand the network topology.
    
    #subnet 10.152.187.0 netmask 255.255.255.0 {
    #}
    
    # This is a very basic subnet declaration.
    
    #subnet 10.254.239.0 netmask 255.255.255.224 {
    #  range 10.254.239.10 10.254.239.20;
    #  option routers rtr-239-0-1.example.org, rtr-239-0-2.example.org;
    #}
    
    # This declaration allows BOOTP clients to get dynamic addresses,
    # which we don't really recommend.
    
    #subnet 10.254.239.32 netmask 255.255.255.224 {
    #  range dynamic-bootp 10.254.239.40 10.254.239.60;
    #  option broadcast-address 10.254.239.31;
    #  option routers rtr-239-32-1.example.org;
    #}
    
    # A slightly different configuration for an internal subnet.
    #subnet 10.5.5.0 netmask 255.255.255.224 {
    #  range 10.5.5.26 10.5.5.30;
    #  option domain-name-servers ns1.internal.example.org;
    #  option domain-name "internal.example.org";
    #  option routers 10.5.5.1;
    #  option broadcast-address 10.5.5.31;
    #  default-lease-time 600;
    #  max-lease-time 7200;
    #}
    
    # Hosts which require special configuration options can be listed in
    # host statements.   If no address is specified, the address will be
    # allocated dynamically (if possible), but the host-specific information
    # will still come from the host declaration.
    
    #host passacaglia {
    #  hardware ethernet 0:0:c0:5d:bd:95;
    #  filename "vmunix.passacaglia";
    #  server-name "toccata.fugue.com";
    #}
    
    # Fixed IP addresses can also be specified for hosts.   These addresses
    # should not also be listed as being available for dynamic assignment.
    # Hosts for which fixed IP addresses have been specified can boot using
    # BOOTP or DHCP.   Hosts for which no fixed address is specified can only
    # be booted with DHCP, unless there is an address range on the subnet
    # to which a BOOTP client is connected which has the dynamic-bootp flag
    # set.
    #host fantasia {
    #  hardware ethernet 08:00:07:26:c0:a5;
    #  fixed-address fantasia.fugue.com;
    #}
    
    # You can declare a class of clients and then do address allocation
    # based on that.   The example below shows a case where all clients
    # in a certain class get addresses on the 10.17.224/24 subnet, and all
    # other clients get addresses on the 10.0.29/24 subnet.
    
    #class "foo" {
    #  match if substring (option vendor-class-identifier, 0, 4) = "SUNW";
    #}
    
    #shared-network 224-29 {
    #  subnet 10.17.224.0 netmask 255.255.255.0 {
    #    option routers rtr-224.example.org;
    #  }
    #  subnet 10.0.29.0 netmask 255.255.255.0 {
    #    option routers rtr-29.example.org;
    #  }
    #  pool {
    #    allow members of "foo";
    #    range 10.17.224.10 10.17.224.250;
    #  }
    #  pool {
    #    deny members of "foo";
    #    range 10.0.29.10 10.0.29.230;
    #  }
    #}
    default-lease-time 600;
    max-lease-time 7200;
    option subnet-mask 255.255.255.0;
    option broadcast-address 192.168.1.255;
    option routers 192.168.1.254;
    option domain-name-servers 192.168.1.1, 192.168.1.2;
    option domain-name "mugunthan.com";
    
    subnet 192.168.1.0 netmask 255.255.255.0 {
    #range dynamic-bootp 192.168.1.40 192.168.1.60;
    range 192.168.1.10 192.168.1.100;
    range 192.168.1.150 192.168.1.200;
    }
    
    host am43xxx_evm {
      hardware ethernet 34:b1:f7:3d:bb:40;
      fixed-address 192.168.1.5;
      if substring (option vendor-class-identifier, 0, 10) = "AM43xx ROM" {
        filename "u-boot-spl-restore.bin";
      } elsif substring (option vendor-class-identifier, 0, 17) = "AM43xx U-Boot SPL" {
        filename "u-boot-restore.img";
      } else {
        filename "zImage";
      }
    }
    
    host am43xxx_evm_sk {
      hardware ethernet 34:b1:f7:3d:c1:3d;
      fixed-address 192.168.1.6;
      if substring (option vendor-class-identifier, 0, 10) = "AM43xx ROM" {
        filename "u-boot-spl-restore.bin";
      } elsif substring (option vendor-class-identifier, 0, 17) = "AM43xx U-Boot SPL" {
        filename "u-boot-restore.img";
      } else {
        filename "zImage";
      }
    }
    
    host am437x_evm {
      #hardware ethernet 34:b1:f7:3d:b5:e5;
      #hardware ethernet 68:9e:19:ba:b0:de;
      #hardware ethernet 68:9e:19:ba:6d:b2;
      hardware ethernet c4:be:84:cc:80:e9;
    fixed-address 192.168.1.7;
      if substring (option vendor-class-identifier, 0, 10) = "AM43xx ROM" {
        filename "u-boot-spl-restore.bin";
      } elsif substring (option vendor-class-identifier, 0, 17) = "AM43xx U-Boot SPL" {
        filename "u-boot-restore.img";
      } else {
        filename "zImage";
      }
    }
    
    host am437x_evm_1 {
      hardware ethernet 34:b1:f7:31:09:e8;
      fixed-address 192.168.1.9;
      if substring (option vendor-class-identifier, 0, 10) = "AM43xx ROM" {
        filename "u-boot-spl-restore.bin";
      } elsif substring (option vendor-class-identifier, 0, 17) = "AM43xx U-Boot SPL" {
        filename "u-boot-restore.img";
      } else {
        filename "zImage";
      }
    }
    
    host am335x_evm {
      hardware ethernet 40:5f:c2:76:43:6d;
      fixed-address 192.168.1.8;
      if substring (option vendor-class-identifier, 0, 10) = "DM814x ROM" {
        filename "u-boot-spl-restore.bin";
      } elsif substring (option vendor-class-identifier, 0, 17) = "AM335x U-Boot SPL" {
        filename "u-boot-restore.img";
      } else {
        filename "zImage";
      }
    }
    
    host am335x_evm_pg2 {
      hardware ethernet bc:6a:29:61:57:c2;
      fixed-address 192.168.1.8;
      if substring (option vendor-class-identifier, 0, 10) = "AM335x ROM" {
        filename "u-boot-spl-restore.bin";
      } elsif substring (option vendor-class-identifier, 0, 17) = "AM335x U-Boot SPL" {
        filename "u-boot-restore.img";
      } else {
        filename "zImage";
      }
    }
    

    Thanks & Regards

    Ch. Siva

  • Hi Ron,

    Thanks for your support!!

    Now I am able to load secondary boot loader (u-boot) using the Linux setup by using the 100Mbps network LAN configuration.

    Here we have observed issue is with 10Mbps Network LAN configuration.

    Looks EVM works at 100Mbps LAN configuration to load both SPL and u-boot images and able to get u-boot prompt console.

    Thanks & Regards

    Ch. Siva

  • Hi Ron,

    Hope you are doing good!!

    Now we are trying to flash the SPL and u-boot flasher images onto the custom board using the Linux TFTP setup as similar setup which I have used for AM437x-GP-EVM platform.
    But I am facing the issue to execute SPL boot image as mentioned earlier. to debug I have added more debug prints to identify the issue.
    I have created separate thread for this issue as shown below and uploaded the debug console log with more debug prints.

    e2e.ti.com/.../1964866

    Could you please have a look in the thread and guide us what is the issue we are facing on our custom board.

    We appreciate you support!!.

    Thanks & Regards
    Ch. Siva
  • Hi Ron,

    I hope you doing good.
    I am facing the issue to execute debrick script to flash images into NAND flash on AM437x custom board.
    I have created another thread and below is the link.
    e2e.ti.com/.../2060258

    Could you please have a look and let me know where I am doing wrong.
    I appreciate your quick support!!!

    Thanks & Regards
    Ch. Siva