2009-09-09 10:20:33 Configuring eth0 via DHCP
Rainer Zufall (GERMANY)
Message: 79710
Hi,
How can I configure eth0 via DHCP in my µcLinux.
What I have tried:
root:/> ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:1E:8C:66:A2:FF
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 B) TX bytes:0 (0.0 B)
Interrupt:42 Base address:0x300 DMA chan:ff
root:/> dhcpcd
eth0: link down
root:/>
root:/> ifconfig eth0 dynamic
root:/> ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:1E:8C:66:A2:FF
BROADCAST 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)
Interrupt:42 Base address:0x300 DMA chan:ff
root:/>
I'am using an BF533 EZKIT with this Image:
uImage_BF533-EZKIT
U-Boot works fine with DHCP, so the DHCP Server should work correctly.
Thank you.
TranslateQuoteReplyEditDelete
2009-09-09 10:27:14 Re: Configuring eth0 via DHCP
Mike Frysinger (UNITED STATES)
Message: 79711
coLinux is just a Debian install. so if you want to know how to configure Debian, try asking on a Debian site or googling for that.
QuoteReplyEditDelete
2009-09-09 10:31:48 Re: Configuring eth0 via DHCP
Mike Frysinger (UNITED STATES)
Message: 79712
also, coLinux by default doesnt access the network directly. i dont know why you'd want to do this at all, but the coLinux documentation explains how to muck with the settings.
docs.blackfin.uclinux.org/doku.php?id=colinux
QuoteReplyEditDelete
2009-09-09 18:47:44 Re: Configuring eth0 via DHCP
Vivek Vaid (UNITED STATES)
Message: 79717
Rainer
I dont know if this will help your situation, but I have been succesful in using udhcpc on my bf537 board.
( this does not mean I have had problems with dhcpcd, just that i hane never enabled it during kernel build.)
If you want to try udhcpc, do the following -
enable udhcpc in busybox/networking (with noisy debugging options for now.)
then after the bfin boots, copy the following file with name "default.script" in /usr/share/udhcpc on the bfin. (could transfer the file using lrz.)
--------
#!/bin/sh
# udhcpc script
[ -z "$1" ] && echo "Error: should be called from udhcpc" && exit 1
case "$1" in
deconfig)
ifconfig $interface 0.0.0.0
;;
renew|bound)
ifconfig $interface $ip $BROADCAST $NETMASK
;;
esac
exit 0
----------
now udhcpc should work.
You could include the script file permanently in the build process by modifying the Makefile.
QuoteReplyEditDelete
2009-09-10 01:59:02 Re: Configuring eth0 via DHCP
Rainer Zufall (GERMANY)
Message: 79721
I will try this when I'm able to build a kernel.
Thank you.
TranslateQuoteReplyEditDelete
2009-09-10 02:02:56 Re: Configuring eth0 via DHCP
Rainer Zufall (GERMANY)
Message: 79722
I don't know why you telling me things about coLinux. What has this to do with my problem?
All I'm trying is that my ucLinux, running on my EZKIT BF533, gets its ipaddress, netmask and gateway from the DCHP Server, which is runnig in my network....
TranslateQuoteReplyEditDelete
2009-09-10 03:46:59 Re: Configuring eth0 via DHCP
Mike Frysinger (UNITED STATES)
Message: 79742
you said "cLinux" which is more likely coLinux than Linux on the Blackfin board
if you want to configure the Blackfin board, read the documentation. it goes into plenty of detail.
QuoteReplyEditDelete
2009-09-10 04:23:43 Re: Configuring eth0 via DHCP
Rainer Zufall (GERMANY)
Message: 79745
I have already searched in the documentation, but couldn't find anything about this issue.
Maybe you could post a link to the right page?
Thank you
TranslateQuoteReplyEditDelete
2009-09-10 04:29:41 Re: Configuring eth0 via DHCP
Mike Frysinger (UNITED STATES)
Message: 79746
simply searching for "dhcp" results in the answer in the top 4 results
docs.blackfin.uclinux.org/doku.php?id=setting_up_the_network
QuoteReplyEditDelete
2009-09-10 04:48:41 Re: Configuring eth0 via DHCP
Rainer Zufall (GERMANY)
Message: 79747
simply searching for "dhcp" results in the answer in the top 4 results
docs.blackfin.uclinux.org/doku.php?id=setting_up_the_network
---
Mabe I'm just blind, but I could not find the solution. I've read the section Automatic Network Setup
Then I followed the link to this page:
docs.blackfin.uclinux.org/doku.php?id=uclinux-dist:dhcpcd
I followed the steps but on step two I get the error I already posted:
root:/> dhcpcd &
142
root:/> eth0: link down
root:/> ifconfig
eth0 Link encap:Ethernet HWaddr 00:1E:8C:66:A2:FF
UP BROADCAST NOTRAILERS 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)
Interrupt:42 Base address:0x300 DMA chan:ff
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:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
root:/>
And as I said: I can't find the solution (in the documentation)
So, what do I have to do - where do I have to look?
TranslateQuoteReplyEditDelete
2009-09-10 04:54:01 Re: Configuring eth0 via DHCP
Mike Frysinger (UNITED STATES)
Message: 79748
if the link is down, are you sure the cable is plugged in/correct as is the hardware ?
did you try manually configuring it and pinging a machine ?
QuoteReplyEditDelete
2009-09-10 05:03:32 Re: Configuring eth0 via DHCP
Rainer Zufall (GERMANY)
Message: 79749
The cable is plugged in and the DHCP Server is running correctly, because booting via ethernet with DHCP works. So U-Boot can configure/handle eth0 via/with DHCP...
I've tried to configure it manually, but pinging results in no response:
root:/> ifconfig eth0 192.168.110.123 netmask 255.255.255.0
eth0: link down
root:/> ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:1E:8C:66:A2:FF
inet addr:192.168.110.123 Bcast:192.168.110.255 Mask:255.255.255.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 B) TX bytes:0 (0.0 B)
Interrupt:42 Base address:0x300 DMA chan:ff
root:/> ifconfig eth0 192.168.110.123 netmask 255.255.255.0 up
root:/> ifconfig
eth0 Link encap:Ethernet HWaddr 00:1E:8C:66:A2:FF
inet addr:192.168.110.123 Bcast:192.168.110.255 Mask:255.255.255.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 B) TX bytes:0 (0.0 B)
Interrupt:42 Base address:0x300 DMA chan:ff
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:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
root:/>
TranslateQuoteReplyEditDelete
2009-09-10 05:44:16 Re: Configuring eth0 via DHCP
Mike Frysinger (UNITED STATES)
Message: 79750
except u-boot utilizes the hardware differently from linux, so a working configuration in one place does not directly indicate the hardware is 100%
QuoteReplyEditDelete
2009-09-10 06:35:54 Re: Configuring eth0 via DHCP
Rainer Zufall (GERMANY)
Message: 79751
except u-boot utilizes the hardware differently from linux, so a working configuration in one place does not directly indicate the hardware is 100%
---
Okay, I agree with that.
But I think that I can assume that the cable is plugged in correctly. And the DHCP server provides addresses for a lot of other computers in this network (also for my ubuntu and it works)....
Any other ideas maybe?
TranslateQuoteReplyEditDelete
2009-09-10 11:47:36 Re: Configuring eth0 via DHCP
Robin Getz (UNITED STATES)
Message: 79754
Rainer:
Look at the switch settings on the EZKit/LAN adapter.
U-Boot polls, Linux uses interrupts. If the interrupt line is not connected properly, Linux networking will not function, while U-Boot does.
-Robin
QuoteReplyEditDelete
2009-09-11 05:08:15 Re: Configuring eth0 via DHCP
Rainer Zufall (GERMANY)
Message: 79801
Rainer:
Look at the switch settings on the EZKit/LAN adapter.
U-Boot polls, Linux uses interrupts. If the interrupt line is not connected properly, Linux networking will not function, while U-Boot does.
-Robin
---
I have checkt all jumpers an switches of the EZKIT and the extender board. As far as I know everything should be correct.
I post all settings because I'm getting desperate :-(
Extender Board:
JP1: not populated
JP2: populated
JP3: not populated
SW1.1-3 : ON
SW1.4 : OFF
SW2: : ALL OFF
BF533 EZKIT:
JP1: depends on U-Boot file format
SW1: ALL OFF
SW2: ALL OFF
SW3.1-5: OFF
SW3.6 : ON (also tried off)
SW9.1-4: ON
SW9.5: OFF (also tried on)
SW9.6: OFF (also tried on)
Any ideas?
TranslateQuoteReplyEditDelete
2009-09-11 13:12:05 Re: Configuring eth0 via DHCP
Robin Getz (UNITED STATES)
Message: 79814
Rainer:
That looks correct - but I don't know what version of things you have - double check the schematics, and see if the interrupt line is wiggling with a scope.
-Robin