New Horizons









Welcome to my blog

My name is Sven Andersson and I
work as a consultant in embedded
system design, implemented in ASIC
and FPGA.
In my spare time I write this blog
and I hope it will inspire others to
learn more about this fantastic field.
I live in Stockholm Sweden and have
my own company

Contact

You are welcome to contact me
and ask questions or make comments
about my blog.



Content

New Horizons
What's new
Starting a blog
Writing a blog
Using an RSS reader

Zynq Design From Scratch
Started February 2014
Introduction
Changes and updates
Zynq-7000 All Programmable SoC
ZedBoard and other boards
Computer platform and VirtualBox
Installing Ubuntu
Fixing Ubuntu
Installing Vivado
Starting Vivado
Using Vivado
Lab 1. Create a Zynq project
Lab 1. Build a hardware platform
Lab 1. Create a software application
Lab 1. Connect to ZedBoard
Lab 1. Run a software application
Lab 1. Benchmarking ARM Cortex-A9
Lab 2. Adding a GPIO peripheral
Lab 2. Create a custom HDL module
Lab 2. Connect package pins and implement
Lab 2. Create a software application and configure the PL
Lab 2. Debugging a software application
Running Linux from SD card
Installing PetaLinux
Booting PetaLinux
Connect to ZedBoad via ethernet
Rebuilding the PetaLinux kernel image
Running a DHCP server on the host
Running a TFTP server on the host
PetaLinux boot via U-boot
PetaLinux application development
Fixing the host computer
Running NFS servers
VirtualBox seamless mode
Mounting guest file system using sshfs
PetaLinux. Setting up a web server
PetaLinux. Using cgi scripts
PetaLinux. Web enabled application
Convert from VirtualBox to VMware
Running Linaro Ubuntu on ZedBoard
Running Android on ZedBoard
Lab2. Booting from SD card and SPI flash
Lab2. PetaLinux board bringup
Lab2. Writing userspace IO device driver
Lab2. Hardware debugging
MicroZed quick start
Installing Vivado 2014.1
Lab3. Adding push buttons to our Zynq system
Lab3. Adding an interrupt service routine
Installing Ubuntu 14.04
Installing Vivado and Petalinux 2014.2
Using Vivado 2014.2
Upgrading to Ubuntu 14.04
Using Petalinux 2014.2
Booting from SD card and SPI flash
Booting Petalinux 2014.2 from SD card
Booting Petalinux 2014.2 from SPI flash

Chipotle Verification System
Introduction

EE Times Retrospective Series
It all started more than 40 years ago
My first job as an electrical engineer
The Memory (R)evolution
The Microprocessor (R)evolution

Four soft-core processors
Started January 2012
Introduction
Table of contents
Leon3
MicroBlaze
OpenRISC 1200
Nios II

Using the Spartan-6 LX9 MicroBoard
Started August 2011
Introduction
Table of contents
Problems, fixes and solutions

FPGA Design From Scratch
Started December 2006
Introduction
Table of contents
Index
Acronyms and abbreviations

Actel FPGA design
Designing with an Actel FPGA. Part 1
Designing with an Actel FPGA. Part 2
Designing with an Actel FPGA. Part 3
Designing with an Actel FPGA. Part 4
Designing with an Actel FPGA. Part 5

CAD
A hardware designer's best friend
Zoo Design Platform

Linux
Installing Cobra Command Tool
A processor benchmark

Mac
Porting a Unix program to Mac OS X
Fixing a HyperTerminal in Mac OS X
A dream come true

Running
The New York City Marathon

Skiing/Skating
Kittelfjall Lappland

Tour skating in Sweden and around the world
Top
Introduction
SSSK
Wild skating
Tour day
Safety equipment
A look at the equipment you need
Skate maintenance
Links
Books, photos, films and videos
Weather forecasts

Travel
38000 feet above see level
A trip to Spain
Florida the sunshine state

Photo Albums
Seaside Florida
Ronda Spain
Sevilla Spain
Cordoba Spain
Alhambra Spain
Kittelfjäll Lapland
Landsort Art Walk
Skating on thin ice

Books
100 Power Tips for FPGA Designers

Favorites
Adventures in ASIC
ChipHit
Computer History Museum
DeepChip
Design & Reuse
Dilbert
d9 Tech Blog
EDA Cafe
EDA DesignLine
Eli's tech Blog
Embedded.com
EmbeddedRelated.com
FPGA Arcade
FPGA Blog
FPGA Central
FPGA CPU News
FPGA developer
FPGA Journal
FPGA World
Lesley Shannon Courses
Mac 2 Ubuntu
Programmable Logic DesignLine
OpenCores
Simplehelp
SOCcentral
World of ASIC



If you want to be updated on this weblog Enter your email here:



rss feed



 
Saturday, March 15, 2014
Zynq design from scratch. Part 24.
Connect to the ZedBoard via ethernet

We need to establish an ethernet connection between our development host and the development board. Among other things we will use this connection to:

1. Access the web sever running in the PetaLinux installation.
2. Doing netboot.

Physical connection

Here is what the physical connection looks like. I have added an ethernet switch and connected one patch cable between the ethernet connector on the ZedBoard to one of the switch ports. The other patch cable is connected to the ethernet port on the host computer and then to one of the free switch ports. As you can see I am using a MacBook Pro with a native ethernet port. If I get this setup to work I will try the MacBook Air with the external USB to ethernet adapter later on.

 



We will run this setup as a stand-alone network, not relying on a local area network (LAN).

This was the easy part now we are ready for the more complicated software setup.

Fixing the ethernet port

We will setup a static IP address for the built-in ethernet port (en0). On the Mac open the system settings and select Network. Change to manually configure IPv4 and set the IP address to: 192.168.33.1




Open a terminal and enter the command ifconfig:




Checking the connection between the computer and the ZedBoard

We will set the IP Address of the ZedBoard to 192.168.33.2 (same subnet) using the command:

ifconfig eth0 192.168.33.2




Now let's try to ping the ZedBoard from the MacBook.




We have setup a working ethernet connection between our host and the ZedBoard.
 

Accessing the PetaLinux web server

PetaLinux is running a full web server in their Linux installation. To access it we just have to enter the IP address in our favorite web browser.





Let's try some of the menu alternatives. Here is the Admin page.






Establish an ethernet connection between host and guest

Now we have to figure out how to connect to our guest OS (Ubuntu 64bit) from our host (Mac OS) and vice versa. So far we have connected to our virtual machine using NAT.





This will allow the guest system to access the broader internet through our host’s connection. We wll be able to download packages, check email; whatever. Nobody outside sees anything of our guest system; as far as they’re concerned, it doesn’t exist. However, we cannot access any guest resources from our host machine, nor can any guest machines access each other.

Host-Only adapter

We’ll need to add another network adapter to our guest machine, but this time, it’ll be a Host-Only Adapter. By using this type of adapter, we’ll be able to access a private, virtual network consisting solely of our host and any guests. Any of the member machines can access each other, but nothing outside of this self-contained “network in a box” can get in. We will shutdown our guest OS and add a host-only network adapter.

1. Select Preferences from the VirtualBox top menu.
2. In the preference pane select Network.




3. Select Host-only Networks and then the add icon (+). The vboxnet0 will be added.
4. Click the edit icon (the bottom one).
5. Take note of the IP address. That’s the address at which our guests can access the host.
6. The IP address 192.168.0.0 is the start of the Class C private range. By convention, network routers and other gateways use 192.168.0.0 to reference a private network generically.







7. Select DHCP Server.





8.
By default, there’s a DHCP server set up on the network. Since we’re going to be assigning static IP addresses, we don’t really need this, so we can uncheck the “Enable Server” box on the DHCP configuration panel.
9. Click OK
10. We will create a new network adapter (Adapter 2) and attach it to host-only adapter.






11. We are ready to boot our guest OS (Ubuntu).
12. We now have two "ethernet cards" , eth0 and eth1 in our guest OS
.





Configure the guest

We need each of the guests to have a static IP address on the host-only network. Log in to our Ubuntu guest and issue the following command:

sudo ifconfig eth1 192.168.56.101 netmask 255.255.255.0 up

Set guest IP address permanent

If we set the IP address using the ifconfig command it is just temporary. When we reboot Ubuntu this configuration will disappear. To make it permanent follow this steps:

1. From the Ubuntu menu select System Settings->Network.





2. Select the wired network matching eth1. Check the MAC address to find out which one it is. Enable it and click the Options button.





3. Select IPv4 settings. Choose Manual method and specify the IP address, netmask, and gateway. Click Save.



Ping from host to guest





Ping from guest to host





Remote login using ssh

Secure Shell (SSH) is a cryptographic network protocol for secure data communication, remote command-line login, remote command execution, and other secure network services between two networked computers that connects, via a secure channel over an insecure network. Before we can use ssh we have to enable ssh servers for both the host and guest.


Start the ssh/sftp server in Mac OS X

  1. Open System Preferences and click on “Sharing”
  2. Select the check box next to “Remote Login” to enable it.




Setting up an ssh/sftp server in Ubuntu

Install the following packages to enable the ssh server:

sudo apt-get update
sudo apt-get install libncurses5-dev
sudo apt-get install openssh-server


Remote login from host to guest

Here is the command to login from the Mac OS X host. Don't forget to include the guest's username before the IP address.




Remote login from guest to host

Here is the command to login from the Ubuntu guest. Don't forget to include the host's username before the IP address.





Summary

We now have established an ethernet connection between the host and the guest and between the host and the ZedBoard. This will allow us to communicate and transfer data to/from all three nodes in our system.


Top   Previous   Next



Posted at 15:38 by svenand

lalala
August 13, 2014   02:30 AM PDT
 
Hi Sven
My computer and zedboard can ping each other successfully, but my computer cannot @ my zedboard. It says connection refused. I use petalinux 2014.2.
GMA
August 9, 2014   12:07 PM PDT
 
hi Sven

what if we need to set Ethernet on Zedboard, but with standalone application, in order to make a connection with Pc or other device which have ethernet connection, my goal is to send xml file from zedboard to the other device via Ethernet, but with standalone application ?

thank you
 

Leave a Comment:

Name


Homepage (optional)


Comments




Previous Entry Home Next Entry