• 0
miguel_rodrigues

Get Internet on Zybo Busybox

Question

Hello everybody,

 

I have been able to complete the "Embedded Linux Tutorial - Zybo" and boot Busybox from the Zybo with a few minor changes (see bottom of the post). I was not able to do the same for the Linaro Ubuntu as the system freezes after a while (more on this in this thread).

 

I don't care using Busybox instead of Linaro, even though its limitations. However I would like to configure Internet and I don't know how to do that. I was able to ping myself by doing: "ifconfig lo 127.0.0.1" followed by "ping 127.0.0.1". However I don't know how to communicate with the outside world, I alway get "network unreachable" error. Does anyone know how to do this?

 

PS: The changes I did to the tutorial were ->

  1. Use the arm_ramdisk from: http://www.wiki.xilinx.com/Build+and+Modify+a+Rootfs
  2. change the bootargs in the zynq-zybo.dts to " bootargs = "console=ttyPS0,115200 root=/dev/ram0 rw init=/sbin/init earlyprintk rootwait devtmps.mount=1" "

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Hi miguel_rodrigues,

I have asked some of our applications engineers about this; they will get back to you here on the forum.

Thanks,
JColvin

Share this post


Link to post
Share on other sites
  • 0

Hello miguel,

I am not familiar with Busybox I bet it isn't any different than a standard linux networking.  Have you tried pinging your router or something on your network?  If you can ping a local network device then all you should have to do is set a nameserver in the /etc/resolv.conf file.  It should be something like this:  

"sudo nano /etc/resolve.conf"

add

"nameserver 8.8.8.8"

and

"nameserver 8.8.4.4"

then reboot or restarting the networking service should fix it.  

Best of luck!

Marshall

Share this post


Link to post
Share on other sites
  • 0

Hi there, I solved the problem. The cable was not correctly connected to the router (should have known since the ethernet leds were not blinking). To enable the internet, the sequence of commands is as follows:

 

  1. ifconfig eth0 YOUR_NEW_IP
  2. route add default gw ROUTER_IP eth0
  3. echo "nameserver ROUTER_IP" >/etc/resolv.conf
  4. ping google.com

where to find your ROUTER_IP you may do "route -n" in your host computer. It is the one marked with the UG flag, under Gateway. As an example:

  1. ifconfig eth0 192.168.1.100
  2. route add default gw 192.168.1.1 eth0
  3. echo "nameserver 192.168.1.1" >/etc/resolv.conf
  4. ping google.com

 

Yes it was a dumb mistake lol

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now