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-AM62B-P1: Issue with Ethernet Booting - Need Assistance

Part Number: SK-AM62B-P1

Hi Team,

I've successfully brought up the board up to u-boot through Ethernet booting following the (3.1.1.3. Booting over Ethernet (Ethernet RGMII) — Processor SDK AM62x Documentation):

  1. Used uEnv_ethernet_emmc_am62xx-evm.txt as a reference.

  2. Changed CONFIG_BOOTCOMMAND="dhcp uEnv.txt; env import -t ${loadaddr} $filesize; run user_commands;" in am62x_evm_a53_defconfig.

However, I am encountering an issue when trying to bring up the Linux image. All images load properly, but there seems to be an obstacle preventing the Linux image from initializing.

Attached is the log from my device for further analysis.

Regards, Vikash

U-Boot SPL 2023.04-g24098ea90d (Jul 06 2023 - 12:59:40 +0000)
SYSFW ABI: 3.1 (firmware rev 0x0009 '9.0.5--v09.00.05 (Kool Koala)')
SPL initial stack usage: 13376 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 1000, full duplex
BOOTP broadcast 1
BOOTP broadcast 2
BOOTP broadcast 3
DHCP client bound to address 192.168.1.13 (1003 ms)
Using ethernet@8000000port@1 device
TFTP from server 192.168.1.1; our IP address is 192.168.1.13
Filename 'tispl.bin'.
Load address: 0x82000000 
Loading: #################################################################
         #################################################################
         #################################################################
         ############################  0 Bytes
         5 MiB/s
done
Bytes transferred = 1138051 (115d83 hex)
udma_stop_mem2dev: peer not stopped TIMEOUT !
Authentication passed
Authentication passed
Authentication passed
Authentication passed
Authentication passed
Loading Environment from MMC... *** Warning - No MMC card found, using default environment

init_env from device 4 not supported!
Starting ATF on ARM64 core...

NOTICE:  BL31: v2.8(release):v2.8-226-g2fcd408bb3-dirty
NOTICE:  BL31: Built : 00:42:57, Jan 13 2023

U-Boot SPL 2023.04-g24098ea90d (Jul 06 2023 - 12:59:40 +0000)
SYSFW ABI: 3.1 (firmware rev 0x0009 '9.0.5--v09.00.05 (Kool Koala)')
SPL initial stack usage: 1856 bytes
MMC: no card present
** Bad device specification mmc 1 **
Couldn't find partition mmc 1:1
Error: could not access storage.
Trying to boot from eth device
Loading Environment from nowhere... OK
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 192.168.1.13 (756 ms)
Using ethernet@8000000port@1 device
TFTP from server 192.168.1.1; our IP address is 192.168.1.13
Filename 'u-boot.img'.   
Load address: 0x82000000 
Loading: #################################################################
         #################################################################
         ##########################################################  0 Bytes
         5.5 MiB/s
done
Bytes transferred = 962523 (eafdb hex)
Authentication passed
Authentication passed


U-Boot 2023.04-g24098ea90d (Jul 06 2023 - 12:59:40 +0000)

SoC:   AM62X SR1.0 HS-FS 
Model: Texas Instruments AM625 SK
EEPROM not available at 80, trying to read at 81
Board: AM62B-SKEVM-P1 rev A
DRAM:  2 GiB
Core:  71 devices, 31 uclasses, devicetree: separate
MMC:   mmc@fa10000: 0, mmc@fa00000: 1
Loading Environment from nowhere... OK
In:    serial
Out:   serial
Err:   serial
Unidentified board claims AM62B-SKEVM-P1 in eeprom header
Net:   eth0: ethernet@8000000port@1
Hit any key to stop autoboot:  0
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 192.168.1.13 (757 ms)
Using ethernet@8000000port@1 device
TFTP from server 192.168.1.1; our IP address is 192.168.1.13
Filename 'uEnv.txt'.
Load address: 0x82000000 
Loading: #  0 Bytes
         490.2 KiB/s
done
Bytes transferred = 2510 (9ce hex)
Flashing_on_emmc
switch to partitions #1, OK
mmc0(part 1) is current device

MMC erase: dev # 0, block # 0, count 1024 ... 1024 blocks erased: OK
link up on port 1, speed 1000, full duplex
BOOTP broadcast 1
DHCP client bound to address 192.168.1.13 (3 ms)
Using ethernet@8000000port@1 device
TFTP from server 192.168.1.1; our IP address is 192.168.1.13
Filename 'n_tiboot3.bin'.
Load address: 0x82000000 
Loading: #################################################################  0 Bytes
         5.5 MiB/s
done
Bytes transferred = 328454 (50306 hex)

MMC write: dev # 0, block # 0, count 1024 ... 1024 blocks written: OK

MMC erase: dev # 0, block # 1024, count 4096 ... 4096 blocks erased: OK
link up on port 1, speed 1000, full duplex
BOOTP broadcast 1
DHCP client bound to address 192.168.1.13 (2 ms)
Using ethernet@8000000port@1 device
TFTP from server 192.168.1.1; our IP address is 192.168.1.13
Filename 'n_tispl.bin'.  
Load address: 0x82000000 
Loading: #################################################################
         #################################################################
         #################################################################
         ############################  0 Bytes
         5.6 MiB/s
done
Bytes transferred = 1137995 (115d4b hex)

MMC write: dev # 0, block # 1024, count 4096 ... 4096 blocks written: OK

MMC erase: dev # 0, block # 5120, count 8192 ... 8192 blocks erased: OK
link up on port 1, speed 1000, full duplex
BOOTP broadcast 1
DHCP client bound to address 192.168.1.13 (2 ms)
Using ethernet@8000000port@1 device
TFTP from server 192.168.1.1; our IP address is 192.168.1.13
Filename 'n_u-boot.img'. 
Load address: 0x82000000 
Loading: #################################################################
         #################################################################
         ##########################################################  0 Bytes
         5.7 MiB/s
done
Bytes transferred = 962467 (eafa3 hex)

MMC write: dev # 0, block # 5120, count 8192 ... 8192 blocks written: OK
MMC erase: dev # 0, block # 13312, count 256 ...

Caution! Your devices Erase group is 0x400
The erase range would be change to 0x3400~0x37ff

256 blocks erased: OK
link up on port 1, speed 1000, full duplex
BOOTP broadcast 1
DHCP client bound to address 192.168.1.13 (2 ms)
Using ethernet@8000000port@1 device
TFTP from server 192.168.1.1; our IP address is 192.168.1.13
Filename 'n_uEnv.txt'.   
Load address: 0x82000000 
Loading: #  0 Bytes
         129.9 KiB/s
done
Bytes transferred = 266 (10a hex)

MMC write: dev # 0, block # 13312, count 256 ... 256 blocks written: OK
switch to partitions #2, OK
mmc0(part 2) is current device

MMC erase: dev # 0, block # 0, count 64512 ... 64512 blocks erased: OK
link up on port 1, speed 1000, full duplex
BOOTP broadcast 1
DHCP client bound to address 192.168.1.13 (2 ms)
Using ethernet@8000000port@1 device
TFTP from server 192.168.1.1; our IP address is 192.168.1.13
Filename 'rootfs.ext4'.  
Load address: 0x82000000 
Loading: #################################################################
         #################################################################
         #################################################################
         #################################################################
#################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
#################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         ################  0 Bytes  
         5.3 MiB/s
done
Bytes transferred = 314572800 (12c00000 hex)
missing environment variable: pxeuuid
Retrieving file: pxelinux.cfg/01-1c-63-49-1f-d9-19
link up on port 1, speed 1000, full duplex
Using ethernet@8000000port@1 device 
TFTP from server 192.168.1.1; our IP address is 192.168.1.13
Filename 'pxelinux.cfg/01-1c-63-49-1f-d9-19'.
Load address: 0x80100000
Loading: *
TFTP error: 'File not found' (1)
Not retrying...
am65_cpsw_nuss_port ethernet@8000000port@1: RX dma free_pkt failed -22
Retrieving file: pxelinux.cfg/C0A8010D
link up on port 1, speed 1000, full duplex
Using ethernet@8000000port@1 device 
TFTP from server 192.168.1.1; our IP address is 192.168.1.13
Filename 'pxelinux.cfg/C0A8010D'.   
Load address: 0x80100000
Loading: *
TFTP error: 'File not found' (1)
Not retrying...
am65_cpsw_nuss_port ethernet@8000000port@1: RX dma free_pkt failed -22
Retrieving file: pxelinux.cfg/C0A8010
link up on port 1, speed 1000, full duplex
Using ethernet@8000000port@1 device 
TFTP from server 192.168.1.1; our IP address is 192.168.1.13
Filename 'pxelinux.cfg/C0A8010'.
Load address: 0x80100000
Loading: *
TFTP error: 'File not found' (1)
Not retrying...
am65_cpsw_nuss_port ethernet@8000000port@1: RX dma free_pkt failed -22
Retrieving file: pxelinux.cfg/C0A801
link up on port 1, speed 1000, full duplex
Using ethernet@8000000port@1 device 
TFTP from server 192.168.1.1; our IP address is 192.168.1.13
Filename 'pxelinux.cfg/C0A801'.
Load address: 0x80100000
TFTP error: 'File not found' (1)
Not retrying...
am65_cpsw_nuss_port ethernet@8000000port@1: RX dma free_pkt failed -22
Retrieving file: pxelinux.cfg/default
link up on port 1, speed 1000, full duplex
Using ethernet@8000000port@1 device
TFTP from server 192.168.1.1; our IP address is 192.168.1.13
Filename 'pxelinux.cfg/default'.
Load address: 0x80100000
Loading: *
TFTP error: 'File not found' (1)
Not retrying...
am65_cpsw_nuss_port ethernet@8000000port@1: RX dma free_pkt failed -22
Config file not found
link up on port 1, speed 1000, full duplex
BOOTP broadcast 1
DHCP client bound to address 192.168.1.13 (2 ms)
Using ethernet@8000000port@1 device
TFTP from server 192.168.1.1; our IP address is 192.168.1.13
Filename 'boot.scr.uimg'.
Load address: 0x80000000
Loading: *
TFTP error: 'File not found' (1)
Not retrying...
am65_cpsw_nuss_port ethernet@8000000port@1: RX dma free_pkt failed -22
link up on port 1, speed 1000, fu
=>
  • Hi Vikash,

    I noticed messages "TFTP error: 'File not found'" for the following files

    'pxelinux.cfg/01-1c-63-49-1f-d9-19'

    'pxelinux.cfg/C0A8010D'

    'pxelinux.cfg/C0A8010'

    'pxelinux.cfg/C0A801'

    'pxelinux.cfg/default'

    'boot.scr.uimg'

    I'm assuming these files are defined in your uEnv.txt to be sent via tftp (similar to 'rootfs.ext4'), however are these files located in a tftpboot directory or a directory configured by the tftp server to send files within it? In other words, are these files located in the same directory as where your 'rootfs.ext4' is located? 

    Can you tell me what the purpose of these files are?

    -Daolin

  •          #################################################################
             ################  0 Bytes
             4.8 MiB/s
    done
    Bytes transferred = 314572800 (12c00000 hex)
    
    MMC write: dev # 0, block # 0, count 614400 ... MMC: block number 0xffff exceeds max(0xfc00)
    0 blocks written: ERROR
    Flashing_Done
    switch to partitions #0, OK
    mmc0(part 0) is current device  
    SD/MMC found on device 0
    Can't set block device
    Can't set block device
    ** No partition table - mmc 0 **
    ## Error: "main_cpsw0_qsgmii_phyinit" not defined
    Can't set block device
    Can't set block device
    libfdt fdt_check_header(): FDT_ERR_BADMAGIC
    No FDT memory address configured. Please configure
    the FDT address via "fdt addr <address>" command.
    Aborting!
    Bad Linux ARM64 Image magic!
    switch to partitions #0, OK
    mmc0(part 0) is current device  
    ** No partition table - mmc 0 **
    Couldn't find partition mmc 0:1 
    MMC: no card present
    starting USB...
    Bus usb@31100000: generic_phy_get_bulk : no phys property
    Register 1000840 NbrPorts 1
    Starting the controller
    USB XHCI 1.10
    scanning bus usb@31100000 for devices... 1 USB Device(s) found
           scanning usb for storage devices... 0 Storage Device(s) found
    
    Device 0: unknown device
    link up on port 1, speed 1000, full duplex
    BOOTP broadcast 1
    BOOTP broadcast 2
    BOOTP broadcast 3
    DHCP client bound to address 192.168.1.13 (1004 ms)
    Using ethernet@8000000port@1 device
    TFTP from server 192.168.1.1; our IP address is 192.168.1.13
    Filename 'rootfs.ext4'.
    Load address: 0x82000000
    Loading: #T ################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             ###############################################

    Hi Daolin,

    'pxelinux.cfg/01-1c-63-49-1f-d9-19'

    'pxelinux.cfg/C0A8010D'

    'pxelinux.cfg/C0A8010'

    'pxelinux.cfg/C0A801'

    'pxelinux.cfg/default'

    'boot.scr.uimg'

    I've noticed that the mentioned files, uEnv.txt, and specific configurations are not present in our system. I'm attaching the dhcpd configuration file and uEnv.txt file for reference. I am unsure about the origin of these missing files, and I'm seeking assistance in resolving this issue. Please provide guidance on addressing this problem.

    I would appreciate it if you could review the uEnv.txt file to confirm whether I've correctly specified the size for rootfs.ext4. I'm uncertain about the accuracy of the size calculation, as I've been advised to divide the actual size by 512 in hexadecimal after calculation our rootfs size is 314572800/512=6,14,400. Upon implementing this and running the command(mmc write ${loadaddr} 0x0 0x96000), I'm encountering an error indicating an exceeded value for the mmc write command.(

    MMC write: dev # 0, block # 0, count 614400 ... MMC: block number 0xffff exceeds max(0xfc00)
    0 blocks written: ERROR

    )

    Regards,
    vikash
    # This uEnv.txt file can contain additional environment settings that you
    # want to set in U-Boot at boot time.  This can be simple variables such
    # as the serverip or custom variables.  The format of this file is:
    #    variable=value
    
    user_commands=echo Flashing_on_emmc; run command_list;
    
    
    cmd_1=mmc dev 0 1
    
    # ************To flash tiboot3.bin************
    
    # erase
    cmd_2=mmc erase 0x0 0x400
    
    # Enter your filename in place of tiboot3.bin
    cmd_3=dhcp tiboot3.bin
    
    # write
    cmd_4=mmc write ${loadaddr} 0x0 0x400
    
    # ************To flash tispl.bin************
    
    # erase
    cmd_5=mmc erase 0x400 0x1000
    
    # Enter your filename in place of tispl.bin
    cmd_6=dhcp tispl.bin
    
    # write
    cmd_7=mmc write ${loadaddr} 0x400 0x1000
    
    # ************To flash u-boot.img************
    
    # erase
    cmd_8=mmc erase 0x1400 0x2000
    
    # Enter your filename in place of u-boot.img
    cmd_9=dhcp u-boot.img
    
    # write
    cmd_10=mmc write ${loadaddr} 0x1400 0x2000
    
    # ************To flash uEnv.txt************
    
    # erase
    cmd_11=mmc erase 0x3400 0x100
    
    # Enter your filename in place of uEnv.txt
    cmd_12=dhcp uEnv.txt
    
    # write
    cmd_13=mmc write ${loadaddr} 0x3400 0x100
    
    # ************To flash rootfs************
    
    cmd_14=mmc dev 0 2
    
    # erase
    cmd_15=mmc erase 0x0 0xfc00
    
    # Enter your filename in place of rootfs.ext4
    cmd_16=dhcp rootfs.ext4
    
    # write
    cmd_17=mmc write ${loadaddr} 0x0 0xfc00
    
    cmd_18=echo Flashing_Done
    
    cmd_19 =setenv mmcdev 0
    
    cmd_20=setenv bootpart 0
    
    # Run the list of commands specified by variables.
    # Add or remove the commands you want to run
    
    command_list=run cmd_19; run cmd_20; run cmd_1; run cmd_2; run cmd_3; run cmd_4; run cmd_5; run cmd_6; run cmd_7; run cmd_8; run cmd_9; run cmd_10; run cmd_11; run cmd_12; run cmd_13; run cmd_14; run cmd_15; run cmd_16; run cmd_17; run cmd_18;run envboot; run distro_bootcmd;

  • Hi Vikash,

    I see in your uEnv.txt "mmc write ${loadaddr} 0x0 0xfc00" which doesn't match your statement of running "mmc write ${loadaddr} 0x0 0x96000". Just to clarify, was the error resulting from "0xfc00" or "0x96000"?

    -Daolin

  • Hi Daolin,

    error resulting from 0x96000

    regards, vikash

  • Hi Vikash,

    I have replicated your error on my setup as well (with a relatively large rootfs.ext4 size ~900 Mb) and saw "MMC write: dev # 0, block # 0, count 1843200... MMC: block number 0xffff exceeds max(0xfc00)".

    I believe the "MMC write: dev # 0, block # 0, count 614400 ... MMC: block number 0xffff exceeds max(0xfc00)" you saw may be due to the number of 512 byte blocks of your rootfs.ext4 (0x96000 or 614400) exceeding the maximum block number of 0xfc00 or 64512. If this is the case, this seems incredibly small (~33030144 bytes for eMMC flash) and I will check with the internal team about this.

    If it is possible for you to try with a smaller sized rootfs.ext4 that can fit within 64512 block size, I would give that a try to see if that resolves this particular error.

    -Daolin

  • I have an update after speaking to the team about the commands in the uEnv.txt file. 

    The uEnv_ethernet_emmc_am62xx-evm.txt currently uses "cmd_14=mmc dev 0 2" which is using the BOOT1 partition which has a max of around 32MB of space. This is the key reason why we see the current error. This command needs to be changed to "mmc dev 0 0" for the UDA partition (User Data Access) which has around 14 GB size. 

    In addition, you must first partition the UDA partition further according these steps: https://software-dl.ti.com/processor-sdk-linux-rt/esd/AM62X/09_01_00_08/exports/docs/linux/Foundational_Components/U-Boot/UG-Memory.html#partitioning-emmc-from-u-boot  before running the commands in the uEnv.txt.

    After setting up the partition table, please check the address of "Start LBA" by running "mmc part". The offset from 0x0 "mmc write ${loadaddr} 0x0 0x96000" must be changed to this address number. See below as an example where the offset number should be "0x00000022". 

    Make sure that "mmc erase <offset> 0x96000" has the same offset number.

    By performing the above steps, I was able to write to mmc successfully:

             ##############################################  0 Bytes
             1.6 MiB/s
    done
    Bytes transferred = 943718400 (38400000 hex)
    => mmc write ${loadaddr} 0x22 0x1c2000
    
    MMC write: dev # 0, block # 34, count 1843200 ... 1843200 blocks written: OK
    => ls mmc 0:1
    <DIR>       4096 .
    <DIR>       4096 ..
    <DIR>      16384 lost+found
    <DIR>       4096 bin
    <DIR>       4096 boot
    <DIR>       4096 dev
    <DIR>       4096 etc
    <DIR>       4096 home
    <DIR>       4096 lib
    <SYM>         19 linuxrc
    <DIR>       4096 media
    <DIR>       4096 mnt
    <DIR>       4096 proc
    <DIR>       4096 run
    <DIR>       4096 sbin
    <DIR>       4096 srv
    <DIR>       4096 sys
    <DIR>       4096 tmp
    <DIR>       4096 usr
    <DIR>       4096 var
    

    Please try this out and let me know if you have further questions

    -Daolin

  • Hi Daolin,

    Thank you for your valuable response my issue got resolved, now I am able to boot linux image.

    Regards,

    Vikash