Forum Discussion
eth0 not found
I am trying to bring up the Ethernet interface of my DE2 board, but it keeps me showing "SIOCSIFADDR: No such device" when I ifconfig it.
I followed every step of the tutorial and I am using the uClinux-dist-test-20060511.tar.bz2 with only the uClinux-dist.diff.gz patch. Is there something wrong with this kernel? I am starting to think it could be a hardware problem, cause my board's ethernet connector leds do not turn on when I plug the network cable. Following are the system messages:Uncompressing Linux... Ok, booting the kernel.
Linux version 2.6.16-uc0 (root@localhost) (gcc version 3.4.6)# 7 PREEMPT Thu Aug
3 03:53:27 Local time zone must be set--see z
uClinux/Nios II
Altera Nios II support (C) 2004 Microtronix Datacom Ltd.
setup_arch: No persistant network settings signature at 003F0000
Built 1 zonelists
Kernel command line:
PID hash table entries: 64 (order: 6, 1024 bytes)
Dentry cache hash table entries: 2048 (order: 1, 8192 bytes)
Inode-cache hash table entries: 1024 (order: 0, 4096 bytes)
Memory available: 6600k/8192k RAM, 0k/0k ROM (1173k kernel code, 324k data)
Mount-cache hash table entries: 512
NET: Registered protocol family 16
io scheduler noop registered
io scheduler deadline registered (default)
Serial: JTAG UART driver $Revision: 1.4 $
ttyJ0 at MMIO 0x80400830 (irq = 1) is a jtag_uart
dmfe_probe:eth0, 50000 Khz Nios
dmfe_probe: eth0 VID: 0x2B2A2928 .ne. 0x90000A46
NET: Registered protocol family 2
IP route cache hash table entries: 128 (order: -3, 512 bytes)
TCP established hash table entries: 512 (order: -1, 2048 bytes)
TCP bind hash table entries: 512 (order: -1, 2048 bytes)
TCP: Hash tables configured (established 512 bind 512)
TCP reno registered
TCP bic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
Freeing unused kernel memory: 224k freed (0x932000 - 0x969000)
Shell invoked to run file: /etc/rc
Command: hostname uClinux
Command: mount -t proc proc /proc
Command: mount -t sysfs sysfs /sys
Command: mount -t usbfs none /proc/bus/usb
mount failed: No such file or directory
Command: mkdir /var/tmp
Command: mkdir /var/log
Command: mkdir /var/run
Command: mkdir /var/lock
Command: mkdir /var/empty
Command: ifconfig lo 127.0.0.1
Command: route add -net 127.0.0.0 netmask 255.0.0.0 lo
Command: cat /etc/motd
Welcome to
____ _ _
/ __| ||_|
_ _| | | | _ ____ _ _ _ _
| | | | | | || | _ \| | | |\ \/ /
| |_| | |__| || | | | | |_| |/
| ___\____|_||_|_| |_|\____|\_/\_/
| |
|_|
For further information check:
http://www.uclinux.org/
Execution Finished, Exiting
Sash command shell (version 1.1.1)
/> ifconfig eth0 192.168.254.11
SIOCSIFADDR: No such device Thanks11 Replies
- Altera_Forum
Honored Contributor
Hi,
make sure that when you are defining the Nios system using SOPC builder the LAN device is not assigned the IRQ no 0. Better make it more than 2 as sometimes I face problems when IRQ is defined less than 2. - sony - Altera_Forum
Honored Contributor
--- Quote Start --- originally posted by sony_sony@Aug 3 2006, 05:19 AM hi,make sure that when you are defining the nios system using sopc builder the lan device is not assigned the irq no 0. better make it more than 2 as sometimes i face problems when irq is defined less than 2.
- sony
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=17376)
--- quote end ---
--- Quote End --- I assigned IRQ 4. Do you have any other suggestion? Thanks
- Altera_Forum
Honored Contributor
Dear Alair,
I haven't solved the problem thoroughly. Before, I change the DM9000A, then it's ok! but some days later, it bad again. So I'm puzzled. Now I don't have a gpood idea! Best Regards! Feiwu - Altera_Forum
Honored Contributor
I have figured out what was wrong just after a good night of sleep. It's amazing how things get clear when you have a shower. http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/biggrin.gif
I had forgotten to provide the proper clock to ENET_CLK signal! I knew I was missing something. Pehaps you are missing the same thing. Be careful of how you implement this clock. I did as follow and everything went ok:
You can make this code without the tmpClk signal, I did it just for readability, but be sure of initialize the signal with "0" or '1' before applying the NOT operator. I also had a look at the uCLinux source and changed my IRQ to 3 as well. This is the default IRQ for DM9000 and I thought it would avoid later problems. Good luck!!-- SOME CODE HERE -- ... SIGNAL tmpClk : STD_LOGIC := '0'; BEGIN -- ENET CLOCK (25MHz) tmpClk <= NOT tmpClk WHEN CLOCK_50'EVENT AND CLOCK_50 = '1'; ENET_CLK <= tmpClk; -- MORE CODE HERE -- ... - Altera_Forum
Honored Contributor
Copyright 1996-2003 by InterNiche Technologies. All rights reserved.
Static IP Address is 192.168.0.187 prepared 1 interface, initializing... Created "Inet main" task (Prio: 2) s91: No PHY found SMSC ethernet Rev: 0x0, ram: 8192 IP address of et1 : 192.168.0.187 Created "clock tick" task (Prio: 3) Simple Socket Server starting up [sss_task] Simple Socket Server listening on port 30 Created "simple socket server" task (Prio: 4) when test enet, nios 2 run to these,and stop - Altera_Forum
Honored Contributor
What hardware do you have? Are you sure s91 is the correct driver?
- Altera_Forum
Honored Contributor
the FPGA: EP2S90,the ethernet is LAN91C111,use the nios "simple_socket_server" to test
- Altera_Forum
Honored Contributor
Okay, it is the correct driver. The message seems to indicate that there is a problem with initialization of the chip. Is it your own FPGA design or are you using one supplied with the kit?
- Altera_Forum
Honored Contributor
it's my own own FPGA design .you said "there is a problem with initialization of the chip", you mean the chip is EP2S90 or LAN91C111.
thank you very much. - Altera_Forum
Honored Contributor
I meant the LAN91C111. Can you try a .ptf/.sof combination provided with the kit? That way you'll know if the problem is from the hardware or the FPGA design.