Skip to contentSkip to conversation

Passing IP address to kernel

U-Boot-Users JobHunts02 at aol.com 2 participants 2 messages May 6, 2005

lore
Share & tools
lore
#0 lore raw

Should U-Boot be able to pass the board's IP address to the kernel?

Immediately after logging in, I cannot ping. ifconfig shows the correct hardware address that was set in U-Boot, but not the IP address, which was similarly set in U-Boot. Also, many of the statistical fields have garbage data in them (see below). If I then set the IP address, ifconfig returns the IP address and the other fields are correct. Then, I can ping.

Is this the expected behavior?

Thank you.

(none) login: root

login[44]: root login on `ttyS0'

# ping 10.174.100.14

PING 10.174.100.14 (10.174.100.14): 56 data bytes

ping: sendto: Network is unreachable

# ifconfig eth0

eth0 Link encap:Ethernet HWaddr 1A:34:01:9C:69:15

BROADCAST MULTICAST MTU:1500 Metric:1

RX packets:4039443 errors:1743791573 dropped:0 overruns:0
frame:1156359170

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:4144766653 txqueuelen:1000

          RX bytes:1290872887 (1231.0 MiB)  TX bytes:0 (0.0 iB)
# ifconfig eth0 address 10.174.100.211

eth0: OPEN

BD rings initialised, RBASE=3D8160, TBASE=3D8360

# ifconfig eth0

eth0 Link encap:Ethernet HWaddr 1A:34:01:9C:69:15

inet addr:10.174.100.211 Bcast:10.255.255.255 Mask:255.0.0.0

UP 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 txqueuelen:1000

RX bytes:0 (0.0 iB) TX bytes:0 (0.0 iB)

# ping 10.174.100.14

PING 10.174.100.14 (10.174.100.14): 56 data bytes

64 bytes from 10.174.100.14: icmp_seq=0 ttl=64 time=1.1 ms

64 bytes from 10.174.100.14: icmp_seq=1 ttl=64 time=0.5 ms

64 bytes from 10.174.100.14: icmp_seq=2 ttl=64 time=0.5 ms

64 bytes from 10.174.100.14: icmp_seq=3 ttl=64 time=0.5 ms

64 bytes from 10.174.100.14: icmp_seq=4 ttl=64 time=0.5 ms

64 bytes from 10.174.100.14: icmp_seq=5 ttl=64 time=0.5 ms

64 bytes from 10.174.100.14: icmp_seq=6 ttl=64 time=0.5 ms

64 bytes from 10.174.100.14: icmp_seq=7 ttl=64 time=0.6 ms

64 bytes from 10.174.100.14: icmp_seq=8 ttl=64 time=0.5 ms

--- 10.174.100.14 ping statistics ---

9 packets transmitted, 9 packets received, 0% packet loss

round-trip min/avg/max = 0.5/0.5/1.1 ms

#

#1 lore raw
Quoted 1 line · In message <[email protected]> you wrote:

Should U-Boot be able to pass the board's IP address to the kernel?

Yes, of course - as part of the "ip=" boot argument, using the kernel's IP autoconfiguration meachnism.

Quoted 5 lines

Immediately after logging in, I cannot ping. ifconfig shows the correct hardware address that was set in U-Boot, but not the IP address, which was similarly set in U-Boot. Also, many of the statistical fields have garbage data in them (see below). If I then set the IP address, ifconfig returns the IP address and the other fields are correct. Then, I can ping.

Unfortunately you don't provide any information about your hardware, kernel configuration(IP autoconfiguration enabled?) and kernel boot arguments ("ip=" passed?). Your kernel may be misconfigured, and/or you may be passing bad or insufficient boot arguments. Also, the garbage data in the ifconfig output suggests that your ethernet driver in Linux is somewhat crappy.

Best regards,

Wolfgang Denk

Signature · 4 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
There's another way to survive.  Mutual trust -- and help.
	-- Kirk, "Day of the Dove", stardate unknown