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


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


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

Zynq Design From Scratch
Started February 2014
1 Introduction
Changes and updates
2 Zynq-7000 All Programmable SoC
3 ZedBoard and other boards
4 Computer platform and VirtualBox
5 Installing Ubuntu
6 Fixing Ubuntu
7 Installing Vivado
8 Starting Vivado
9 Using Vivado
10 Lab 1. Create a Zynq project
11 Lab 1. Build a hardware platform
12 Lab 1. Create a software application
13 Lab 1. Connect to ZedBoard
14 Lab 1. Run a software application
15 Lab 1. Benchmarking ARM Cortex-A9
16 Lab 2. Adding a GPIO peripheral
17 Lab 2. Create a custom HDL module
18 Lab 2. Connect package pins and implement
19 Lab 2. Create a software application and configure the PL
20 Lab 2. Debugging a software application
21 Running Linux from SD card
22 Installing PetaLinux
23 Booting PetaLinux
24 Connect to ZedBoad via ethernet
25 Rebuilding the PetaLinux kernel image
26 Running a DHCP server on the host
27 Running a TFTP server on the host
28 PetaLinux boot via U-boot
29 PetaLinux application development
30 Fixing the host computer
31 Running NFS servers
32 VirtualBox seamless mode
33 Mounting guest file system using sshfs
34 PetaLinux. Setting up a web server
35 PetaLinux. Using cgi scripts
36 PetaLinux. Web enabled application
37 Convert from VirtualBox to VMware
38 Running Linaro Ubuntu on ZedBoard
39 Running Android on ZedBoard
40 Lab2. Booting from SD card and SPI flash
41 Lab2. PetaLinux board bringup
42 Lab2. Writing userspace IO device driver
43 Lab2. Hardware debugging
44 MicroZed quick start
45 Installing Vivado 2014.1
46 Lab3. Adding push buttons to our Zynq system
47 Lab3. Adding an interrupt service routine
48 Installing Ubuntu 14.04
49 Installing Vivado and Petalinux 2014.2
50 Using Vivado 2014.2
51 Upgrading to Ubuntu 14.04
52 Using Petalinux 2014.2
53 Booting from SD card and SPI flash
54 Booting Petalinux 2014.2 from SD card
55 Booting Petalinux 2014.2 from SPI flash
56 Installing Vivado 2014.3

Chipotle Verification System

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
Table of contents
OpenRISC 1200
Nios II

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

FPGA Design From Scratch
Started December 2006
Table of contents
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

A hardware designer's best friend
Zoo Design Platform

Installing Cobra Command Tool
A processor benchmark

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

Stockholm by bike

The New York City Marathon

Kittelfjall Lappland

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

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

100 Power Tips for FPGA Designers

Adventures in ASIC
Computer History Museum
Design & Reuse
d9 Tech Blog
EDA Cafe
EDA DesignLine
Eli's tech Blog
FPGA Arcade
FPGA Central
FPGA developer
FPGA Journal
FPGA World
Lesley Shannon Courses
Mac 2 Ubuntu
Programmable Logic DesignLine
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.


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:


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 ./ /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/

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

November 24, 2014   05:53 PM PST
Any one help me with the problem bsp. How can we create custom bsp or from which source i mean.
I try
petalinux - create -t ​​Projekt -s /home/ngo/Downloads/Avnet-digilent-Zedboard-v2014.2-final.bsp
but i got this:
No PetaLinux projects found in the BSP /home/ngo/Downloads/Avnet-digilent-Zedboard-v2014.2-final.bsp!
November 19, 2014   01:20 AM PST
When trying command sudo ./ /opt/PetaLinux
i got "command not found"
but i did repair my problem by using the command
chmod +x ./ /opt/PetaLinux


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

sudo yum install libselinux.i686
August 21, 2014   09:59 AM PDT

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?
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.
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 ...
June 4, 2014   06:36 PM PDT
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
June 3, 2014   09:49 PM PDT
I am using Ubuntu 13.10 and Ubuntu 14.04.
May 31, 2014   03:15 PM PDT
what Linux distribution are you using?

Leave a Comment:


Homepage (optional)


Previous Entry Home Next Entry