Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
12596 Discussions

No Ethernet connection under uClinux with MMU on 3c120 dev board

Altera_Forum
Honored Contributor II
1,044 Views

Hello, 

 

I have problems to get telnet, ftp or http working on uClinux. I used the hardware example from the Altera Wiki for the 3c120 nios2_linux_3c120_125mhz_11.0sp1 with MMU.I followed the instruction on the wiki "Install Nios2 linux" and "Uclinux". I can compile Linux and dowload it on my board and boot it. 

 

Boot screen: 

Linux/Nios II-MMU 

init_bootmem_node(?,0x10582, 0x10000, 0x18000) 

free_bootmem(0x10582000, 0x7a7e000) 

reserve_bootmem(0x10582000, 0x1000) 

Built 1 zonelists in Zone order, mobility grouping on. Total pages: 32512 

Kernel command line: 

PID hash table entries: 512 (order: -1, 2048 bytes) 

Dentry cache hash table entries: 16384 (order: 4, 65536 bytes) 

Inode-cache hash table entries: 8192 (order: 3, 32768 bytes) 

We have 98304 pages of RAM 

Memory available: 124268k/5639k RAM, 0k/0k ROM (2037k kernel code, 3602k data) 

Hierarchical RCU implementation. 

NR_IRQS:32 

Calibrating delay loop... 62.25 BogoMIPS (lpj=311296) 

Mount-cache hash table entries: 512 

NET: Registered protocol family 16 

init_BSP(): registering device resources 

bio: create slab <bio-0> at 0 

Switching to clocksource timer 

NET: Registered protocol family 2 

IP route cache hash table entries: 1024 (order: 0, 4096 bytes) 

TCP established hash table entries: 4096 (order: 3, 32768 bytes) 

TCP bind hash table entries: 4096 (order: 2, 16384 bytes) 

TCP: Hash tables configured (established 4096 bind 4096) 

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 udp transport module. 

RPC: Registered tcp transport module. 

RPC: Registered tcp NFSv4.1 backchannel transport module. 

JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc. 

msgmni has been set to 242 

Block layer SCSI generic (bsg) driver version 0.4 loaded (major 254) 

io scheduler noop registered 

io scheduler deadline registered 

io scheduler cfq registered (default) 

ttyJ0 at MMIO 0x8004d50 (irq = 1) is a Altera JTAG UART 

console [ttyJ0] enabled, bootconsole disabled 

console [ttyJ0] enabled, bootconsole disabled 

ttyS0 at MMIO 0x8004c80 (irq = 10) is a Altera UART 

physmap platform flash device: 04000000 at 00000000 

physmap-flash.0: Found 1 x16 devices at 0x0 in 16-bit bank 

Amd/Fujitsu Extended Query Table at 0x0040 

physmap-flash.0: CFI does not contain boot bank location. Assuming top. 

number of CFI chips: 1 

RedBoot partition parsing not available 

Using physmap partition information 

Creating 9 MTD partitions on "physmap-flash.0": 

0x000000000000-0x000002800000 : "userspace" 

0x000002800000-0x000002900000 : "U-Boot" 

0x000002900000-0x000002d00000 : "uImage1" 

0x000002d00000-0x000003100000 : "uImage2" 

0x000003100000-0x000003500000 : "uImage3" 

0x000003500000-0x000003880000 : "DEFAULT_MMU" 

0x000003880000-0x000003c00000 : "MAXIMUM_MMU" 

0x000003c00000-0x000003f80000 : "USER_IMAGE" 

0x000003f80000-0x000003fa0000 : "options-bits" 

Altera TSE MII Bus: probed 

Found PHY with ID=0x1410cc2 at address=0x12 

Altera Triple Speed MAC IP Driver(v8.0) developed by SLS,August-2008 

mice: PS/2 mouse device common for all mice 

TCP cubic registered 

NET: Registered protocol family 17 

Freeing unused kernel memory: 3060k freed (0xd01ff000 - 0xd04fb000) 

Welcome to 

____ _ _ 

/ __| ||_| 

_ _| | | | _ ____ _ _ _ _ 

| | | | | | || | _ \| | | |\ \/ / 

| |_| | |__| || | | | | |_| |/  

| ___\____|_||_|_| |_|\____|\_/\_/ 

| | 

|_| 

 

For further information check: 

 

 

 

 

BusyBox v1.16.2 (2011-12-15 13:05:05 CET) hush - the humble shell 

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

 

 

 

i configure the ethernet controller: 

 

root:/> ifconfig eth0 192.168.119.21 

root:/> ifconfig 

eth0 Link encap:Ethernet HWaddr 00:70:ED:11:12:12 

inet addr:192.168.119.21 Bcast:192.168.119.255 Mask:255.255.255.0 

UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 

RX packets:460 errors:459 dropped:1 overruns:0 frame:0 

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

collisions:0 txqueuelen:1000 

RX bytes:46 (46.0 TX bytes:0 (0.0 

Base address:0x4000 

 

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 TX bytes:0 (0.0 

 

i can also ping out and into the board 

 

root:/> ping -c3 192.168.119.20 

PING 192.168.119.20 (192.168.119.20): 56 data bytes 

64 bytes from 192.168.119.20: seq=0 ttl=128 time=1010.926 ms 

64 bytes from 192.168.119.20: seq=1 ttl=128 time=1.910 ms 

64 bytes from 192.168.119.20: seq=2 ttl=128 time=0.553 ms 

 

--- 192.168.119.20 ping statistics --- 

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

round-trip min/avg/max = 0.553/337.796/1010.926 ms 

 

 

 

root:/> netstat -a 

Active Internet connections (servers and established) 

Proto Recv-Q Send-Q Local Address Foreign Address State 

 

tcp 0 0 (null):ftp (null):* LISTEN 

 

tcp 0 0 (null):telnet (null):* LISTEN 

 

Active UNIX domain sockets (servers and established) 

Proto RefCnt Flags Type State I-Node Path 

 

 

but if i want to connect per telnet or ftp. its always connection timeout. and if i run ifconfig again, it seems that the board gets the packages but drops it. 

 

root:/> ifconfig 

eth0 Link encap:Ethernet HWaddr 00:70:ED:11:12:12 

inet addr:192.168.119.21 Bcast:192.168.119.255 Mask:255.255.255.0 

UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 

RX packets:718 errors:459 dropped:231 overruns:0 frame:0 

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

collisions:0 txqueuelen:1000 

RX bytes:13022 (12.7 Ki TX bytes:344 (344.0 

Base address:0x4000 

 

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:56 errors:0 dropped:0 overruns:0 frame:0 

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

collisions:0 txqueuelen:0 

RX bytes:4480 (4.3 Ki TX bytes:4480 (4.3 Ki 

 

 

 

i can also start the boa with 

 

root:/> /bin/boa -f /etc/boa.conf & 

[9] 711 /bin/boa -f /etc/boa.conf 

[8] Done boa -fd bin/boa.conf 

root:/> [01/Jan/2007:00:06:02 +0000] boa: server version Boa/0.94.14rc21 

[01/Jan/2007:00:06:02 +0000] boa: server built Dec 15 2011 at 13:05:21. 

[01/Jan/2007:00:06:02 +0000] boa: starting server pid=712, port 80 

root:/> netstat -a 

Active Internet connections (servers and established) 

Proto Recv-Q Send-Q Local Address Foreign Address State 

 

tcp 0 0 (null):http (null):* LISTEN 

 

tcp 0 0 (null):ftp (null):* LISTEN 

 

tcp 0 0 (null):telnet (null):* LISTEN 

 

Active UNIX domain sockets (servers and established) 

Proto RefCnt Flags Type State I-Node Path 

 

 

 

but cant connect either. 

Has anyone an idea what i have done wrong or how i can fix it? Im new to FPGA's and im doing it for an university project. 

Help would be appreciated!
0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
329 Views

Hi, 

 

Have the same problem.. ping working in and out the 3c120 board but not the telnet ssh and ftp... most of the searches that discusses this is 2 years old and it should have been fix by now...  

 

Have you got this working?..
0 Kudos
Altera_Forum
Honored Contributor II
329 Views

Did you get it working? 

If not, check the checksum routine. I had the same issue sometime back, the tcp checksum was wrong, so no tcp traffic could go through. ping works as it does not need checksum.
0 Kudos
Reply