2010-01-25 04:49:07     Network works with uBoot but not with uClinux

Document created by Aaronwu Employee on Aug 22, 2013
Version 1Show Document
  • View in full screen mode

2010-01-25 04:49:07     Network works with uBoot but not with uClinux

Mike Bunke (GERMANY)

Message: 85082   

 

When running uBoot DHCP and PING works fine, but with uClinux running there is no more answer to the ping request.

It's the same with not using DHCP in uBoot but ifconfig in uClinux to configure network: ping fails.

What's the problem? What am I doing wrong?

I'm using

BF518F-EZBRD

Uboot 2009R1.1-rc1

uImage 2009R1.1-RC4

 

Here what happens:

 

 

U-Boot 2008.10 (ADI-2009R1.1-rc1) (Dec  4 2009 - 03:18:46)

 

CPU:   ADSP bf518-0.0 (Detected Rev: 0.1) (parallel flash boot)

Board: ADI BF518F EZ-Board board

       Support:   blackfin.uclinux.org/

Clock: VCO: 400 MHz, Core: 400 MHz, System: 80 MHz

RAM:   64 MB

Flash:  4 MB

In:    serial

Out:   serial

Err:   serial

Net:   Blackfin EMAC

MAC:   00:E0:22:FE:5F:94

Hit any key to stop autoboot:  0

bfin> dhcp

BOOTP broadcast 1

DHCP client bound to address 192.168.1.15

bfin> ping 192.168.1.3

Using Blackfin EMAC device

host 192.168.1.3 is alive                                                                                                        <-everything's fine

bfin> run addip

bfin> run bootcmd

 

...

 

## Booting kernel from Legacy Image at 01000000 ...

   Image Name:   Linux-2.6.28.10-ADI-2009R1.1

   Created:      2009-12-24   4:38:20 UTC

   Image Type:   Blackfin Linux Kernel Image (gzip compressed)

   Data Size:    3807115 Bytes =  3.6 MB

   Load Address: 00001000

   Entry Point:  00190b80

   Verifying Checksum ... OK

   Uncompressing Kernel Image ...

 

...

 

BusyBox v1.13.4 (2009-12-24 12:36:40 CST) built-in shell (msh)

Enter 'help' for a list of built-in commands.

 

root:/> ifconfig                                                                                                                      <- after booting

eth0      Link encap:Ethernet  HWaddr 00:E0:22:FE:5F:94

          inet addr:192.168.1.15  Bcast:192.168.1.255  Mask:255.255.255.0

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

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

 

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:/> ping -c 3 192.168.1.3                                                                                               <- but ping fails

PING 192.168.1.3 (192.168.1.3): 56 data bytes

 

--- 192.168.1.3 ping statistics ---

3 packets transmitted, 0 packets received, 100% packet loss

root:/>

TranslateQuoteReplyEditDelete

 

 

2010-01-25 10:32:17     Re: Network works with uBoot but not with uClinux

Mike Frysinger (UNITED STATES)

Message: 85088   

 

if your BF518F-EZBRD only has 1 NIC, then find locate PORTG_FER in /sys/kernel/debug/blackfin/ and clear bit 1 in the file.

QuoteReplyEditDelete

 

 

2010-01-26 02:34:48     Re: Network works with uBoot but not with uClinux

Mike Bunke (GERMANY)

Message: 85113   

 

Seems there is no such file in the directory sys/kernel/debug/blackfin. Or I don't have permission to access!?

 

Is it possible to modify the kernel build process in any way that leads to correct functionality? Til now I tried it with the released uImage but in future I have to build my own image anyway.

TranslateQuoteReplyEditDelete

 

 

2010-01-26 02:40:42     Re: Network works with uBoot but not with uClinux

Mike Frysinger (UNITED STATES)

Message: 85115   

 

are you sure there's no file ?  the default uImage should always have this stuff enabled.

 

find /sys/kernel/debug/blackfin/ -name 'PORT*_FER'

 

the kernel is currently broken, but i imagine if you removed P_MII0_ERxER from:

arch/blackfin/mach-bf518/include/mach/portmux.h

 

that might do the trick

QuoteReplyEditDelete

 

 

2010-01-26 04:31:50     Re: Network works with uBoot but not with uClinux

Mike Bunke (GERMANY)

Message: 85162   

 

Everything's fine with the new build (with modified portmux.h).

 

Thanks a lot.

TranslateQuoteReplyEditDelete

 

 

2010-07-31 23:42:16     Re: Network works with uBoot but not with uClinux

Thoralf Baum (GERMANY)

Message: 91971   

 

Hi all,

 

I have just the same problem but the solution described here does not do the job for me - or I'm doing something wrong.

 

When uclinux is booted (after loaded via TFTP well), the eth0 is down. When I do 'ifconfig eth0 dynamic up', it does not do so. There are Rx-packets counted after repeated ifconfig but Tx packets remain 0.

 

My BF518F-EZBRD comes along with the National Semi DP83848, not with the Micrel mentioned in the data sheet.

 

I have tried these actions - without success:

 

1. commented out the P_MII0_ERxER in P_MII0 and P_RMII0 definitions in portmux.h

 

2. Set the kernel config option "Driver Options -> Network Device Support -> National Semiconductor"

 

Does anyone have an idea for me to get the ethernet connection running?

 

Thanks very much,

 

best regards,

 

Thoralf

TranslateQuoteReplyEditDelete

 

 

2010-08-01 01:44:48     Re: Network works with uBoot but not with uClinux

Mike Frysinger (UNITED STATES)

Message: 91973   

 

using "dynamic" doesnt make sense.  either hardcode the IP address or use dhcp.  both are documented in the wiki.

 

QuoteReplyEditDelete

 

 

2010-08-01 05:20:49     Re: Network works with uBoot but not with uClinux

Thoralf Baum (GERMANY)

Message: 91984   

 

Thank you very much, that's it!

TranslateQuoteReplyEditDelete

Attachments

    Outcomes