Migrate from PetaLinux project to Yocto project

PetaLinux is a development and build environment which automate tasks required to boot embedded Linux on Xilinx Platforms. It uses Yocto underneath for configuring and building various Xilinx components. This page helps to migrate the PetaLinux generated conf files to Yocto project.

 

Note that this flow is provided as is and not supported by Xilinx Technical Support.

Table of Contents

Exporting PetaLinux Project

This section provides the steps to export the Petalinux project into a .run file which could be easily imported into the Yocto project.

Step 1: Create the petalinux project using template flow/bsp flow and configure it as required.

$ petalinux-create -t project -s <bsp path> $ petalinux-config --silentconfig

settings.sh is for bash if shell is csh use settings.csh.


Step 2: Get the script and run it to generate the .run file.

The above yocto-migrate.sh script will take the petalinux project as input which is specified as argument and creates the plnx-yocto-migrate.run file.

$ chmod a+x yocto-migrate.sh $ ./yocto-migrate.sh <petalinux project path>

Importing Petalinux Project into Yocto Project

Step 1: Create yocto project using below steps

$ mkdir yocto $ cd yocto $ repo init -u https://github.com/Xilinx/yocto-manifests.git -b <branch-name> $ repo sync $ chmod 666 setupsdk

Step 2: To import the petalinux data into yocto project run the plnx-yocto-migrate.run which is generated in the section 'Exporting Petalinux Project' above. This will create and extract the files into yocto/sources/petalinux directory.

plnx-setupsdk

Setup script to add petalinux project environment into the yocto project. This will be called inside the setupsdk file if you specify the PLNX_SETUP=1.

plnx-setupsdk

Setup script to add petalinux project environment into the yocto project. This will be called inside the setupsdk file if you specify the PLNX_SETUP=1.

etc/

This directory will contain the tcl script which will be used to create the uboot/device-tree configuration files Ex: system-conf.dtsi.

plnxtool.conf

Petalinux generated .conf file with yocto variables. You can edit this file as required and build in yocto project.

project-spec/

Project configuration files directory. It will have the hardware file(xsa) which was included in petalinux project.

Step 3: source the setupsdk and build 

This will copy plnxtool.conf file into yocto/build/conf directory from yocto/sources/petalinux and add yocto/sources/petalinux/project-spec/meta-user layer into yocto/build/conf/bblayers.conf file.

It is always recomended to use PLNX_SETUP=1 when sourcing the setupsdk to setup petalinux environment properly otherwise build may fail.

The images/linux directory will be created in yocto/sources/petalinux/

Output Logs

 

© Copyright 2019 - 2022 Xilinx Inc. Privacy Policy