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.

AM623: Booting over Ethernet (Ethernet RGMII)

Part Number: AM623

Dear TI teams

        When I tried to start Ethernet, I found that I couldn't load the tiboot3. bin file through tftp. Can you help me analyze the reason? 

        Thanks!

This is the configuration of the dhcpd.conf file:

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
option domain-name "example.org";
option domain-name-servers ns1.example.org, ns2.example.org;
default-lease-time 600;
max-lease-time 7200;
subnet 192.168.1.0 netmask 255.255.255.0
{
range dynamic-bootp 192.168.1.10 192.168.1.168;
if substring (option vendor-class-identifier, 0, 16) = "TI K3 Bootp Boot"
{
filename "tiboot3.bin";
} elsif substring (option vendor-class-identifier, 0, 20) = "AM62X U-Boot R5 SPL"
{
filename "tispl.bin";
} elsif substring (option vendor-class-identifier, 0, 21) = "AM62X U-Boot A53 SPL"
{
filename "u-boot.img";
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

This is the tftpboot directory created:

This is the log captured through Wireshark:

 

  • Hello, 

    Based on your Wireshark capture it appears that you are receiving a reply from the your DHCP server so it seems like an IP address has been established; however, you are not seeing the tiboot3.bin file get transferred. Have you seen this e2e thread before: SK-AM64: Booting over ethernet not working for AM64x - Processors forum - Processors - TI E2E support forums which could be a similar issue you are seeing. It suggests that the problem could be due to a permissions issue with the server or the setup not pointing to the correct directory. It also suggests steps to verify/test your tftp connection.

    Best regards,

    Daolin

  • Hi, Daolin

        I can now boot through Ethernet. The IP address of the host needs to be set to static, 192.168.1.1, and there must be no other DHCP servers in the same network.

        How can I burn the files tiboot3. bin, tispl. bin, u boot. img, and rootfs to EMMC through Ethernet?

        Thanks!

    This is the log printed by the serial terminal:

    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 2021.01-00001-g45cb7e44ae-dirty (Jan 05 2024 - 14:27:06 +0800)
    SYSFW ABI: 3.1 (firmware rev 0x0008 '8.6.4--v08.06.04 (Chill Capybar')
    SPL initial stack usage: 13424 bytes
    Trying to boot from eth device
    Loading Environment from MMC... *** Warning - No MMC card found, using default environment
    eth0: ethernet@8000000port@1
    ethernet@8000000port@1 Waiting for PHY auto negotiation to complete.... done
    link up on port 1, speed 100, full duplex
    BOOTP broadcast 1
    BOOTP broadcast 2
    BOOTP broadcast 3
    DHCP client bound to address 192.168.1.155 (1004 ms)
    Using ethernet@8000000port@1 device
    TFTP from server 192.168.1.1; our IP address is 192.168.1.155
    Filename 'tispl.bin'.
    Load address: 0x82000000
    Loading: #################################################################
    #################################################################
    #########################################################
    1.1 MiB/s
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

       

  • Hello,

    Thanks for your update.

    There is documentation for how to directly flash to eMMC via Ethernet here: 3.5.4. Flash via Ethernet — Processor SDK AM62x Documentation however, it appears to be missing the link to the example uEnv file for setting the environment variables in U-boot for flashing. One important tip to take away from this documentation is to modify the am62x_evm_a52_defconfig file and rebuild the U-boot binaries to override the bootcmd in order to send the uEnv.txt (if you plan to use uEnv.txt as opposed to directly issuing U-boot commands).

    Since there is a missing link to the example uEnv.txt for direct flashing, another method is to do the following to flash from Linux (as opposed to U-boot).

    1. Boot into U-boot through Ethernet (as you have already done) and then use the U-boot command line to load the Kernel, DTS, and rootfs through Ethernet tftp. 

    If you haven't already loaded the Kernel, DTS, and rootfs through tftp the following is an example UEnv.txt. You could modify the deconfig file based on the tip above and rebuild the U-boot binaries to directly send and run the uEnv.txt file. 

    You could also just convert the content in this UEnv.txt into U-boot commands (i.e. setenv..., tftp....). More information to set U-boot environment variables can be found here: https://docs.u-boot.org/en/latest/usage/environment.html 

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    svrip=10.0.0.110 #change to your server ip address
    ipaddr=10.0.0.162 #change to your client ip address
    imgdir='k3-am62x/' #change to your kernel image name
    rootpath=/home/lb/opt/filesys.am62x #rootfs is configured as nfs in uboot "bootargs" parameter
    fdtfile=k3-am625-sk.dtb #change to your device tree binary file
    netargs=setenv bootargs console=${console} ${optargs} root=/dev/nfs nfsroot=${serverip}:${rootpath},nolock,v3 rw ip=${ipaddr}:::::eth0
    loadoverlay=fdt address ${fdtaddr}; fdt resize 0x100000;
    netboot=tftp ${loadaddr} ${bootfile}; tftp ${fdtaddr} ${imgdir}${fdtfile}; run loadoverlay; run netargs; booti ${loadaddr} - ${fdtaddr}
    uenvcmd=setenv serverip ${svrip}; setenv ipaddr ${ipaddr}; setenv bootfile ${imgdir}image; run netboot
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    2. Flash U-boot binaries, Kernel, DTS, and rootfs to eMMC from Linux.

    Once you are able to fully boot into Linux, you might find the following page useful to flash Linux to eMMC. This page includes instructions on flashing the U-boot binaries (tiboot3.bin, tispl.bin, u-boot.img), Linux kernel, device tree, and root filesystem to eMMC. You would also need to make some changes in the boot mode and U-boot Env to ensure that when Linux boots, it will boot from the eMMC.

    Flash Linux to eMMC (ti.com)

    Please note that this documentation was written in context of using the TI EVM; so the EVM boot switches documented may not exactly apply if you are using a custom board. You should refer to the AM623 datasheet and TRM for details on changing the boot mode to boot from eMMC.

    Please try this out and let us know if you have any additional questions.

    Best regards,

    Daolin

  • Hi,Daolin

    Thank you for your answer.

    Our current requirement is to directly burn firmware to EMMC through Ethernet, because as far as I know, TI has no tool for burning AM62x system images to EMMC on the production line. At the current debugging stage, we use USB DFU mode to burn. The operation process is complex, and it needs to connect USB and debugging serial ports to complete the burning. If all files such as uboot and rootfs can be downloaded directly to EMMC through Ethernet, it will make the process of factory burning simpler.

  • Hi,

    Thanks for providing details on your requirements and use case.

    I realized the link I made to the SDK documentation for Ethernet flash (to eMMC) was broken in my previous post. I've updated that link in the previous post as well as provide it here: 3.5.4. Flash via Ethernet — Processor SDK AM62x Documentation.

    I have followed up with the internal team about the missing example uEnv.txt files on this SDK documentation. You can find these example uEnv.txt files in <SDK installation path>/bin/Ethernet_flash. With the uEnv.txt files and rebuilding the U-boot binaries to enable directly sending and running the uEnv.txt file, there should be no need to manually enter U-boot commands to load the Kernel, DTB, and rootfs and then enter Linux manually to run the commands to flash to eMMC in my two-step process in my previous answer. 

    The idea is after you have booted via Ethernet, the uEnv.txt file will be read and flash the U-boot binaries and the loaded Kernel, DTB, and rootfs files to eMMC. 

    Are you able to try following the above documentation to flash to eMMC via Ethernet? Please let us know if you run into issues/have additional questions.

    Best regards,

    Daolin

  • Hi,Daolin

    I can now download the image to EMMC through Ethernet.

    Thanks!

     

    This is the log printed by the serial terminal

    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 2021.01-00001-g45cb7e44ae-dirty (Jan 09 2024 - 10:32:36 +0800)
    SYSFW ABI: 3.1 (firmware rev 0x0008 '8.6.4--v08.06.04 (Chill Capybar')
    SPL initial stack usage: 13424 bytes
    Trying to boot from eth device
    Loading Environment from MMC... *** Warning - No MMC card found, using default environment
    eth0: ethernet@8000000port@1
    ethernet@8000000port@1 Waiting for PHY auto negotiation to complete.... done
    link up on port 1, speed 100, full duplex
    BOOTP broadcast 1
    BOOTP broadcast 2
    BOOTP broadcast 3
    DHCP client bound to address 192.168.1.194 (1004 ms)
    Using ethernet@8000000port@1 device
    TFTP from server 192.168.1.1; our IP address is 192.168.1.194
    Filename 'tispl_eth.bin'.
    Load address: 0x82000000
    Loading: #################################################################
    #################################################################
    #########################################################
    1.2 MiB/s
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

     

     

  • Hello,

    That's great news! Just to confirm, did you use the instructions from the software documentation I provided or did you make some modifications of your own? The reason I ask is to obtain feedback on whether our documentation helps as it is or if there are additional improvements that need to be made. 

    Best regards,

    Daolin

  • Hi,Daolin

    Yes,I referred to the software reference document you provided above to implement it.