MicroZed Chronicles: PetaLinux Edition— Getting Set Up

Adam Taylor
4 min readMar 6, 2020

--

To get started creating a our PetaLinux solution we need to use a Linux Machine. In this blog we are going to look at how we can create a Linux Virtual Machine and Install PetaLinux. Once we have done this we are then able to create, build and experiment with PetaLinux projects.

To install PetaLinux our Linux machine needs at least the following

  • 8 GB RAM
  • 2 GHz CPU
  • 100 GB free HDD
  • OS — Red Hat Enterprise Workstation/Server 7.4 / 7.5 / 7.6 (64-bit)
  • OS — CentOS Workstation/Server 7.4 / 7.5 / 7.6 (64-bit)
  • OS — Ubuntu Linux Workstation/Server 16.04.5 / 16.04.6 / 18.04.1 / 18.04.2 (64-bit)

Due to the large varieties of Vivado / PetaLinux versions I work with, I prefer to create virtual machines on external SSD drives connected to my laptop over USB C. This means I can change between versions with ease and not use all the storage on my laptop.

Different PetaLinux machines on SSD for ease of changing version

To create a PetaLinux machine we will need

Lets get started with creating the Linux VM, the first steps having installed the VM software are to create a new machine.

Make sure you allocate sufficient resources to this VM, I allocated 16 GB DDR and 150 GB storage.

Once the new machine is created, we still have a few steps to follow before we can create a boot-able Linux VM.

The first step is to select the machine just created and increase the number of processors the VM can use beyond the default of 1.

With a more appropriate number of processors enabled (dependent on your system), we can start the VM and install Ubuntu.

When the VM is started you will be prompted for the location of the start up disk. This is the ISO we downloaded from the Ubuntu link above

This will provide the the option to try or install Ubuntu, select install and complete the installation. When asked if you want to upgrade, decline the opportunity.

Once the installation is complete we can download the PetaLinux installer from the Xilinx website. To do this you will need to register for a Xilinx account.

With the installer downloaded the next step is to copy the installer into the installation directory.

However, before we can install PetaLinux, we need to make sure we have all of the required packages installed.

Using a terminal window enter the command below to download any missing but required packages.

sudo apt-get install -y gcc git make net-tools libncurses5-dev tftpd zlib1g-dev libssl-dev flex bison libselinux1 gnupg wget diffstat chrpath socat xterm autoconf libtool tar unzip texinfo zlib1g-dev gcc-multilib build-essential libsdl1.2-dev libglib2.0-dev zlib1g:i386 screen pax gzip gawk

After the required packages are installed we are able to install PetaLinux, using the terminal window issue the command

./petalinux-v2019.2-final-installer.run

Once the installation completes to make use of PetaLinux tools we need to first source the settings.sh script in the installation directory.

We are now able to get started using PetaLinux, which we will be looking at in the next blog!

See My FPGA / SoC Projects: Adam Taylor on Hackster.io

Get the Code: ATaylorCEngFIET (Adam Taylor)

Access the MicroZed Chronicles Archives with over 300 articles on the FPGA / Zynq / Zynq MpSoC updated weekly at MicroZed Chronicles.

--

--

Adam Taylor

Adam Taylor is an expert in design and development of embedded systems and FPGA's for several end applications. He is the founder of Adiuvo Engineering Ltd