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.

am5728 移植uboot,网络ping不通

Other Parts Discussed in Thread: AM5728, BEAGLEBOARD-X15

芯片是am5728,SDK版本是ti-processor-sdk-linux-am57xx-evm-06.03.00.106-Linux-x86-Install.bin

在board-support\u-boot-2019.01+gitAUTOINC+333c3e72d3-g333c3e72d3目录下执行如下命令:

make CROSS_COMPILE=arm-linux-gnueabihf- distclean

make CROSS_COMPILE=arm-linux-gnueabihf- ARCH=arm am57xx_evm_defconfig all

之后把MLO、u-boot.img到SD卡的BOOT分区启动,想用tftp方式启动内核,设置好网络参数,然后ping主机,显示如下

=> ping 192.168.1.105
ethernet@48484000 Waiting for PHY auto negotiation to complete................. TIMEOUT !
ping failed; host 192.168.1.105 is not alive

请问原因是什么?uboot哪里需要做修改?谢谢

  • uboot的log信息如下,为什么Net处无任何信息?

    这个警告 Warning: ethernet@48484000 using MAC address from ROM是什么意思?

    U-Boot 2019.01 (Dec 21 2020 - 16:09:41 +0800)

    CPU : DRA752-GP ES2.0
    Model: TI AM5728 BeagleBoard-X15
    Board: UNKNOWN(BeagleBoard X15?) REV UNKNOWN xie
    DRAM: 2 GiB
    MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
    Loading Environment from FAT... OK

    Warning: fastboot.board_rev: unknown board revision
    am57x_idk_lcd_detect: Failed to get I2C device 0/56 (ret 1)
    Net:
    Warning: ethernet@48484000 using MAC address from ROM
    eth0: ethernet@48484000
    Hit any key to stop autoboot: 0
    switch to partitions #0, OK
    mmc0 is current device
    SD/MMC found on device 0
    ** Unable to read file boot.scr **
    26 bytes read in 2 ms (12.7 KiB/s)
    Loaded env from uEnv.txt
    Importing environment from mmc0 ...
    switch to partitions #0, OK
    mmc0 is current device
    SD/MMC found on device 0
    4448768 bytes read in 195 ms (21.8 MiB/s)
    90792 bytes read in 5 ms (17.3 MiB/s)
    ## Flattened Device Tree blob at 88000000
    Booting using the fdt blob at 0x88000000
    Loading Device Tree to 8ffe6000, end 8ffff2a7 ... OK

    Starting kernel ...

  • 这个警告应该不影响。
    请问是自制板吗?网口部分相比于开发板硬件上是否有做改动?
  • 是自制的板子,自制板两个PHY的地址是0和1,TI 的开发板PHY地址是1和2,请问在哪里改?谢谢

  • board\ti\am57xx\board.c
    static struct cpsw_slave_data cpsw_slaves[] = {
    {
    .slave_reg_ofs = 0x208,
    .sliver_reg_ofs = 0xd80,
    .phy_addr = 1,
    },
    {
    .slave_reg_ofs = 0x308,
    .sliver_reg_ofs = 0xdc0,
    .phy_addr = 2,
    },
    };
  • 网络依然不通,附件是printenv打印的log,请帮看看有无问题,谢谢

    1881.teraterm.log

  • 可否访问到phy寄存器?
    请执行以下命令,并将测试结果贴出来看一下。
    ethtool <interface such as eth0>
    ethtool -S <interface such as eth0>
    ifconfig <interface such as eth0>
  • uboot下好像没有这两个命令

    => ethtool
    Unknown command 'ethtool' - try 'help'
    => ifconfig
    Unknown command 'ifconfig' - try 'help'
    =>
  • mii device查一下能不能查到phy设备,以及测试看看读写phy寄存器有没有问题。

    mii device

    mii info

    mii read

    mii write

  • static struct cpsw_slave_data cpsw_slaves[] = {
    {
    .slave_reg_ofs = 0x208,
    .sliver_reg_ofs = 0xd80,
    .phy_addr = 0,
    },
    {
    .slave_reg_ofs = 0x308,
    .sliver_reg_ofs = 0xdc0,
    .phy_addr = 1,
    },
    };

    把上面的phy_addr分别改成0和1,用mii命令打印的信息如下,和未改的时候mii命令打印信息是一样的

    => mii device
    MII devices: 'ethernet@48484000'
    Current device: 'ethernet@48484000'
    => mii info
    PHY 0x00: OUI = 0x0885, Model = 0x22, Rev = 0x02, 100baseT, FDX
    PHY 0x01: OUI = 0x0885, Model = 0x22, Rev = 0x02, 10baseT, HDX

    => mii info 0
    PHY 0x00: OUI = 0x0885, Model = 0x22, Rev = 0x02, 100baseT, FDX

    => mii read
    1140
    => mii write
    =>

    => mii write 0 0 0x1000
    => mii read 0 0
    1000
    => mii write 0 0 2100
    => mii read 0 0
    2100

    => mdio list
    ethernet@48484000:
    1 - Micrel ksz9031 <--> ethernet@48484000

  • 抱歉,前面没写全。
    mii dump读出来的信息会比较全,包括link的状态等。
    mii dump <addr> <reg> - pretty-print <addr> <reg> (0-5 only)
  • 你是用的phy 0地址这个网口吧?
    phy 0 自动协商和link状态都是正常的,ping不通的话就需要抓包看一下了。
  • 是phy 0 。为啥下面启动信息的Model打印的信息是AM5728 BeagleBoard-X15?而不是am57xx_evm?我用的配置文件是am57xx_evm_defconfig
    Board好像也没识别出来,这有影响吗?

    U-Boot 2019.01-g323d51410c-dirty (Dec 24 2020 - 11:03:08 +0800)

    CPU : DRA752-GP ES2.0
    Model: TI AM5728 BeagleBoard-X15
    Board: UNKNOWN(BeagleBoard X15?) REV UNKNOWN
    DRAM: 2 GiB
    MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
    Loading Environment from FAT... OK
    Warning: fastboot.board_rev: unknown board revision
    am57x_idk_lcd_detect: Failed to get I2C device 0/56 (ret 1)
    Net: eth0: ethernet@48484000
    Hit any key to stop autoboot: 0
    =>

    还有,我把网线插到另一个网口上,打印信息如下

    => boot
    switch to partitions #0, OK
    mmc0 is current device
    20 bytes read in 3 ms (5.9 KiB/s)
    Importing environment from mmc0 ...
    ethernet@48484000 Waiting for PHY auto negotiation to complete...........user interrupt!
    ethernet@48484000 Waiting for PHY auto negotiation to complete.....user interrupt!
    ethernet@48484000 Waiting for PHY auto negotiation to complete..user interrupt!
    =>
    =>
    => boot
    switch to partitions #0, OK
    mmc0 is current device
    20 bytes read in 3 ms (5.9 KiB/s)
    Importing environment from mmc0 ...
    link up on port 0, speed 100, 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
    BOOTP broadcast 18
    BOOTP broadcast 19
    BOOTP broadcast 20
    BOOTP broadcast 21
    BOOTP broadcast 22
    BOOTP broadcast 23
    BOOTP broadcast 24
    BOOTP broadcast 25
    BOOTP broadcast 26
    BOOTP broadcast 27
    BOOTP broadcast 28
    BOOTP broadcast 29

    Retry time exceeded; starting again
    link up on port 0, speed 100, full duplex
    *** ERROR: `ipaddr' not set
    link up on port 0, speed 100, full duplex
    *** ERROR: `ipaddr' not set
    => printenv ipaddr
    ipaddr=192.168.1.106
    =>

  • 你的板子上是不是没有EEPROM?这个board ID是从eeprom上读取的。
    看了一下你前面贴出来的printenv的log,板子没有被正确识别,会找不到正确的设备树文件。
    board_name=beagle_x15
    if test $board_name = beagle_x15; then setenv fdtfile am57xx-beagle-x15.dtb
    将这部分代码注释掉也是可以的。
    或者更改uboot默认配置看看。
    e2e.ti.com/.../722949
  • 我用图形配置界面看,设备树是am572x-idk,在版本06.03.00.106的SDK的uboot目录的arch\arm\dts下没有找到am57xx-evm.dts,请问这是怎么回事?应该用哪个dts?