Getting Started With Yocto using Repo to build RPM Packages
This page is deprecated and is no longer being maintained. For the latest information, please use the updated page: Install and Build with Xilinx Yocto
This document applies to Xilinx Releases v2016.1 and later.
Table of Contents
More details about repo tool is present at
https://source.android.com/source/developing.html
Step 1: Preparing the Build Environment
Create an empty directory and step into it
Install sstate-cache if desired
Xilinx provide an sstate-cache for each release which also contains downloads. If you wish to use it, download and extract the tarball 'sstate-rel-v2017.2.tar.gz' (e.g.) here - the directory will be called sstate-rel-v2017.2 (e.g.)
Install Repo
#Download the Repo script. The -k option bypasses server certificate verification: $ curl -k https://storage.googleapis.com/git-repo-downloads/repo > repo #Make it executable: $ chmod a+x repo #Move it on to your system path: $ mv repo ~/bin/ #Add it to your path $ PATH=$PATH:~/bin #If it is correctly installed, you should see a Usage message when invoked with the help flag. $ repo --help |
Fetch all sources into an empty directory
Release 2017.1 and above :
#repo init to the project of desire $ repo init -u git://github.com/Xilinx/yocto-manifests.git -b <current-release> #repo sync to get all sources $ repo sync #repo start a branch $ repo start <current-release> --all
where current-release is rel-v2017.1 etc
Release 2016.1 to 2016.4:
#repo init to the project of desire $ repo init -u git://github.com/Xilinx/yocto-manifests.git -m meta-petalinux.xml -b <current-release> #repo sync to get all sources $ repo sync #repo start a branch $ repo start <current-release> --all |
Source environment
#source the environment to build using bitbake $source setupsdk # for 2016.1 and 2016.2 release use $ source pkgsetup |
Edit configuration files
You should be in the 'build' directory at this point. You may need to edit the following files in the 'conf' directory:- Edit bblayers.conf so that it has the appropriate layers for your build.
- Edit local.conf to reflect your choices for the build. If using the sstate-cache downloaded above, you need these lines:
- SSTATE_DIR ?= "${TOPDIR}/../sstate-rel-v2017.2/aarch64/sstate-cache"
- DL_DIR ?= "${TOPDIR}/../sstate-rel-v2017.2/downloads"
Step 2: Build using bitbake
You can choose between 'petalinux-image', 'petalinux-image-minimal' and 'petalinux-image-full' below.$ MACHINE=zynqmp-generic bitbake petalinux-image |
$ MACHINE=zynq-generic bitbake petalinux-image |
$ MACHINE=microblazeel-v10.0-bs-cmp-ml-generic bitbake petalinux-image |
$ MACHINE=microblazeel-v10.0-bs-cmp-mh-div-generic bitbake petalinux-image |
Release 2016.1 to 2016.4:
Below information is applicable only to Releases 2016.1 to 2016.4
PACKAGE_CLASSES = "package_rpm" TCMODE = "external-xilinx" XILINX_VER_MAIN = "<current-release>" EXTERNAL_TOOLCHAIN_zynq = "<path-to-xilinx-SDK>/SDK/<current-version>/gnu/aarch32/lin/gcc-arm-linux-gnueabi" EXTERNAL_TOOLCHAIN_microblaze = "<path-to-xilinx-SDK>/SDK/<current-version>/gnu/microblaze/linux_toolchain/lin32_le" EXTERNAL_TOOLCHAIN_aarch64 = "<path-to-xilinx-SDK>/SDK/<current-version>/gnu/aarch64/lin/aarch64-linux" XILINX_SDK_TOOLCHAIN = "<path-to-xilinx-SDK>/SDK/<current-version>" |
<current-release> will be 2016.3, 2016.1 etc
Re-running bitbake
If you need to run bitbake again, for example if your build failed the first time, locate the oe-init-buildenv script at the top of the 'core' git repository that was downloaded in Step 1. Then run:$ source path_to_oe-init-buildenv path_to_build_dir |
Related Articles
Xilinx Yocto
© Copyright 2019 - 2022 Xilinx Inc. Privacy Policy