Forum Discussion
21 Replies
- Altera_Forum
Honored Contributor
--- Quote Start --- originally posted by alex.liu@Nov 2 2006, 12:34 AM dear allli have a de2 board. now i want to use the dm9000. i want to know how to connect it to niosii . beacuse i find the uclinux have a drive form dm9000.
how to do it when i use the drive in hardware.pls help me !
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=19069)
--- quote end ---
--- Quote End --- For nios2 linux kernel, (2.6.11-2.6.16.1) Just select in kernel config, drivers->net->100M ether-> Davicom DM9000 And rename na_dm9000 to na_DM9000A in driver/net/dm9000x.c . The uClinux-dist-20060803 was patched to use a new driver. (Though you can use the old one, Davicom DM9000) Just select in kernel config, drivers->net->100M ether-> DM9000 Please follow UclinuxDist page in nios wiki.
- Altera_Forum
Honored Contributor
Thanks hippo
Now I find the SOPC builder have the DM9000 interface ,The next information is my hardward,the name is dm9000, so I will not change the name in dm9000.c in driver/net/ niosii DM9000 Addr[2]------------------------->[cmd] [rd_n]---------------------------->[rd_n] [cs_n]---------------------------->[cs_n] [wr_n]---------------------------->[wr_n] [irq]<------------------------------[irq] but I got the next errors . <div class='quotetop'>QUOTE </div> --- Quote Start --- NET: Registered protocol family 16 Initializing Cryptographic API NIOS serial driver version 0.0 ttyS0 (irq = 1) is a builtin NIOS UART io scheduler noop registered io scheduler deadline registered dmfe_probe:eth0, 50000 Khz Nios dmfe_probe: eth0 VID: 0x2B2A2928 .ne. 0x90000A46 NET: Registered protocol family 2 IP: routing cache hash table of 512 buckets, 4Kbytes TCP established hash table entries: 512 (order: 0, 4096 bytes) TCP bind hash table entries: 512 (order: -1, 2048 bytes) TCP: Hash tables configured (established 512 bind 512) IPv4 over IPv4 tunneling driver GRE over IPv4 tunneling driver NET: Registered protocol family 17 Freeing unused kernel memory: 360k freed (0x119e000 - 0x11f7000) init started: BusyBox v1.1.1-pre0 (2006.11.01-13:08+0000) multi-call binary BusyBox v1.1.1-pre0 (2006.11.01-13:08+0000) Built-in shell (msh) Enter 'help' for a list of built-in commands.# ifconfig eth0 192.168.1.30 netmask 255.255.255.0 oom-killer: gfp_mask=0xd0 DMA per-cpu: cpu 0 hot: low 2, high 6, batch 1 cpu 0 cold: low 0, high 2, batch 1 Normal per-cpu: empty HighMem per-cpu: empty Free pages: 1196kB (0kB HighMem) Active:159 inactive:156 dirty:0 writeback:0 unstable:0 free:299 slab:934 mapped: 0 pagetables:0 DMA free:1196kB min:360kB low:448kB high:540kB active:636kB inactive:624kB prese nt:8192kB pages_scanned:1445 all_unreclaimable? yes lowmem_reserve[]: 0 0 0 Normal free:0kB min:0kB low:0kB high:0kB active:0kB inactive:0kB present:0kB pag es_scanned:0 all_unreclaimable? no lowmem_reserve[]: 0 0 0 HighMem free:0kB min:128kB low:160kB high:192kB active:0kB inactive:0kB present: 0kB pages_scanned:0 all_unreclaimable? no lowmem_reserve[]: 0 0 0 DMA: 1*4kB 1*8kB 0*16kB 1*32kB 0*64kB 1*128kB 0*256kB 0*512kB 1*1024kB 0*2048kB 0*4096kB = 1196kB Normal: empty HighMem: empty Out of Memory: Killed process 40 (sh).[/b] --- Quote End --- why? I have no dma in my system . how to deal with it ? - Altera_Forum
Honored Contributor
Please check nios wiki,
http://nioswiki.jot.com/wikihome/operating...s/tryoutuclinux (http://nioswiki.jot.com/wikihome/operatingsystems/tryoutuclinux) On the DE2 support disc, or you can download from Altera, there is a project with DM9000 enabled. DE2_System/DE2_demonstrations/DE2_NET/ You should check this first. It may be differnet from the one in SOPC builder. ? In your boot message, it does not get the correct port address? - Altera_Forum
Honored Contributor
Hello,
I was going through the Ethrnet page and the new config for the DM9000 on de2 is quite different from the one on the wiki. Instead of changing the dm9000x.c file I had to change the setup.c file in /kernel. Also could any one please make it clear as to how one needs to add the hw_addr for DE2 board as I have to set the MAC address once the board is up and running and then go ifconfig up. to get any connection. - Altera_Forum
Honored Contributor
--- Quote Start --- originally posted by madman23@Nov 3 2006, 01:40 PM hello,i was going through the ethrnet page and the new config for the dm9000 on de2 is quite different from the one on the wiki. instead of changing the dm9000x.c file i had to change the setup.c file in /kernel.
also could any one please make it clear as to how one needs to add the hw_addr for de2 board as i have to set the mac address once the board is up and running and then go ifconfig up. to get any connection.
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=19128)
--- quote end ---
--- Quote End --- The Ethernet page on wiki is out of date, and does not apply to uClinux-dist-20060803. I shall update it later. The DM9000A io address hook up for DE2 was fixed in later patches. Please remove old patch and add newer patch to find out if it can work without modify arch/nios2nommu/kernel/setup.c . So, after all, you can set hw addr ? can bring up the DM9000 eth, ? can set static ip ? If you want to add these initialization to rc, so that it will run after boot. then the file is vendors/Altera/nios2nommu/rc . add these commands to it.
- Altera_Forum
Honored Contributor
Hello,
I use dhcp to get an IP address from the server but yes I can set up the eth0 hw ether, It took some time but I got the MAC addr from the header file in the included-cd. regards, - Altera_Forum
Honored Contributor
--- Quote Start --- originally posted by madman23@Nov 3 2006, 02:33 PM hello,i use dhcp to get an ip address from the server but yes i can set up the eth0 hw ether, it took some time but i got the mac addr from the header file in the included-cd.
regards,
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=19130)
--- quote end ---
--- Quote End --- Great! You are not mad at all. Could you give some hints how to use the dhcp to get an IP ? So I can add them to the wiki, or you can contribute to the wiki (better).
- Altera_Forum
Honored Contributor
Hello,
Once I make sure that the connection is proper I will to put it as an extension wiki page. Currently although running DHCP connection I am not able to connect to the telnet server running on the DE2. Once I am sure that I connect to this server from one of the computers. I will know what I am doing is right. And thus I wont make a mistake on the wiki page. cheers, - Altera_Forum
Honored Contributor
Now I can download it
<div class='quotetop'>QUOTE </div> --- Quote Start --- IOS serial driver version 0.0 ttyS0 (irq = 1) is a builtin NIOS UART io scheduler noop registered io scheduler deadline registered dmfe_probe:eth0, 50000 Khz Nios wyouken@>>id_val=90000a46<DM9000> eth0 I/O: 80200000, VID: 90000a46 ADDR: 00:07:ed:00:00:00 dmfe_probe:eth1, 50000 Khz Nios NET: Registered protocol family 2 IP: routing cache hash table of 512 buckets, 4Kbytes TCP established hash table entries: 512 (order: 0, 4096 bytes) TCP bind hash table entries: 512 (order: -1, 2048 bytes) TCP: Hash tables configured (established 512 bind 512) IPv4 over IPv4 tunneling driver GRE over IPv4 tunneling driver NET: Registered protocol family 17 Freeing unused kernel memory: 360k freed (0x119e000 - 0x11f7000) init started: BusyBox v1.1.1-pre0 (2006.11.01-13:08+0000) multi-call binary BusyBox v1.1.1-pre0 (2006.11.01-13:08+0000) Built-in shell (msh) Enter 'help' for a list of built-in commands.# ifconfig eth0 192.168.1.30 netmark 255.255.255.0 SIOCSIFADDR: Invalid argument# [/b] --- Quote End --- why I get the errors message "SIOCSIFADDR: Invalid argument" - Altera_Forum
Honored Contributor
--- Quote Start --- originally posted by alex.liu@Nov 3 2006, 09:54 PM now i can download it<div class='quotetop'>quote
--- quote end ---
--- quote start ---
ios serial driver version 0.0
ttys0 (irq = 1) is a builtin nios uart
io scheduler noop registered
io scheduler deadline registered
dmfe_probe:eth0, 50000 khz nios
wyouken@>>id_val=90000a46<dm9000> eth0 i/o: 80200000, vid: 90000a46
addr: 00:07:ed:00:00:00
dmfe_probe:eth1, 50000 khz nios
net: registered protocol family 2
ip: routing cache hash table of 512 buckets, 4kbytes
tcp established hash table entries: 512 (order: 0, 4096 bytes)
tcp bind hash table entries: 512 (order: -1, 2048 bytes)
tcp: hash tables configured (established 512 bind 512)
ipv4 over ipv4 tunneling driver
gre over ipv4 tunneling driver
net: registered protocol family 17
freeing unused kernel memory: 360k freed (0x119e000 - 0x11f7000)
init started: busybox v1.1.1-pre0 (2006.11.01-13:08+0000) multi-call binary
busybox v1.1.1-pre0 (2006.11.01-13:08+0000) built-in shell (msh)
enter 'help' for a list of built-in commands.# ifconfig eth0 192.168.1.30 netmark 255.255.255.0
siocsifaddr: invalid argument# --- Quote End --- why I get the errors message "SIOCSIFADDR: Invalid argument" <div align='right'><{post_snapback}> (index.php?act=findpost&pid=19143)</div> [/b] --- Quote End --- DE2 flash chip stores hw ether MAC address at a different place from the Altera dev board. It got incorrect MAC address. That's what madman23 had resloved. He read the hw ether addr from the flash on DE2. The variable name is ->dev_addr[] . Please try give the hw ether addr with ifconfig, (check the updated Ehternet wiki page) ifconfig eth0 hw ether <your hw addr>