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

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 08, 2014
Zynq design from scratch. Part 22.
Installing PetaLinux

The PetaLinux Tools offers everything necessary to customize, build and deploy Embedded Linux solutions on Xilinx processing systems. Tailored to accelerate design productivity, the solution works with the Xilinx hardware design tools to ease the development of Linux systems for Zynq®-7000 All Programmable SoC, MicroBlaze and PowerPC.

PetaLinux for MicroBlaze

I have already used PetaLinux in my FPGA design from scratch blog to run Linux on MicroBlaze.

Download PetaLinux installer

Let's go to the PetaLinux download page.




1. Download PetaLinux 2013.10 Installation archive for Zynq and MicroBlaze.






2. Download PetaLinux 2013.10 Board Support Package for Avnet/Digilent ZedBoard.





PetaLinux documentation

Let's start by studying the PetaLinux documentation page.

PetaLinux wiki

Here is a link to the Xilinx PetaLinux wiki.

Prerequisites


The getting started document assumes that the following prerequisites have been satisfied:

Minimum workstation requirements:
  • 2GB RAM (recommended minimum for Xilinx tools)
  • Pentium 4 2GHz CPU clock or equivalent
  • 5 GB free HDD space
  • Supported OS:
  • RHEL 5 (32-bit or 64-bit)
  • RHEL 6 (32-bit or 64-bit)
  • SUSE Enterprise 11 (32-bit or 64-bit)
  • PetaLinux release package downloaded.
  • Valid PetaLinux license.
  • Common system packages and libraries are installed on your workstation. The installation process will check for these.
Ubuntu Linux is not mentioned but I am quite sure we will manage to use Ubuntu. I have done it in the past.

PetaLinux license file

To use PetaLinux we need to install a license file. Let's go to theXilinx  Get License File page.




We will apply for a one year free node-locked license (which can be renewed after one year). Click Generate Node-Locked License.

Add a new host

To add a new host we have to provide the hostname and the hostid (HWaddr).  Here are the commands to find them:

hostname
ifconfig












Click Next to continue and download the license file Xilinx.lic (see Vivado installation).

Merging license files

The Vivado WebPACK and PetaLinux license files can easily be merged together just by copying the content from one of the files to the other.

 

PetaLinux installation

Let's start by reading the PetaLinux SDK User Guide: Installation Guide. We will install PetaLinux in the directory /opt/PetaLinux

cd $HOME/Downloads
sudo ./petalinux-v2013.10-final-installer.run /opt/PetaLinux





Packages required by PetaLinux


PetaLinux requires a number of standard development tools and libraries to be installed on your Linux hostworkstation. The PetaLinux installation process checks for these packages, and reports an error if any are missing, however it does not attempt to install them - you must do this manually. This section describes the required packages, and how to install them on different Linux workstation environments.




I installed the following libraries and programs before installing and running PetaLinux.

sudo apt-get install gawk
sudo apt-get install bison
sudo apt-get install flex
sudo apt-get install zlib1g-dev
sudo apt-get install tofrodos
sudo apt-get install libstdc++6:i386
sudo apt-get install libncurses5:i386
sudo apt-get install libncurses5w-dev:i386
gcc was uninstalled so install it again
sudo apt-get install gcc




Here is the PetaLinux installation directory structure.






Setup PetaLinux SDK working environment

To setup the working environment we source the setup script:


source /opt/PetaLinux/petalinux-v2013.10-final/settings.sh


BSP installation procedure

Included are reference designs for us to start working with and customise for our own projects. These are provided in the form of installable BSP (Board Support Package) files, and include all necessary design and configuration files, including pre-built and tested hardware and software images, ready for download to our board or for booting in the QEMU system simulation environment.

Create a project directory

We will create a new project directory where we will run all our PetaLinux projects from:

cd $HOME/Projects
mkdir PetaLinux



Run the BSP install script

To install the board support packages we run the following commands:

cd $HOME/Projects/PetaLinux
petalinux-create -t project -s /home/svenand/Downloads/avnet-digilent-Zedboard-v2013.10-final.bsp






We will use the Avnet-Digilent-ZedBoard-2013.3 BSP.






Top   Previous   Next




Posted at 16:22 by svenand

Raul
September 21, 2014   05:48 PM PDT
 
For CentOS 7 you also need libselinux

sudo yum install libselinux.i686
svenand
August 21, 2014   03:14 PM PDT
 
No, you don't merge the licens files. Put the Petalinux .lic file in the .Xilinx directory and install the Vivado license following the description in part 45 http://svenand.blogdrive.com/archive/206.html
anjosi
August 21, 2014   09:59 AM PDT
 
Hello,

THanks for the great tutorial!
My Vivado WebPack license file is in xml-format and the PetaLinux license in lic-format is it OK to just merge the lic file into the xml file and get it working?
Raul
August 9, 2014   04:19 PM PDT
 
Just an fyi, CentOS 7 requires `sudo yum install libstdc++.i686` to get the 32 bit libs installed.
Thorsten
June 5, 2014   10:21 PM PDT
 
OK - the problem is realy the installation of the ia32-libs - I don't know how you get things working without doing that ????

For Ubuntu 14.xx anyway there is an issue with the installation as the ia32-libs aren't available anymore with

sudo apt-get install ia32-libs

The workaround comes from a chinese friend on stackoverflow :

sudo apt-get install libc6:i386
sudo -i
cd /etc/apt/sources.list.d
echo "deb http://archive.ubuntu.com/ubuntu/ raring main restricted universe multiverse" >ia32-libs-raring.list
apt-get update
apt-get install ia32-libs
rm /etc/apt/sources.list.d/ia32-libs-raring.list
apt-get update
exit
sudo apt-get install gcc-multilib

http://stackoverflow.com/questions/23182765/how-to-install-ia32-libs-in-ubuntu-14-04-lts

I hope this will help everybody else as much as it did for me ...

Cheers, Thorsten

P.S.: Keep on pushing, Sven - good job until now !
Thorsten
June 5, 2014   09:47 PM PDT
 
hi, I have installed all the packages you mention (only ia32-libs is not avail on Ubuntu 14.05) - but when I do petalinux-build I get at the step "expanding stagefs" an error ".../bin/dpkg returned an error code (127)".
I have seen in the Xilinx forum that this error seems to be related to the ia32-libs - but as they aren't avail any more I'm stuck with Ubuntu 14. If you have any feedback - let me know ...
sn
June 4, 2014   06:36 PM PDT
 
hi
i have installed ise. with its own license
but now that i want to install petalinux i must merge the licenses and load the new license again in xlcm. but how can i launch xlcm? when i type cammand "xlcm" it says: cammand not found
thanks
svenand
June 3, 2014   09:49 PM PDT
 
I am using Ubuntu 13.10 and Ubuntu 14.04.
Name
May 31, 2014   03:15 PM PDT
 
what Linux distribution are you using?
 

Leave a Comment:

Name


Homepage (optional)


Comments




Previous Entry Home Next Entry