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.

關於 eth10 無法獲得 IP 位址

AM335X 的客製版,上面跑 ubuntu filesystem

 網路線接口有反應,開進filesystem時網路接口持續亮著,但我打 dhclient eth10 來想獲得位址,會沒有反應必須按 ctrl+c 停止。

下 dmesg 指令,我只截取一小段關於 ethnet 相關訊息

[   50.342987]  net eth10: CPSW phy found : id is : 0x4dd072
[   50.435394] ADDRCONF(NETDEV_UP): eth10: link is not ready
[   53.335937] PHY: 0:07 - Link is Up - 100/Full
[   53.336486] ADDRCONF(NETDEV_CHANGE): eth10: link becomes ready

附件為開機 log

請給我 debug 的方向,謝謝。

  • 输入命令没有反应后,可以等一会,dhcp自动获取可能需要一段时间,如果失败,最后会有超时失败的提示

  • 你好,等了一會兒時間,沒有出現任何錯誤訊息,但是仍然沒有 IP 位址。還有甚麼方向我可以去看得嗎? 謝謝。

  • 那试一下ifconfig设置静态IP可以不,如果静态成功,dhcp失败有可能是公司的网络不支持dhcp,还有可能是内核的menuconfig没有选中dhcp 

  • 你好,我嘗試下 ifconfig eth0 172.16.51.28 是能獲得IP位址的,但就是無法透過hub ping 其他電腦。

    別的板子或者電腦皆可以使用 dhcp,這次的板子和 code 就無法獲得,已經排除是硬體問題,只差軟體。

    kernel 我們是選用 3.2,我還沒仔細細看是否有選中 dhcp功能,明天會再去試。

    謝謝。

  • 想问一下您的u-boot下面可以正常执行DHCP么?

  • 你好TI

    CONFIG_IP_PNP_DHCP=y 看樣子kernel 有選取。

    u-boot? 請問我要怎麼在 u-boot 下測試執行 DHCP ? 謝謝。

  • 你好TI

    CONFIG_IP_PNP_DHCP=y 看樣子kernel 有選取。

    u-boot? 請問我要怎麼在 u-boot 下測試執行 DHCP ? 謝謝。

  • 进入uboot后在命令行执行:

     

    U-Boot # setenv autoload no
    U-Boot # dhcp

     

    更多信息:

    http://processors.wiki.ti.com/index.php/AMSDK_u-boot_User%27s_Guide#Network_configuration_via_DHCP

  • 一般网络的问题建议先在u-boot下做基本调试,定位下是硬件的问题还是软件问题,亦或是整个网络环境的问题

  • 在u-boot 下的訊息。

    請問這有代表甚麼嗎?? 謝謝。

    cpsw Waiting for PHY auto negotiation to complete......... TIMEOUT !
    cpsw Waiting for PHY auto negotiation to complete......... TIMEOUT !
    BOOTP broadcast 9
    cpsw Waiting for PHY auto negotiation to complete......... TIMEOUT !
    cpsw Waiting for PHY auto negotiation to complete......... TIMEOUT !
    BOOTP broadcast 10
    cpsw Waiting for PHY auto negotiation to complete......... TIMEOUT !
    cpsw Waiting for PHY auto negotiation to complete......... TIMEOUT !

    Retry count exceeded; starting again
    using musb-hdrc, OUT ep1out IN ep1in STATUS ep2in
    MAC 1c:ba:8c:96:42:75
    HOST MAC de:ad:be:af:00:00
    RNDIS ready
    ERROR: The remote end did not respond in time.
    at ether.c:2388/usb_eth_init()
    cpsw Waiting for PHY auto negotiation to complete......... TIMEOUT !
    cpsw Waiting for PHY auto negotiation to complete......... TIMEOUT !
    cpsw Waiting for PHY auto negotiation to complete......... TIMEOUT !
    BOOTP broadcast 1
    cpsw Waiting for PHY auto negotiation to complete......... TIMEOUT !
    cpsw Waiting for PHY auto negotiation to complete......... TIMEOUT !
    BOOTP broadcast 2
    cpsw Waiting for PHY auto negotiation to complete......... TIMEOUT !
    cpsw Waiting for PHY auto negotiation to complete......... TIMEOUT !
    BOOTP broadcast 3
    cpsw Waiting for PHY auto negotiation to complete......... TIMEOUT !
    cpsw Waiting for PHY auto negotiation to complete......... TIMEOUT !
    BOOTP broadcast 4
    cpsw Waiting for PHY auto negotiation to complete......... TIMEOUT !
    cpsw Waiting for PHY auto negotiation to complete......... TIMEOUT !
    BOOTP broadcast 5
    cpsw Waiting for PHY auto negotiation to complete......... TIMEOUT !
    cpsw Waiting for PHY auto negotiation to complete.......

  • at ether.c:2388/usb_eth_init()

    你用的usb boot吧

    http://e2e.ti.com/support/arm/sitara_arm/f/791/p/337258/1177093.aspx

  • 真的是很抱歉..我是一位新手。

    我想知道為甚麼你們要我在 u-boot 檢測網路的目的

    以及還有我的訊息您說是 usb boot...?可是我是用sd卡開機,這和我網路無法配置有甚麼關聯?

    您給我的e2e網址,那位問問題的作者他目的想要做甚麼..

    我需要一個簡略的整合來做debug,非常感謝..

  • 从你u-boot的打印信息可以看到auto-negotiation 都没有通,说明硬件存在问题

  • 你好,TI

    為什麼在u-boot底下就可以確認是硬體問題而非軟體呢? 謝謝。

    這個客製板是顧客委託我們做的,客戶只負責軟體,我們自己也弄現在這個軟體。明天我會再去詢問對方是否有實作出來網路來。

    謝謝。

  • uboot 會初始化phy,有基本的網路功能,在這邊debug 硬體問體比較單純

    進入kernel ,rootfs後環境更複雜,比較不容易debug

  • 你好,TI

    我們用一樣的 code 用在 另一個專案的板子,此專案的板子的 ethernet 是正常的可以 DHCP。 此板子用同樣的 ATHEROS 8035 chip,和同樣的 PHY。

  • 请问你存在问题的板子上也是用的8035么?如果用的是一样的phy那就是要修改phy_addr

  • 你好,TI

    =======================================================

    ifconfig -a

    eth0      Link encap:Ethernet  HWaddr 1c:ba:8c:96:42:75
              UP BROADCAST ALLMULTI MULTICAST  MTU:1500  Metric:1
              RX packets:0 errors:0 dropped:0 overruns:0 frame:0
              TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

    eth1      Link encap:Ethernet  HWaddr 1c:ba:8c:96:42:77
              UP BROADCAST RUNNING ALLMULTI MULTICAST  MTU:1500  Metric:1
              RX packets:2794 errors:0 dropped:42 overruns:0 frame:0
              TX packets:25 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:403856 (403.8 KB)  TX bytes:8550 (8.5 KB)

    lo        Link encap:Local Loopback
              inet addr:127.0.0.1  Mask:255.0.0.0
              UP LOOPBACK RUNNING  MTU:16436  Metric:1
              RX packets:8 errors:0 dropped:0 overruns:0 frame:0
              TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0
              RX bytes:592 (592.0 B)  TX bytes:592 (592.0 B)

    =========================================================

    ifconfig eth1 up ----->網路接口亮起來

    =========================================================

    dmesg

    [  468.595245] net eth1: CPSW phy found : id is : 0x4dd072
    [  471.588195] PHY: 0:07 - Link is Up - 100/Full

    =========================================================

    address為0x4dd072 沒錯

    謝謝。

  • 你好,TI

    之前您們要我在u-boot底下打上

    U-Boot# setenv autoload no                                                      
    U-Boot# dhcp

    "cpsw Waiting for PHY auto negotiation to complete......... TIMEOUT !"

    出現以上訊息,似乎是因為我在phy_connect 函数給的phy位址不是 0x4dd072而是0

    給了之後,就沒有出現"cpsw Waiting for PHY auto negotiation to complete......... TIMEOUT !"

    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

    Retry count exceeded; starting again
    using musb-hdrc, OUT ep1out IN ep1in STATUS ep2in
    MAC 1c:ba:8c:96:42:75
    HOST MAC de:ad:be:af:00:00
    RNDIS ready
    ERROR: The remote end did not respond in time.
    at ether.c:2388/usb_eth_init()

  • Hi TI

    問題解決了

  • 你好,我在uboot下使用dhcp也是不断打印如下信息,可以手动设置ip,但是无法ping通同网段下的其他ip。请问你是怎么解决的呢?

    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

  • hengpei bai 说:

    你好,我在uboot下使用dhcp也是不断打印如下信息,可以手动设置ip,但是无法ping通同网段下的其他ip。请问你是怎么解决的呢?

    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

    检查下您的dhcp服务器是否正常。