PetaLinux is brand name used by Xilinx, it is based on Yocto and pretty decent mainstream kernel, what Petalinux adds is the HSI (Hardware Software Interface from Vivado) and special tools for boot image creation.
Table of Content
...
Short HOWTO
Getting Linux working on Zynq is very simple, following steps are required
...
There is no need to install anything else, or to fetch anything from any github repos, etc.
PetaLinux Installation
- Download PetaLinux from Xilinx Website: http://www.xilinx.com/support/download/index.html/content/xilinx/en/downloadNav/embedded-design-tools.html
- Choose a PetaLinux Version, that's corresponding to the installed Vivado and SDK Version.
- Example: Use Vivado 2015.4 with SDK 2015.4 and PetaLinux 2015.4
- Use UG1144 "PetaLinux Tools Documentation - Reference Guide" that's corresponding with your PetaLinux Version
- Check "PetaLinux Tools Installation Requirements" chapter and install missing tool/libraries
- Use installation instructions from chapter "PetaLinux Tools Installation Steps"
- Note:
- There is no need to install anything else, or to fetch anything from any github repos, etc.
- It is recommended to test the installation by creating a dummy template project and building it.
- Download BSP Example from Xilinx Website
- Install:$ petalinux-create -t project -s <path-to-bsp>
- Build: $ petalinux-build
Creating a Project from Vivado Project
- PetaLinux Working Environment (see UG1144)
- PetaLinux Tools Installation is completed.
"/bin/sh" is bash
- Set Working Environment:
- $ source <path-to-installed-PetaLinux>/settings.sh
- Set cross compiler:
- $ export CROSS_COMPILE=arm-xilinx-linux-gnueabi-
- $ export ARCH=arm
- Create a New Project (see UG1144):
- Import Hardware Configuration (see UG1144):
- Export Hardware Definition File (*.hdf) from the Vivado Project
. - Check the Petalinux documents, create a project (for Zynq or Microblaze)
- Imported Steps on Linux Console:
- into the PetaLinux subfolder "<plnx-proj-root>/hw-description":
- change to the project folder:
- Run:$ petalinux-config --get-hw-description
- (optional) Configure your PetaLinux:
- change to the project folder "<plnx-proj-root>":
- Run:$ petalinux-config
- It's recommended to deactivate FSBL-Configuration and build FSBL and Boot.bin with SDK/HSI: "linux Components Selection --->" "[ ] First Stage Bootloader"
- Build System Image (see UG1144):
- change to the project folder "<plnx-proj-root>":
- Run:$ petalinux-build
- Build log-file:"<plnx-proj-root>/build/build.log"
- Take u-boot.elf and image.ub from "<plnx-proj-root>/images/linux" and make BOOT.BIN. It is recommended to create the FSBL with SDK/HSI tools.
Petalinux Configuration
Most settings can be changed with menu-config ($ petalinux-config).
There are 3 more files that user can edit, they are
...
There should be no reason to modify any other files by editing them (most of them are generated and would be overwritten).
References
...
PetaLinux Tools User Guide - Installation Guide (UG976)
...
- PetaLinux Tools Documentation - Reference Guide (UG1144)
PetaLinux Tools Documentation - PetaLinux Command Line Reference (UG1157)
...