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.

66AK2H14: Ethernet boot mode

Part Number: 66AK2H14

Hi,

We are currently working on our custom board that have a 66AK2H14 SoC.


I'm currently trying to boot by Ethernet because we need this boot to flash the first firmware for new boards. 

I currently can received the bootp request. And I managed to have a bootp reply. I provide my u-boot-spl.bin (BLOB image?) file provided in u-boot/spl directory after build.


However, it looks like i'm hang somewhere in SPL because I can't get any output on serial console. My configuration of UART is done in SPL (same as for my SPI bootloader). I don't really understand why I can't get it working when using Ethernet boot, I thought that my SPI SPL image (the BLOB one) must working, trying to boot from flash firstly.

Secondly, I tried also to configured u-boot to enable ethernet (CONFIG_SPL_ETH_SUPPORT and CONFIG_SPL_NET_SUPPORT and I did some changes in u-boot spl to allow compilation and use spl_net.c instead of spl_spi.c.

However, I'm still stucked at same point.


Do you have any suggestion, ethernet boot guide or u-boot configuration guide for this SoC?


Thank you.

Best regards.


K.Luong

  • Hi, K.Luong,

    my u-boot-spl.bin (BLOB image?) file provided in u-boot/spl directory after build.

    This sounds fishy. Are you using Processor SDK and what is the release number? The PSDK U-boot User's Guide has instruction on how to build the u-boot. Please follow the instruction to build if that wasn't how you build u-boot.

    http://software-dl.ti.com/processor-sdk-linux/esd/docs/latest/linux/Foundational_Components_U-Boot.html#u-boot-user-s-guide

    In addition to the above link, there is a specific Keystone-II U-boot info in [psdk]/board-support/u-boot-[version]/board/ti/ks2_evm/README.

    I strongly suggest that you use CCS to bring up u-boot to u-boot prompt. There won't be any other variable involved such as if Ethernet Boot is configured correctly, etc. Once you get u-boot prompt, you can program NOR or NAND using u-boot scripts.

    Rex

  • Hi Rex Chang,


    I'm using ti-processor-sdk-linux-k2hk-evm-05.00.00.15.

    I already built U-boot and have something working for our boards when they are in SPI BOOT mode. This is the final mode used.

    However, I need to boot by Ethernet for some process reasons and my purpose is not to use CCS. I can actually program NOR flash by some scripts using the debug probe. However, that's not my final purpose and we can't stay with this method.

    It is why I really need to make ethernet boot working. I went through the link you gave me, before, but it didn't give me any valuable information.


    ARM Ethernet boot has then never been tested by your team with U-boot?


    Thank you for your help.


    Best regards,

    K.Luong

  • Hi, K.Luong,

    Ok. I just want to be sure what's your goal. It's been a while and I can't recall on the ethernet boot. I'll give it a try.

    Rex

  • Thank you Rex Chang.

    Let me know when you have any information that can help me.

    Best regards.


    K.Luong

  • Ethernet boot has been tested on the K2H EVM from the Boot ROM as you can see from here:

    https://processors.wiki.ti.com/index.php/KeystoneII_Boot_Examples

    If you are using our K2H EVM then make sure that the boot mode is set correctly from the BMC controller prompt as shown here and if you are doing this on your custom board please provide the DEVSTAT/BOOTMODE setting that you are using. 

    One difference between SPI And Ethernet boot besides the need to setup the NETCP and the serdes is that SPI boot on this device works in PLL in bypass mode so the UARTs will be clocked from SYSCLK1 which is running in PLL in bypass from the ROM and will then switch to PLL configured to DEVSPEED. 

    Can you confirm when you are writing to UART what is the value of the PLLs. You can check this by probing the SYSCLK out which is (SYSCLK/6). If the PLL is configured to 1 GHz, the SYSCLK/6 will come out at 166.66 MHz else it will be 16.66 Mhz if the clock in is 100 Mhz. You UART module clock that sets the baudrate is derived from this clock as well.

    Regards,

    Rahul

  • Hi,

    Yes, you're right, I already saw that the ethernet boot has been tested but not with U-boot.

    My devstat setting is : 0x0220566B

    However, I'm not sure it is a problem of UART because I tried to write to MSM in my code and I never reached any of this writing. ( Checking with probe under CCS Memory browser ) I just do writing and a while(1) after it and then check if I reached this state.

    I saw under wireshark that I have "ETHERNET FRAME CHECK SEQUENCE INCORRECT" for every acknowledgement sending back by the board to host computer. Do you have any idea about this.

    An other question. Can you confirm that u-boot-spl.bin is the right SPL image to use?

    Thank you for your help.

    Best regards,


    K.Luong

  • Hi,


    I came back to Keystone II Boot examples and particularly ethernet boot. I fastly compiled it with an old SDK and I modified the program to set a value in MSM.

    I saw that it worked on our custom board. I can read my value in MSM as expected.

    I really need to know if the u-boot-spl.bin is in the good format.

    What I have seen on the keystone II boot example ethernet is that it used some tools to build the eth_data.bin. (b2css and ccs2bin).


    Thank you in advance for your advice and help.

    Best regards,

    K.Luong

  • I suspect that this could be an issue with the boot image format. Ethernet boot uses blob boot format while SPI and NAND boot uses GP header format. Given the default uboot only supports SPI and NAND, I think that it may be in GP Header format. If you open the .bin in hex editor if you see the first two bytes as  size of the image followed by load address then it is likely to be in GP header format. b2ccs and ccs2bin are use to convert the ELF executable to blob format.

    Here is what a GP header looks like:

    Regards,

    Rahul

    PS: Please note that for SPI/NAND boot the GP Header could be bit reversed 

  • Hi,


    I checked the u-boot-spl.bin image in SPL directory. It doesn't look to be in GP header format.

    I checked the u-boot-spl.gph file in spl directory and I can see the header as in your picture (0001 2683 0c00 0000)  that is added to the previous image.

    Should I consider that the format I have is then the good one or should I apply any change on it?

    Do you have any other idea?


    Thank you.


    Best regards.


    K.Luong

  • Hi Rex,


    Did you tried ethernet boot with U-boot?


    Best regards,

    K.Luong

  • Hi, K. Luong,

    Sorry for my slow response. 

    Yes, it works for me. I rebuilt PLSDK 6.1 u-boot to get the u-boot.bin file, and had it copied to my laptop tftp directory.  I had my K2H dip switch set to "DSP No Boot" mode. I followed instruction in "Keystone-II Boot Example" for Ethernet boot. In the BMC console, I entered

      >bootmode #8 0 115EEB
      >bootmode #8
      >reboot
    

    The SoC console then showed u-boot booting to u-boot prompt. The wireshark also captured the tftp transfer. I herewith attach the SoC console output and wireshark capture file. The tftp server configuration is also attached for reference.

    Rex

    
    U-Boot 2019.01-gc1c5535ff1-dirty (Feb 12 2020 - 12:43:47 -0500)
    
    CPU: 66AK2Hx SR1.1
    Model: Texas Instruments Keystone 2 Kepler/Hawking EVM
    DRAM:  DDR3A Speed will be configured for 1333 Operation.
    Detected SO-DIMM [SQR-SD3T-2G1333SED]
    DDR3 speed 1333
    DRAM: 2 GiB (includes reported below)
    2 GiB
    NAND:  512 MiB
    Loading Environment from NAND... OK
    Net:   
    Warning: netcp@2000000 using MAC address from ROM
    eth0: netcp@2000000
    Warning: netcp@slave-1 (eth1) using random MAC address - d6:cf:67:cf:83:d0
    , eth1: netcp@slave-1
    Warning: netcp@slave-2 (eth2) using random MAC address - 62:97:b8:2b:22:c9
    , eth2: netcp@slave-2
    Warning: netcp@slave-3 (eth3) using random MAC address - da:f9:33:96:12:06
    , eth3: netcp@slave-3
    Hit any key to stop autoboot:  2  1  0 
    => 
    => 

    https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/791/k2h_5F00_enetboot.pcapng

  • Hi Rex,


    Thank you for your feedback.

    You just compiled U-boot without any modification? If I download the SDK and compile it, it is supposed to work on my EVM?


    Thank you for the log.


    Best regards,


    K.Luong

  • Hi,


    I tried ethernet boot with EVM by using u-boot.bin after compiling u-boot provided in SDK06.00.00.07 and it is working. That is a good point.

    After this, I tried to use u-boot.bin from my custom u-boot that I use for our custom board. It is downloaded to the board with bootp request. However, I don't see anything on my console. It doesn't look to work.

    I use ti-processor-sdk-linux-k2hk-evm-05.00.00.15. Do I need to change to last SDK or it is supposed to work with this SDK?


    Thank you in advance for your reply.

    Best regards,

    K.Luong

  • Hi, K.Luong,

    The SDK version doesn't matter. I happened to have a 5.2 release and built u-boot before. Its u-boot.bin works as well. The reason to rebuild u-boot is to generate the .bin file. In the release package, u-boot.bin isn't included.

    Rex

  • Hi,


    Yes, I understood that u-boot.bin is needed and I used this one. I think there is something due to my custom U-boot.

    I will try to compare basic u-boot and my u-boot to see what is wrong for Ethernet boot.


    I keep you in touch.


    K.Luong

  • L.Kiet,

    Can you please indicate 

    1. If you see the BOOTP and image being transferred to device over TFTP Server

    2. Are you able to connect to A15 using JTAG when boot fails to determine the program counter value. If the boot fails after the uboot transfer is done, the program counter will indicate core in in MSMC region. If it fails before uboot load completed, then the core will be in A15 L2 ROM region.

    3. What is the PHY bootstrapping that you are using. Is auto-negotiation enabled. Are you booting at 10/100 or at 1Gbps.

    4. If you are able to connect using JTAG to A15 core, it may be worth loading the following debug GEL file which captures SOC and ROM status and provide us a log. I have also provided a network debug GEL file that provides log of Ethernet stats

    66AK2H12-diag.gel

    6366.cpsw_stats_print.gel

    Please provide the information above so we can try to help you root cause the issue.

    Regards,

    Rahul

  • Hi Rahul Prabhu.

    Sorry for my late reply. I was busy on an other subject.

    I see the BOOTP and image being transferred to device over TFTP server with wireshark.

    I was able to connect to A15 using JTAG. I saw that the program counter indicates core in MSMC region. It then means that it fails after uboot load is completed.

    I'm at 1Gbps. Auto-negotiation is enabled.

    Thanks for the GEL. I will see if I can get useful information with that.

    Best Regards,

    K.Luong

  • Yes, the fact that A15 Program counter is in MSMC indicates that the device has completed ROM boot and jumped into uboot code. Please load the symbols from uboot binary and check to see which function in uboot A15 is hung at. 

    You can check UBoot debugging steps described here and let us know if the GEL or the uboot symbols help in root causing this issue.

    http://software-dl.ti.com/processor-sdk-linux/esd/docs/latest/linux/Foundational_Components_U-Boot.html#uboot-spl-debugging-tips

    Regards,

    Rahul

  • Hi,

    Thanks for your ideas.

    I used symbols from uboot binary and I saw that it was blocked on some I2C calls. I don't really know why, because these calls are working on my SPI bootloader. These I2C commands configures the ability to turn on RS232 on our board.

    Whatever, I deleted the calls in bootloader and I added it later in linux boot. It is then working and I am able to boot and to get Linux output on serial console. However, I am not able to ping my board under Linux. I don't know what is going wrong, since I didn't change anything for the Linux.

    Do you have any idea about what can be the cause?


    Best regards,


    K.Luong

  • Hi, K.Luong

    Glad to hear you resolve the boot issue. If you don't mind, let's close this issue and start a new thread for the ethernet ping issue so the subject matches the content for future content search.

    When you open the new thread, please include the output of "ethtool -S eth0". Please also verify if wireshark capture any in/out packets on the network and post the finding.

    Rex

  • Hi Rex,


    You are right. Thank you for your help. I don't really know what was the network problem previously, but everything is working fine now.

    Best Regards,

    K.Luong