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.

SK-AM62: U-Boot - boot via Ethernet

Part Number: SK-AM62
Other Parts Discussed in Thread: AM625

I am attempting to load U-Boot via Ethernet.

I have downloaded SDK 9.02.01.09 (March 2024) and have built the new binaries with the following config files:

  • am62x_evm_r5_ethboot_config
  • am62x_evm_a53_defconfig

I have also tried the patch "Add-support-for-Ethernet-Boot-on-SK-AM62.patch". Many of these changes were already found in the SDK source code.

tiboot3.bin is transferring to the target board, but the last packet is not getting acknowledged and tispl.bin and u-boot.img are not being loaded.

Am I building the tiboot3.bin incorrectly?

  • Hello Kyle,

    Where did you obtain the "Add-support-for-Ethernet-Boot-on-SK-AM62.patch"?

    Previously, I've seen this exact issue when tiboot3.bin was built using the default "am62x_evm_r5_ethboot_defconfig" in SDK 9.1. The fix was to build tiboot3.bin with a defconfig with the correct settings for ethboot which can be found in https://patchwork.ozlabs.org/project/uboot/list/?series=390216&archive=both&state=*. I currently do not know if these patches have been applied to SDK 9.2 but I will check and get back to you.

    You may find this FAQ useful as well: https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1328520/faq-how-to-boot-sk-am62b-sk-am62a-via-ethernet-and-flash-u-boot-and-linux-binaries-into-emmc-via-ethernet

    -Daolin

  • The final packet is still not being acknowledged. I am, however, receiving something different on the console:

    Previously, I was not using the top-level makefile (make u-boot) to build the u-boot binaries. I changed the config file within the Rules.mk file and built. The above resulted.

  • Hi Kyle,

    The fact that you are seeing "U-Boot SPL..." indicates that tiboot3.bin, the first bootloader loaded via R5 has been successfully transferred. I think that the tispl.bin might not be transferred correctly or the "am62x_evm_a53_defconfig" just doesn't have the correct configuration for ethboot to build tispl.bin for ethboot. 

    Could you check if your "am62x_evm_a53_defconfig" has the same configuration as https://patchwork.ozlabs.org/project/uboot/patch/20240112064759.1801600-10-s-vadapalli@ti.com/ ?

    Could you also check what Wireshark shows when you see those messages on the console?

    -Daolin

  • Yes, I have added all the statements found in the patch for am62x_evm_a53_defconfig. Where can I locate the source for this file instead of just the additions/subtractions? Perhaps I have too much configured in my defconfig.

    Wireshark shows the same as the image found above. There's no acknowledgement of the last data block and I see no BOOTP request for the second file (tispl.bin).

  • Hi Kyle,

    Can you clarify exactly what changes (if any) you made to the out of box u-boot files and what steps you took to get to the issue you see?

    I will try to reproduce your issue on my setup first with building the u-boot binaries from the out of box SDK 9.2.

    --------------------------------------------------------------------------------------

    Currently I'm also trying to get some clarity on whether these patches in https://patchwork.ozlabs.org/project/uboot/list/?series=390216&archive=both&state=* have been applied to 9.2. I was told that these are pending to be upstreamed to mainline U-boot and once accepted will be available in SDK 10.0

    Upon initial diff between what is available for SDK 9.2 and the patch for am62x_evm_r5_ethboot_defconfig, there appears to be some differences which indicates to me that the patches have not been applied.

    -Daolin

  • I have attached a patch file showing the changes I have made.

  • mydiffs.c
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    diff --git a/arch/arm/dts/k3-am625-r5-sk.dts b/arch/arm/dts/k3-am625-r5-sk.dts
    index 87f6bfccda..6cd1ad5fc3 100644
    --- a/arch/arm/dts/k3-am625-r5-sk.dts
    +++ b/arch/arm/dts/k3-am625-r5-sk.dts
    @@ -19,4 +19,10 @@
    reg = <0x00000000 0x80000000 0x00000000 0x80000000>;
    bootph-pre-ram;
    };
    +
    +};
    +
    +&main_pktdma {
    + ti,sci = <&dm_tifs>;
    + bootph-all;
    };
    diff --git a/arch/arm/mach-k3/am62x/clk-data.c b/arch/arm/mach-k3/am62x/clk-data.c
    index c0881778fe..f940feee65 100644
    --- a/arch/arm/mach-k3/am62x/clk-data.c
    +++ b/arch/arm/mach-k3/am62x/clk-data.c
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Ok, now I have uploaded my diffs. It's just a patch file.

    One thing to note, I am using the tiboot3-am62x-gp-evm.bin file.

  • Hi Kyle,

    Did you see this error when "make u-boot" from the SDK top level directory after changing the following section of Rules.mk from the out of the box SDK (no patches applied)?

    Fullscreen
    1
    2
    3
    # u-boot machine configs for A53 and R5
    UBOOT_MACHINE=am62x_evm_a53_defconfig
    UBOOT_MACHINE_R5=am62x_evm_r5_ethboot_defconfig
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    /home/a0500327/ti-processor-sdk-linux-rt-am62xx-evm-09.02.01.09/k3r5-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-oe-eabi/arm-oe-eabi-ld.bfd: drivers/net/ti/am65-cpsw-nuss.o: in function `am65_cpsw_am654_get_efuse_macid':
    /home/a0500327/ti-processor-sdk-linux-rt-am62xx-evm-09.02.01.09/board-support/ti-u-boot-2023.04+gitAUTOINC+f9b966c674/drivers/net/ti/am65-cpsw-nuss.c:550: undefined reference to `syscon_regmap_lookup_by_phandle'
    make[3]: *** [/home/a0500327/ti-processor-sdk-linux-rt-am62xx-evm-09.02.01.09/board-support/ti-u-boot-2023.04+gitAUTOINC+f9b966c674/scripts/Makefile.spl:527: spl/u-boot-spl] Error 1
    make[2]: *** [/home/a0500327/ti-processor-sdk-linux-rt-am62xx-evm-09.02.01.09/board-support/ti-u-boot-2023.04+gitAUTOINC+f9b966c674/Makefile:2044: spl/u-boot-spl] Error 2
    make[2]: Leaving directory '/home/a0500327/ti-processor-sdk-linux-rt-am62xx-evm-09.02.01.09/board-support/u-boot-build/r5'
    make[1]: *** [Makefile:177: sub-make] Error 2
    make[1]: Leaving directory '/home/a0500327/ti-processor-sdk-linux-rt-am62xx-evm-09.02.01.09/board-support/ti-u-boot-2023.04+gitAUTOINC+f9b966c674'
    make: *** [makerules/Makefile_u-boot:28: u-boot-r5] Error 2
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    -Daolin

  • One thing to note, I am using the tiboot3-am62x-gp-evm.bin file.

    You indicated using "SK-AM62" which is typically a GP device. Can you verify that your device is GP?

  • Yes. I then added the following 2 items to the ethboot defconfig file:

    • CONFIG_SYSCON=y
    • CONFIG_SPL_SYSCON=y

    It then built properly.

  • Yes, it is a GP device.

  • I was able to reproduce the following issue you saw in your console if I only changed the am62x_evm_ethboot_defconfig to the version in the patchset I shared previously.

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    U-Boot SPL 2023.04-dirty (Apr 17 2024 - 16:45:57 -0500)
    SYSFW ABI: 3.1 (firmware rev 0x0009 '9.2.7--v09.02.07 (Kool Koala)')
    SPL initial stack usage: 13408 bytes
    Trying to boot from eth device
    Loading Environment from nowhere... OK
    No ethernet found.
    No Ethernet devices found
    SPL: failed to boot from all boot devices
    ### ERROR ### Please RESET the board ###
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    I noticed there are several other files in the patchset I sent such as https://patchwork.ozlabs.org/project/uboot/patch/20240112064759.1801600-8-s-vadapalli@ti.com/ (arch/arm/mach-k3/am625_init) which doesn't appear to be changed on your setup (looking at your patch file).

    Could you apply those changes as well and see what happens?

    -Daolin

  • I have applied all these changes already and receive the same results. Many of these changes already existed in the downloaded SDK.

  • Can you try applying these changes (in ti-u-boot.patch) to the board-support/ti-u-boot-2023.04+gitAUTOINC+f9b966c674 directory from the top level SDK?

    ti-u-boot.patch

    By building with this ti-u-boot directory you should be able to boot into U-boot prompt with the resulting u-boot binaries.

    This is what worked for me.

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    U-Boot SPL 2023.04-29979-gf0af5208e0-dirty (Apr 17 2024 - 17:22:04 -0500)
    SYSFW ABI: 3.1 (firmware rev 0x0009 '9.2.7--v09.02.07 (Kool Koala)')
    SPL initial stack usage: 13384 bytes
    Trying to boot from eth device
    eth0: ethernet@8000000port@1
    ethernet@8000000port@1 Waiting for PHY auto negotiation to complete....... done
    link up on port 1, speed 1000, full duplex
    BOOTP broadcast 1
    BOOTP broadcast 2
    BOOTP broadcast 3
    DHCP client bound to address 172.168.1.170 (1258 ms)
    Using ethernet@8000000port@1 device
    TFTP from server 172.168.1.1; our IP address is 172.168.1.170
    Filename 'tispl.bin'.
    Load address: 0x82000000
    Loading: #################################################################
    #################################################################
    #################################################################
    #################################### 0 Bytes
    5.1 MiB/s
    done
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    As an additional question, what are you planning on using ethernet boot for - development or production purposes? Please keep in mind there is an errata on AM62x devices that make it unsuitable for ethernet boot for production purposes.

    If you are wondering why the patchset I previously pointed to are different from what I provide now.. good question, I'm currently chasing why this is the case with the internal team.

    -Daolin

  • So far I have been unable to apply this patch. How was this patch generated? I am using git but have also tried the Linux patch command.

  • SUCCESS!! I painstakingly manually applied the patch and the board is successfully booting into U-Boot.

    I was tasked to test a board that mistakenly had the SD card interface removed, so I needed a way to boot via Ethernet. We will NOT be using this for production purposes.

    I am curious as to what you may find regarding why this patch was needed and the previous one did not work.

    I would also like to know why this patch could not be automatically applied in my environment. How was this patch created?

  • Apologies for the delayed response. 

    It was not a git patch, it was simply the output of "diff -r" between the entire u-boot directory that worked and the out of the box directory. This is because I was not using git in my environment. 

    I was trying to track which was the last commit in u-boot that last allowed ethboot to work and found ea155ff62af9f25a3295bd19ee869d97d2eb0299 to be the likely commit to reset to. However, I wanted to test before sharing that with you in case it didn't work. You may give resetting to that commit a try and see if ethboot also works. 

    My guess is that there are several changes since ea155ff62af9f25a3295bd19ee869d97d2eb0299 to the head of the ti-u-boot for 9.2 tag including some changes to defconfig files for ethboot that caused a regression bug. 

    Thanks for clarifying your intentions with ethernet boot.

    -Daolin

  • Update: no need to revert back to that commit... it resulted in a build error

    The original diff patch file I gave you was based on a colleague's branch of the ti-u-boot directory from git.ti.com which was the working method. The commit I found was the last commit that supposedly merged the colleague's branch to the main ti-u-boot branch. 

    I do not know what specifically in the colleague's branch that allowed booting via ethernet to work. But I will try to look into it.

    The reason why I did not provide a git patch is simple... I did not know how to properly create one. I've since then learned: ti-u-boot-2023.04-ethernet-boot-patches-for-09.01.00.008.tar(1).gz

    This is a tarball of all the patches from SDK 9.1 onwards to enable ethernet boot to work. 

    -Daolin

  • Update #2:

    Instead of applying ti-u-boot-2023.04-ethernet-boot-patches-for-09.01.00.008.tar(1).gz to SDK 9.1, directly copying the following 2 files into the out of box SDK 9.2 also enables ethernet boot to work

    1. <u-boot-directory>/drivers/net/ti/am65-cpsw-nuss.c

    3821.am65-cpsw-nuss.c
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    // SPDX-License-Identifier: GPL-2.0+
    /*
    * Texas Instruments K3 AM65 Ethernet Switch SubSystem Driver
    *
    * Copyright (C) 2019, Texas Instruments, Incorporated
    *
    */
    #include <common.h>
    #include <malloc.h>
    #include <asm/cache.h>
    #include <asm/io.h>
    #include <asm/processor.h>
    #include <clk.h>
    #include <dm.h>
    #include <dm/device_compat.h>
    #include <dm/lists.h>
    #include <dm/pinctrl.h>
    #include <dma-uclass.h>
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Has some revert changes to fix ""No ethernet found." error and some build issues related to the following. This means the fix to this was not to add "CONFIG_SYSCON=y" and "CONFIG_SPL_SYSCON=y" to the ethboot defconfig (I will fix this in the FAQ).

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    /home/a0500327/ti-processor-sdk-linux-rt-am62xx-evm-09.02.01.09/k3r5-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-oe-eabi/arm-oe-eabi-ld.bfd: drivers/net/ti/am65-cpsw-nuss.o: in function `am65_cpsw_am654_get_efuse_macid':
    /home/a0500327/ti-processor-sdk-linux-rt-am62xx-evm-09.02.01.09/board-support/ti-u-boot-2023.04+gitAUTOINC+f9b966c674/drivers/net/ti/am65-cpsw-nuss.c:550: undefined reference to `syscon_regmap_lookup_by_phandle'
    make[3]: *** [/home/a0500327/ti-processor-sdk-linux-rt-am62xx-evm-09.02.01.09/board-support/ti-u-boot-2023.04+gitAUTOINC+f9b966c674/scripts/Makefile.spl:527: spl/u-boot-spl] Error 1
    make[2]: *** [/home/a0500327/ti-processor-sdk-linux-rt-am62xx-evm-09.02.01.09/board-support/ti-u-boot-2023.04+gitAUTOINC+f9b966c674/Makefile:2044: spl/u-boot-spl] Error 2
    make[2]: Leaving directory '/home/a0500327/ti-processor-sdk-linux-rt-am62xx-evm-09.02.01.09/board-support/u-boot-build/r5'
    make[1]: *** [Makefile:177: sub-make] Error 2
    make[1]: Leaving directory '/home/a0500327/ti-processor-sdk-linux-rt-am62xx-evm-09.02.01.09/board-support/ti-u-boot-2023.04+gitAUTOINC+f9b966c674'
    make: *** [makerules/Makefile_u-boot:28: u-boot-r5] Error 2
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    2. <u-boot directory >/configs/am62x_evm_a53_defconfig

    am62x_evm_a53_defconfig

    Not really necessary if you don't mind seeing the following show up in the EVM console during boot up. Using this defconfig I'm guessing will get rid of the below issues due to the following

    # CONFIG_AUTOBOOT is not set

    CONFIG_IP_DEFRAG=y
    CONFIG_NET_MAXDEFRAG=65535
    CONFIG_TFTP_BLOCKSIZE=65464

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    U-Boot 2023.04-dirty (Apr 18 2024 - 13:38:04 -0500)
    SoC: AM62X SR1.0 HS-FS
    Model: Texas Instruments AM625 SK
    EEPROM not available at 80, trying to read at 81
    Board: AM62B-SKEVM rev A
    DRAM: no bloblist found!2 GiB
    Core: 72 devices, 32 uclasses, devicetree: separate
    MMC: mmc@fa10000: 0, mmc@fa00000: 1
    Loading Environment from nowhere... OK
    In: serial
    Out: serial
    Err: serial
    Net: eth0: ethernet@8000000port@1
    Hit any key to stop autoboot: 0
    MMC: no card present
    SD/MMC found on device 1
    MMC: no card present
    ** Bad device specification mmc 1 **
    Couldn't find partition mmc 1
    Can't set block device
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Replacing the 2 files above should result in the following:

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    U-Boot SPL 2023.04-dirty (Apr 18 2024 - 13:27:35 -0500)
    SYSFW ABI: 3.1 (firmware rev 0x0009 '9.2.7--v09.02.07 (Kool Koala)')
    SPL initial stack usage: 13408 bytes
    Trying to boot from eth device
    eth0: ethernet@8000000port@1
    ethernet@8000000port@1 Waiting for PHY auto negotiation to complete....... done
    link up on port 1, speed 1000, full duplex
    BOOTP broadcast 1
    BOOTP broadcast 2
    BOOTP broadcast 3
    DHCP client bound to address 172.168.1.170 (1265 ms)
    Using ethernet@8000000port@1 device
    TFTP from server 172.168.1.1; our IP address is 172.168.1.170
    Filename 'tispl.bin'.
    Load address: 0x82000000
    Loading: #################################################################
    #################################################################
    #################################################################
    ################################### 0 Bytes
    5 MiB/s
    done
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    -Daolin

  • Daolin, this is great information and thank you SO much!

    I will give these changes a try.

    I've run into another problem. When attempting to load a VxWorks image (yes! VxWorks), I'm receiving a "Wrong Image Format for bootm command" message. The VxWorks image is a known working image.

    tftp 0x93000000 uVxWorks; tftp 0x90000000 dts.dtb; bootm 0x93000000 - 0x90000000;

  • Yes, adding the CONFIG_LEGACY_IMAGE_FORMAT=y allows the bootm command to work. However, VxWorks fails to load properly until I remove the cpsw3g_mdio device. It appears VxWorks doesn't like something that U-Boot is doing to the Ethernet phy

  • Just to clarify, does the bootm command now working mean no "Wrong Image Format for bootm command" is now seen? Can you show me the console output when VxWorks fails to load properly?

    When you say remove the "cpsw3g_mdio device" you mean setting the status= "disabled" in ti-u-boot k3-am625-sk.dts?

    -Daolin

  • Yes, the bootm command now works. Below is a screenshot of where VxWorks stops loading. You can see it is when it's trying to probe and attach the mdio device. Yes, I placed status="disabled" in the dts file for the cpsw3g_mdio device. This allows VxWorks to fully boot.

  • I'm assuming this disable of cpsw3g_mdio is not a good workaround since you will be needing Ethernet MAC to PHY communication for your application?

    Was there anything else that changed on the dts file from the default TI provided dts? I will need to discuss with a team member about this issue further and will give an update at the end of the day or tomorrow.

    -Daolin

  • Update:

    Based on the console output, it appears to be a VxWorks initialization issue for the mdio module. In general, we don't support VxWorks, it would be best to contact the vendor who owns VxWorks about this issue.

    -Daolin

  • Daolin, thank you for your support in this matter. It is greatly appreciated. As I won't be using this method permanently, it's ok that the Ethernet must be disabled to get VxWorks up and running. The Ethernet booting is a workaround for the lack of an SD card for a test fixture.