...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
Table of Contents
Table of Contents |
---|
Repo Tool overview
Repo is a repository management tool that is built on top of Git. Repo unifies the many Git repositories when necessary, and automates parts of the development workflow. Repo is not meant to replace Git, only to make it easier to work with Git in the context of development.The repo command is an executable Python script that you can put anywhere in your path. In working with the source files, you will use Repo for across-network operations. For example, with a single Repo command you can download files from multiple repositories into your local working directory.
More details about repo tool is present at
https://source.android.com/source/developing.html
Step 1: Preparing the Build Environment
Install Repo
Code Block | ||
---|---|---|
| ||
#Download the Repo script:
$ curl https://storage.googleapis.com/git-repo-downloads/repo > repo
#Make it executable:
$ chmod a+x repo
#Move it on to your local home directory 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
Release 2017.1 and above :
Code Block | ||
---|---|---|
| ||
#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 |
Release 2016.3 or below :
Code Block | ||
---|---|---|
| ||
#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 |
where current-release is rel-v2016.3 or rel-v2016.1 etc
Source environment
Code Block | ||
---|---|---|
| ||
#source the environment to build using bitbake
$ source setupsdk |
Code Block | ||
---|---|---|
| ||
# 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
Edit configuration files for building FSBL and PMUFW
Code Block | ||
---|---|---|
| ||
<span style="color: #333333; font-size: 14px;">$ vim conf/local.conf
#Provide the hdf base,path and filename for HDF
HDF_BASE = "file://"
HDF_PATH = "/home/saurabh/yocto/hdf"
HDF_FILE = "design_1_wrapper.hdf"
EXTRA_IMAGEDEPENDS += " fsbl pmu-firmware" |
Note :
- HDF_BASE could be "git" for git repo or "file://" for local
- if xsct does not work set XILINX_SDK_TOOLCHAIN in conf/local.conf pointing to xsct
- All the hdf file provided should be of build 2016.3 or higher
Step 2: Build using bitbake
You can choose between 'petalinux-image', 'petalinux-image-minimal' and 'petalinux-image-full' below.
|
|
|
|
Similarly build for other machine (ZC702, ZC706 etc)
Release 2016.1 to 2016.4:
Below information is applicable only to Releases 2016.1 to 2016.4
Following has to be present in your configuration to use XIlinx SDK toolchain (local.conf or override.conf)
Code Block | ||
---|---|---|
| ||
DISTRO = "petalinux"
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-version> will be 2016.3, 2016.1 etc
<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, source setupsdk like in Step 1 and rerun bitbake