Mini2440 - Help with Ethernet Connection on Uboot

CRASHOVERRIDE
Hi all,

I can boot my board Mini2440 by SDCard, but i have a problem with the
ethernet connection, neither the pc or the board detects the connection
through the ethernet cable. If anyone can help me with this problem, i
would be appreciated.

This is my boot of kernel on uboot:

Starting kernel ...

Uncompressing
Linux...........................................................................
....................................................
done, booting the kernel.
Linux version 2.6.32-rc8 (crashoverride@VPCF1) (gcc version 4.6.1 (Sourcery
CodeBench Lite 2011.09-70) ) #1 Thu May 31 16:21:56 WEST 2012
CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=c0007177
CPU: VIVT data cache, VIVT instruction cache
Machine: MINI2440
Memory policy: ECC disabled, Data cache writeback
CPU S3C2440A (id 0x32440001)
S3C24XX Clocks, (c) 2004 Simtec Electronics
S3C244X: core 405.000 MHz, memory 101.250 MHz, peripheral 50.625 MHz
CLOCK: Slow mode (1.500 MHz), fast, MPLL on, UPLL on
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16256
Kernel command line: root=/dev/mmcblk0p3 rw rootwait rootfstype=ext3
console=ttySAC0,115200
PID hash table entries: 256 (order: -2, 1024 bytes)
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 64MB = 64MB total
Memory: 60712KB available (3532K code, 387K data, 128K init, 0K highmem)
SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Hierarchical RCU implementation.
NR_IRQS:85
irq: clearing pending status 02000000
irq: clearing subpending status 00000003
irq: clearing subpending status 00000002
Console: colour dummy device 80x30
console [ttySAC0] enabled
Calibrating delay loop... 201.93 BogoMIPS (lpj=504832)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
NET: Registered protocol family 16
MINI2440: Option string mini2440=0tb
MINI2440: LCD [0:240x320] 1:800x480 2:1024x768 3:240x320 4:640x480
S3C2440: Initialising architecture
S3C2440: IRQ Support
S3C24XX DMA Driver, (c) 2003-2004,2006 Simtec Electronics
DMA channel 0 at c4808000, irq 33
DMA channel 1 at c4808040, irq 34
DMA channel 2 at c4808080, irq 35
DMA channel 3 at c48080c0, irq 36
S3C244X: Clock Support, DVS off
S3C24XX CPU Frequency driver, s3c244x cpu support
bio: create slab <bio-0> at 0
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
s3c-i2c s3c2440-i2c: slave address 0x10
s3c-i2c s3c2440-i2c: bus frequency set to 98 KHz
s3c-i2c s3c2440-i2c: i2c-0: S3C I2C adapter
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP reno registered
NET: Registered protocol family 1
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
squashfs: version 4.0 (2009/01/31) Phillip Lougher
JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
msgmni has been set to 118
alg: No test for stdrng (krng)
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler deadline registered
io scheduler cfq registered
Console: switching to colour frame buffer device 60x53
fb0: s3c2410fb frame buffer device
s3c2440-uart.0: ttySAC0 at MMIO 0x50000000 (irq = 70) is a S3C2440
s3c2440-uart.1: ttySAC1 at MMIO 0x50004000 (irq = 73) is a S3C2440
s3c2440-uart.2: ttySAC2 at MMIO 0x50008000 (irq = 76) is a S3C2440
brd: module loaded
at24 0-0050: 1024 byte 24c08 EEPROM (writable)
S3C24XX NAND Driver, (c) 2004 Simtec Electronics
s3c24xx-nand s3c2440-nand: Tacls=1, 9ns Twrph0=3 29ns, Twrph1=2 19ns
s3c24xx-nand s3c2440-nand: NAND soft ECC
NAND device: Manufacturer ID: 0xec, Chip ID: 0xf1 (Samsung NAND 128MiB 3,3V
8-bit)
Creating 4 MTD partitions on "NAND 128MiB 3,3V 8-bit":
0x000000000000-0x000000040000 : "u-boot"
0x000000040000-0x000000060000 : "u-boot-env"
0x000000060000-0x000000560000 : "kernel"
0x000000560000-0x000008000000 : "root"
dm9000 Ethernet Driver, V1.31
eth0: dm9000e at c4860300,c4864304 IRQ 51 MAC: 04:25:fe:ed:00:18 (chip)
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
s3c2410-ohci s3c2410-ohci: S3C24XX OHCI
s3c2410-ohci s3c2410-ohci: new USB bus registered, assigned bus number 1
s3c2410-ohci s3c2410-ohci: irq 42, io mem 0x49000000
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
usbcore: registered new interface driver libusual
mice: PS/2 mouse device common for all mice
input: gpio-keys as /devices/platform/gpio-keys/input/input0
s3c2440-ts s3c2440-ts: Starting
  Created group ts filter len 12 depth 2 close 10 thresh 6
  Created Median ts filter len 20 depth 2 dec 24
  Created Mean ts filter len 4 depth 2 thresh 65535
  Created Linear ts filter depth 2
s3c2440-ts s3c2440-ts: 4 filter(s) initialized
s3c2440-ts s3c2440-ts: successfully loaded
input: s3c2410 TouchScreen as /devices/virtual/input/input1
S3C24XX RTC, (c) 2004,2006 Simtec Electronics
s3c2410-rtc s3c2410-rtc: rtc disabled, re-enabling
s3c2410-rtc s3c2410-rtc: rtc core: registered s3c as rtc0
i2c /dev entries driver
S3C2410 Watchdog Timer, (c) 2004 Simtec Electronics
s3c2410-wdt s3c2410-wdt: watchdog inactive, reset disabled, irq enabled
cpuidle: using governor ladder
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
s3c-sdi s3c2440-sdi: powered down.
s3c-sdi s3c2440-sdi: mmc0 - using pio, sw SDIO IRQ
s3c-sdi s3c2440-sdi: running at 0kHz (requested: 0kHz).
Registered led device: led1
Registered led device: led2
Registered led device: led3
Registered led device: led4
Registered led device: backlight
s3c-sdi s3c2440-sdi: running at 398kHz (requested: 400kHz).
usbcore: registered new interface driver hiddev
usbcore: registered new interface driver usbhid
usbhid: v2.6:USB HID core driver
s3c-sdi s3c2440-sdi: running at 398kHz (requested: 400kHz).
Advanced Linux Sound Architecture Driver Version 1.0.21.
s3c-sdi s3c2440-sdi: running at 398kHz (requested: 400kHz).
No device for DAI UDA134X
No device for DAI s3c24xx-i2s
S3C24XX_UDA134X SoC Audio driver
s3c-sdi s3c2440-sdi: running at 398kHz (requested: 400kHz).
s3c-sdi s3c2440-sdi: running at 398kHz (requested: 400kHz).
UDA134X SoC Audio Codec
s3c-sdi s3c2440-sdi: running at 398kHz (requested: 400kHz).
asoc: UDA134X <-> s3c24xx-i2s mapping ok
ALSA device list:
  #0: S3C24XX_UDA134X (UDA134X)
TCP cubic registered
NET: Registered protocol family 17
s3c2410-rtc s3c2410-rtc: hctosys: invalid date/time
Waiting for root device /dev/mmcblk0p3...
s3c-sdi s3c2440-sdi: running at 398kHz (requested: 400kHz).
s3c-sdi s3c2440-sdi: running at 16875kHz (requested: 25000kHz).
s3c-sdi s3c2440-sdi: running at 16875kHz (requested: 25000kHz).
mmc0: new SD card at address ff5c
mmcblk0: mmc0:ff5c SD02G 1.83 GiB 
 mmcblk0: p1 p2 p3
kjournald starting.  Commit interval 5 seconds
EXT3-fs warning: maximal mount count reached, running e2fsck is recommended
EXT3 FS on mmcblk0p3, internal journal
EXT3-fs: recovery complete.
EXT3-fs: mounted filesystem with writeback data mode.
VFS: Mounted root (ext3 filesystem) on device 179:3.
Freeing init memory: 128K
Starting logging: OK
Initializing random number generator... done.
Starting network...


Welcome to Buildroot
#

/*When i write on prompt "ifconfig" this is the result*/
# 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: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)

Regards,
CRASHOVERRIDE

davef
Linux version 2.6.32-rc8

From my failing memory that kernel had problems.  Have a look on this site
http://billforums.station51.net
maybe there are some comments there

Why such an old kernel?

However, what have you got in /etc/network/interfaces ?

Shouldn't there be a eth0 ?

CRASHOVERRIDE
Hi davef,

Thank you for your reply, i'm noob in linux and i have some problem with
the commands of console, because i don't know many of it.
I follow your advice and compile a new version of linux kernel, this is my
new boot:

U-Boot 1.3.2-mini2440 (Oct  6 2009 - 12:51:09)

I2C:   ready
DRAM:  64 MB
Flash:  2 MB
NAND:  128 MiB
Found Environment offset in OOB..
USB:   S3C2410 USB Deviced
In:    serial
Out:   serial
Err:   serial
MAC: 04:25:fe:ed:00:18
Hit any key to stop autoboot:  0 
trying to detect SD Card...
Manufacturer:       0x02, OEM "TM"
Product name:       "SD02G", revision 4.8
Serial number:      2882826801
Manufacturing date: 6/2009
CRC:                0x61, b0 = 1
READ_BL_LEN=15, C_SIZE_MULT=7, C_SIZE=365
size = 1642070016

2615928 bytes read
## Booting kernel from Legacy Image at 31000000 ...
   Image Name:   Linux-3.4.2
   Created:      2012-06-15   2:56:29 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2615864 Bytes =  2.5 MB
   Load Address: 30008000
   Entry Point:  30008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
Booting Linux on physical CPU 0
Linux version 3.4.2 (crashoverride@VPCF1) (gcc version 4.6.1 (Sourcery
CodeBench Lite 2011.09-70) ) #1 Fri Jun 15 03:56:16 WEST 2012
CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=c0007177
CPU: VIVT data cache, VIVT instruction cache
Machine: MINI2440
Memory policy: ECC disabled, Data cache writeback
CPU S3C2440A (id 0x32440001)
S3C24XX Clocks, Copyright 2004 Simtec Electronics
S3C244X: core 405.000 MHz, memory 101.250 MHz, peripheral 50.625 MHz
CLOCK: Slow mode (1.500 MHz), fast, MPLL on, UPLL on
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16256
Kernel command line: root=/dev/mmcblk0p3 rw rootwait rootfstype=ext3
console=ttySAC0,115200
PID hash table entries: 256 (order: -2, 1024 bytes)
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 64MB = 64MB total
Memory: 59892k/59892k available, 5644k reserved, 0K highmem
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
    vmalloc : 0xc4800000 - 0xff000000   ( 936 MB)
    lowmem  : 0xc0000000 - 0xc4000000   (  64 MB)
    modules : 0xbf000000 - 0xc0000000   (  16 MB)
      .text : 0xc0008000 - 0xc04626e8   (4458 kB)
      .init : 0xc0463000 - 0xc0486000   ( 140 kB)
      .data : 0xc0486000 - 0xc04b1f60   ( 176 kB)
       .bss : 0xc04b1f84 - 0xc04eb750   ( 230 kB)
SLUB: Genslabs=13, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
NR_IRQS:85
irq: clearing pending status 02000000
irq: clearing subpending status 00000002
sched_clock: 32 bits at 200 Hz, resolution 5000000ns, wraps every
4294967291ms
Console: colour dummy device 80x30
Calibrating delay loop... 201.52 BogoMIPS (lpj=503808)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
Setting up static identity map for 0x303667c8 - 0x30366820
gpiochip_add: registered GPIOs 0 to 23 on device: GPIOA
gpiochip_add: registered GPIOs 32 to 47 on device: GPIOB
gpiochip_add: registered GPIOs 64 to 79 on device: GPIOC
gpiochip_add: registered GPIOs 96 to 111 on device: GPIOD
gpiochip_add: registered GPIOs 128 to 143 on device: GPIOE
gpiochip_add: registered GPIOs 160 to 167 on device: GPIOF
gpiochip_add: registered GPIOs 192 to 207 on device: GPIOG
gpiochip_add: registered GPIOs 224 to 234 on device: GPIOH
gpiochip_add: registered GPIOs 256 to 271 on device: GPIOJ
NET: Registered protocol family 16
MINI2440: Option string mini2440=0tb
MINI2440: 't' ignored, touchscreen not compiled in
MINI2440: LCD [0:240x320] 1:800x480 2:1024x768 3:320x240
S3C2440: Initialising architecture
S3C2440: IRQ Support
S3C244X: Clock Support, DVS off
bio: create slab <bio-0> at 0
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
s3c-i2c s3c2440-i2c: slave address 0x10
s3c-i2c s3c2440-i2c: bus frequency set to 98 KHz
s3c-i2c s3c2440-i2c: i2c-0: S3C I2C adapter
Advanced Linux Sound Architecture Driver Version 1.0.25.
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP: reno registered
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
NFS: Registering the id_resolver key type
jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
ROMFS MTD (C) 2007 Red Hat, Inc.
msgmni has been set to 116
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
Console: switching to colour frame buffer device 60x53
fb0: s3c2410fb frame buffer device
s3c2440-uart.0: ttySAC0 at MMIO 0x50000000 (irq = 70) is a S3C2440
console [ttySAC0] enabled
s3c2440-uart.1: ttySAC1 at MMIO 0x50004000 (irq = 73) is a S3C2440
s3c2440-uart.2: ttySAC2 at MMIO 0x50008000 (irq = 76) is a S3C2440
brd: module loaded
at24 0-0050: 1024 byte 24c08 EEPROM, writable, 16 bytes/write
S3C24XX NAND Driver, (c) 2004 Simtec Electronics
s3c24xx-nand s3c2440-nand: Tacls=1, 9ns Twrph0=3 29ns, Twrph1=2 19ns
s3c24xx-nand s3c2440-nand: NAND soft ECC
NAND device: Manufacturer ID: 0xec, Chip ID: 0xf1 (Samsung NAND 128MiB 3,3V
8-bit)
Creating 4 MTD partitions on "nand":
0x000000000000-0x000000040000 : "u-boot"
ftl_cs: FTL header not found.
0x000000040000-0x000000060000 : "u-boot-env"
ftl_cs: FTL header not found.
0x000000060000-0x000000560000 : "kernel"
ftl_cs: FTL header not found.
0x000000560000-0x000008000000 : "root"
ftl_cs: FTL header not found.
dm9000 Ethernet Driver, V1.31
eth0: dm9000e at c4862300,c4864304 IRQ 51 MAC: 04:25:fe:ed:00:18 (chip)
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
s3c2410-ohci s3c2410-ohci: S3C24XX OHCI
s3c2410-ohci s3c2410-ohci: new USB bus registered, assigned bus number 1
s3c2410-ohci s3c2410-ohci: irq 42, io mem 0x49000000
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
usbcore: registered new interface driver libusual
mousedev: PS/2 mouse device common for all mice
s3c-rtc s3c2410-rtc: rtc disabled, re-enabling
s3c-rtc s3c2410-rtc: rtc core: registered s3c as rtc0
i2c /dev entries driver
s3c2410_wdt: S3C2410 Watchdog Timer, (c) 2004 Simtec Electronics
s3c2410-wdt s3c2410-wdt: watchdog inactive, reset disabled, irq disabled
cpuidle: using governor ladder
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
s3c-sdi s3c2440-sdi: powered down.
s3c-sdi s3c2440-sdi: mmc0 - using pio, sw SDIO IRQ
s3c-sdi s3c2440-sdi: running at 0kHz (requested: 0kHz).
s3c-sdi s3c2440-sdi: running at 398kHz (requested: 400kHz).
s3c-sdi s3c2440-sdi: running at 398kHz (requested: 400kHz).
s3c-sdi s3c2440-sdi: running at 398kHz (requested: 400kHz).
s3c-sdi s3c2440-sdi: running at 398kHz (requested: 400kHz).
s3c-sdi s3c2440-sdi: running at 398kHz (requested: 400kHz).
s3c-sdi s3c2440-sdi: running at 398kHz (requestekjournald starting.  Commit
interval 5 seconds
EXT3-fs (mmcblk0p3): using internal journal
EXT3-fs (mmcblk0p3): recovery complete
EXT3-fs (mmcblk0p3): mounted filesystem with ordered data mode
VFS: Mounted root (ext3 filesystem) on device 179:3.
Freeing init memory: 140K
Starting logging: OK
Initializing random number generator... done.
Starting network...


Welcome to Buildroot

But the problem still the same, the eth0 don't start with the boot. Today i
had some progress, and i was able to ping my pc through board and the other
way the board to pc.
I configure the eth0 in board through the commands "ifconfig eth0
192.168.1.2 netmask 255.255.255.0 up", follow by "route add -host
192.168.1.1 eth0".

This way everything works, but now i need this configuration to start with
boot of the board. Can you help me with this??

Sorry for my english.

Regards,
CRASHOVERRIDE

davef
Be aware that there are many patches to apply to the mainline kernels to
get them to work on the mini2440.  At least that was the situation 6 months
ago.

What have you got in your /etc/network/interfaces file?

Is buildroot using udev?

The will be somewhere that sets up your ethernet stuff.  A udev rule,
/etc/init.d/rcS or other places in /etc there will be some start-up script
for the DM9000.

Happy searching.

CRASHOVERRIDE
Hi davef,

Thank for your help, through the file rcS in "/etc/init.d", i solve the
problem, no the way i wanted, because the ip get fixed in the board, but it
works and that is what matters.

I put this lines in the end of the file:

"ifconfig eth0 192.168.1.2 netmask 255.255.255.0 up"
"route add -host 192.168.1.1 eth0"

And now when i boot the board, it already configures the network.

Regards,
CRASHOVERRIDE