[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [openrisc] How to make ping work on or1ksim



Hi,

After I sent out the question on how to run ping on or1ksim, some
people told me they have the same problem and asked me whether I 
have solved the problem. I have finally figured out how to do that. 
Here is how:

1. Use "--enable-ethphy" as option when "configure" or1ksim.
2. Assume your LAN subnet is 192.168.0.0/24. Go to or1k/romfs/etc,
   edit "rc" to be
   ifconfig eth0 inet 192.168.0.9 netmask 255.255.255.0 hw ether 
00:11:22:33:44:55
   route add -net 192.168.0.0 netmask 255.255.255.0 dev eth0
3. Run genfomfs, and compile uCLinux.
4. Run or1ksim as root. (It took me a lot of time to figure this out! )
5. Run "ping 192.168.0.9", you should see loop-back reponse.
6. Assume another host on LAN is 192.168.0.1, run
   "ping  192.168.0.1". You should see ping reponse from that host.


you-wen


----- Original Message ----- 
From: You-Wen Yi <youwenyi@a... > 
To: openrisc@o... , youwenyi@a...  
Date: Sat, 08 Mar 2003 19:18:00 -0800 
Subject: [openrisc] How to make ping work on or1ksim 

> 
> 
> Hi, 
> 
> I compiled uClinux and or1ksim following intructions in 
> or1k/uclinux/uClinux-2.0.x/README.or32. 
> Basic unix commands like "ls" and "cd" work. But networking 
> commands 
> don't work. 
> 
> The /etc/rc executes 
>       Command: ifconfig eth0 inet 10.1.1.200 netmask 255.0.0.0 hw 
> ether 
> 00:01:02:03:04:05 
>       Command: route add -net 10.0.0.0 netmask 255.0.0.0 dev eth0 
> when booting up the system. I don't see  error messsage for these 
> two 
> commands. 
> 
> After that, if I do "ifconfig" to confirm network configuration, I 
> get 
>       /proc/net/dev: No such file or directory 
> 
> If I do "route", I get 
>     /proc/net/route: No such file or directory 
>     INET (IPv4) not configured in this system. 
> 
> If I do "ping 192.168.0.1", I get 
>     PING 192.168.0.1 (192.168.0.1): 56 data bytes 
>     ping: sendto: Network is unreachable 
>     ping: wrote 192.168.0.1 64 chars, ret=-1 
>     ping: sendto: Network is unreachable 
>     .... 
> 
> Can anybody tell me how to fix the problem? 
> I don't see directory /proc, should I add that directory to make 
> networking commands work? 
> Should I make the  IP address and Ethernet MAC address to be same 
> as 
> those of 
> the host PC running or1ksim? Which file should I change? 
> 
> Thanks ! 
> 
> You-Wen Yi 
> 
--
To unsubscribe from openrisc mailing list please visit http://www.opencores.org/mailinglists.shtml