Using meta-xilinx-tools layer
This page describes how to use meta-xilinx-tools, a new Yocto layer available from the v2016.3 release.
Table of Contents
General Layer Information
This layer depends on: xsct
For 2018.3 release:
xsct-tarball class fetches the required xsct tool and installs it in the local sysroots of Yocto build. All the recipes which depend xsct or bootgen will use from sysroots. Please see the Xilinx EULA license file for xsct after extracting the tarball.
See class for more details: https://github.com/Xilinx/meta-xilinx-tools/blob/rel-v2018.3/classes/xsct-tarball.bbclass
https://www.xilinx.com/support/download/index.html/content/xilinx/en/downloadNav/embedded-design-tools.html
This layer depends on XSCT being installed in the path. XSCT path has to be defined in local.conf
XILINX_SDK_TOOLCHAIN = "<path to installed XSCT>"
XILINX_VER_MAIN = "<release-version>"
release-version can be 2016.3, 2017.1 etc
meta-xilinx-tools recipes depends on HDF to provided
HDF_BASE can be set to git: or file:
HDF_PATH will be git repository or the path containing HDF
Ex: HDF_BASE = "file://" HDF_PATH = "<path-to-HDF-in-local-directory>" // ex: HDF_PATH = "/home/user/system.hdf" HDF_BASE = "git://" HDF_PATH = "<path-to-HDF-in-git>" //ex: HDF_PATH = "github.com/hdf-base.git"
Using the Layer
Basically the goal to build FSBL or PMU etc will depend on the use-case and Boot.bin will indicate these dependencies.
Boot.bin is created using bootgen tool from Xilinx. Please refer to help files of bootgen.
Executing bootgen -bif_help will provide some detailed help on BIF attributes.
BIF file is required for generating Boot.bin, BIF is partitioned into Common BIF attributes and Partition BIF attributes.
Attributes of BIF need to be specified in local.conf while using xilinx-bootbin.bbclass for generating Boot.bin
2018.1 release or above BOOT.BIN creation:
2017.1 release or above BOOT.BIN creation:
Once the HDF is provided using above mechanism (HDF_BASE and HDF_PATH) , meta-xilinx-tools will build boot.bin based on the below config
https://github.com/Xilinx/meta-xilinx-tools/blob/master/conf/machine/include/machine-xilinx-zynqmp.inc
https://github.com/Xilinx/meta-xilinx-tools/blob/master/conf/machine/include/machine-xilinx-zynq.inc
The above can be tuned in local.conf to include or remove things in boot.bin
Example ZU+ zcu102 Boot.bin BIF setup is provided (add these in local.conf for release 2016.4 or below):
|| #add Boot.bin dependencyIMAGE_CLASSES += " xilinx-bootbin"#specify BIF common attribute for FSBLBIF_COMMON_ATTR= "fsbl_config"BIF_COMMON_ATTR[fsbl_config]="a53_x64"
#specify BIF partition attributes required for BOOT.binBIF_PARTITION_ATTR= "fsbl pmu atf u-boot"
#specify BIF partition attributes for FSBL#bootloader is FSBL. Location where FSBL binary is present and dependency to build FSBLBIF_PARTITION_ATTR[fsbl]="bootloader"BIF_PARTITION_IMAGE[fsbl]="${DEPLOY_DIR_IMAGE}/fsbl-${MACHINE}.elf"BIF_PARTITION_DEPENDS[fsbl]="virtual/fsbl"
#specify BIF partition attributes for PMU Firmware#destination cpu for PMU. Location where PMU binary is present and dependency to build PMU FirmwareBIF_PARTITION_ATTR[pmu]="destination_cpu=pmu"BIF_PARTITION_IMAGE[pmu]="${DEPLOY_DIR_IMAGE}/pmu-${MACHINE}.elf"BIF_PARTITION_DEPENDS[pmu]="virtual/pmufw"
#specify BIF partition attributes for ATF#destination cpu for ATF, security levels. Location where ATF binary is present (dependency is not required as ATF is always built for ZU+, see zcu102-zynqmp.conf)BIF_PARTITION_ATTR[atf]="destination_cpu=a53-0,exception_level=el-3,trustzone"BIF_PARTITION_IMAGE[atf]="${DEPLOY_DIR_IMAGE}/arm-trusted-firmware-${TUNE_PKGARCH}.elf"
#specify BIF partition attributes for u-boot#destination cpu for u-boot, security levels. Location where u-boot binary is present (dependency is not required as u-boot is always built for ZU+, see zcu102-zynqmp.conf)BIF_PARTITION_ATTR[u-boot]="destination_cpu=a53-0,exception_level=el-2"BIF_PARTITION_IMAGE[u-boot]="${DEPLOY_DIR_IMAGE}/u-boot-${MACHINE}.elf" ||
Example Zynq-7000 zc702 Boot.bin BIF setup is provided (add these in local.conf for release 2016.4 or below):
|| #add Boot.bin dependencyIMAGE_CLASSES += " xilinx-bootbin"#specify BIF partition attributes required for BOOT.binBIF_PARTITION_ATTR= "fsbl u-boot"
#specify BIF partition attributes for FSBL#bootloader is FSBL. Location where FSBL binary is present and dependency to build FSBLBIF_PARTITION_IMAGE[fsbl]="${DEPLOY_DIR_IMAGE}/fsbl-${MACHINE}.elf"BIF_PARTITION_DEPENDS[fsbl]="virtual/fsbl"
#specify BIF partition attributes for u-boot#Location where u-boot binary is presentBIF_PARTITION_IMAGE[u-boot]="${DEPLOY_DIR_IMAGE}/u-boot-${MACHINE}.elf" ||
NOTE:
Please install xvfb package on host ( this is an xsct requirement)
Related Articles
Xilinx YoctoRelated content
© Copyright 2019 - 2022 Xilinx Inc. Privacy Policy