No eth0 after kernel is started

Source: Internet
Author: User

Recently, I used mx515 CPU for a video phone project. previously compiled kernel startup has always been a problem,

You can see that eth0 is not found in ifconfig after startup. Run the following command:

# Ifconfig
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: 3 errors: 0 dropped: 0 overruns: 0 frame: 0
TX packets: 3 errors: 0 dropped: 0 overruns: 0 carrier: 0
Collisions: 0 txqueuelen: 0
RX Bytes: 280 (280.0 B) TX Bytes: 280 (280.0 B)

# Ifconfig-
Eth0 link encap: Ethernet hwaddr 00: 00: 00: 00: 00: 00
Broadcast 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 FIG: 1000
RX Bytes: 0 (0.0 B) TX Bytes: 0 (0.0 B)
Base Address: 0xc000

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: 5 errors: 0 dropped: 0 overruns: 0 frame: 0
TX packets: 5 errors: 0 dropped: 0 overruns: 0 carrier: 0
Collisions: 0 txqueuelen: 0
RX Bytes: 455 (455.0 B) TX Bytes: 455 (455.0 B)

 

 

Very depressing. Looking back at the FEC startup log information, I found:

FEC enet version 0.2
FEC: PHY @ 0x2, Id 0x0007c0f1 -- lan8710
Eth0: Ethernet 00: 00: 00: 00: 00: 00

It turns out that the MAC address is 0. You can use the following command in the kernel:

Method 1:

# Ifconfig eth0 HW ether 00: 04: 9f: 00: Ea: 09

# Ifconfig
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: 21 errors: 0 dropped: 0 overruns: 0 frame: 0
TX packets: 21 errors: 0 dropped: 0 overruns: 0 carrier: 0
Collisions: 0 txqueuelen: 0
RX Bytes: 1855 (1.8 kib) TX Bytes: 1855 (1.8 kib)

# Ifconfig eth0 up

# Ifconfig
Eth0 link encap: Ethernet hwaddr 00: 04: 9f: 00: Ea: 09
Up broadcast running 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 FIG: 1000
RX Bytes: 0 (0.0 B) TX Bytes: 0 (0.0 B)
Base Address: 0xc000

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: 23 errors: 0 dropped: 0 overruns: 0 frame: 0
TX packets: 23 errors: 0 dropped: 0 overruns: 0 carrier: 0
Collisions: 0 txqueuelen: 0
RX Bytes: 2030 (1.9 kib) TX Bytes: 2030 (1.9 kib)

#

Yes.

 

Method 2:

Set the MAC address when uboot starts. The following is the MAC address for FEC,

Vdphone U-boot> set fec_addr 00: 04: 9f: 00: Ea: 09
Vdphone U-boot> Save

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.