book collections email follower instructable user
Picture of Getting Started With PetaLinux

Interested in learning a little about embedded Linux? Have you worked with Xilinx FPGAs and want to explore some of the software related to their implementation? If you answered yes, then welcome! If you answered no (to at least the first question) then you should read through anyway, because this is pretty cool stuff.

Welcome to this Getting Started Guide (GSG) to PetaLinux!

PetaLinux is an embedded Linux development solution for Xilinx Zynq chips (an ARM processor with FPGA material, like the ones used here and here) as well as for MicroBlaze designs implemented in fully FPGA chips. This GSG will be using the 2015.4 versions of PetaLinux, SDK, and Vivado and will be targeting the Zybo from Digilent, so we will be implementing a project on a Zynq target rather than the soft processor core of a MicroBlaze design. For some more info on MicroBlaze, check out this guide.

For this Instructable, the following prerequisites apply:

  • Some familiarity with Linux
  • A Zybo or Zedboard to deploy the project onto
  • A Linux machine (VM or dual boot setup) of supported OS: Ubuntu 14.04, CentOS 7, SUSE Enterprise 12, RHEL 6.5/6.6/7. *These are for PetaLinux 2015.4. Newer versions may support more recent OS versions.
  • At least 20GB of free hard drive space
  • Have Vivado and Xilinx SDK installed (the version you have installed should be the version of PetaLinux you will download)

*Note: While I was able to get PetaLinux 2015.4 running within Ubuntu 16.04, this is not a supported version and is not recommended.

This guide will walk you through the steps of initial setup for PetaLinux on your Linux machine and the implementation of a pre-built design on the Zybo. By the end of this Instructable, you will be able to begin tinkering with the design from either the hardware description language (HDL) side, or create custom applications you can run within the Linux system running on your board. Lets get started!

Step 1: Download Installer

Picture of Download Installer

You will need to download the installer for PetaLinux of the same version as the Vivado and SDK installation you should have on your system. Meaning if you have Vivado and SDK 2015.4 installed, you should download PetaLinux 2015.4. The download may take a while.

Once the download has completed, make a directory in which you would like the PetaLinux tools to be installed in. From your terminal, change directory (cd) into the directory the installer was downloaded into (likely Downloads) and run the installer with a specified path to the directory you just created.

JeromeC601 year ago

Hello,

I completed this set of instructions. Was well documented, compared with actual petalinux pdf which seems to skip around.

I was not able to update SD card at the end, however every other step was ok. I think update my be removed.

Can you tell me what I should expect? I am using XILINX ZC702 evaluation board. When i insert into SD slot, nothing boots, nothing loads. Should I expect to see a linux OS come up? I am really not clear on what to expect and hot to verify if it is working properly.

Please let me know.

N. AminR JeromeC6011 months ago

Petalinux-util --update-sdcard is absolete. have u included the bitstream file along on petalinux-package? In Vivado IDE make sure u already wrapped the bitstream along the Zynq PS bd in IP Integrator. this will set up the PS along the PL side in the Zynq. as long as u copied BOOT.bin, image.ub and rootfs.cpio into the SD-card. the linux will boot and visible on the serial terminal. your username will appear anywhere in the boot page.

PranayG111 year ago

well, I've done all things except the inclusion of 32bit dependencies. I tried

sudo apt-get install lib32ncurses5.... and also tried all 32 bit dependencies mentioned above, it is saying some "Failed to fetch: http://<some xyz link with .deb extension > Hash sum mismatch " error and unable to fetch some archieves..... error and I'm unable sort that issue. I google and I tried everything but nothing worked. please anyone kindly help me to sort this issue, will be grateful for yu.Thank you in advance. :)

JustinD1372 years ago

The last petalinux-util --update-sdcard -d call is all you need at the end there. It does the copying for you. Also, you can specify the boot AND the rootfs file paths of the sd card to copy both the boot and file system.

Command does not exist on Petalinux 2017.2

BrettN132 years ago

Thanks for the great intro.

Can anybody please explain how to include a third party application like openVPN to the linux image generated by petalinux? I know you can include openSSL and necessary libraries in the petalinux-config menu, but I could not find openVPN.

Could someone please point me to a resource or tutorial that could help be get openVPN as an application in my petalinux image?

Thanks!

tytower2 years ago

I would suggest you try to explain in laymans terms what the heck you are talking about. What is it , where do I get it ,why would I want it.

I've been a linux only user for 30+ years and have never heard of it