Table of Contents
This wiki shows how to create a custom layer in an open source Xilinx Yocto flow. After creating the layer, it provides an example of creating your own machine based on a ZCU102 configuration.
rel-v2018.1 and later (Rocko 2.4)
Yocto Supported Linux Distro
Xilinx Open Source Yocto Installation
Creating Your Custom Layer
You may create your custom layer manually by copying an existing
layer.conf, however, Yocto provides some helper scripts to automate it. The
bitbake-layers create-layer script will generate a base layer with a default priority of 6. Once the layer is created, you can either add the layer to
bblayers.conf manually or use the
bitbake-layers add-layer to automate it. Note that adding it manually will be faster, but may increase the likelihood of typos or syntax errors. The sequence below is an example of how to apply these scripts. You may cut-and-paste the commands below into a local script to further automate this flow. The resulting
bblayers.conf are shown below.
Custom Layer Directory Structure
After the directory structure is created, you can begin populating the layer with recipes, bbappends, patches, cfg fragments, machine configs, etc. The
example.bb recipe is an artifact of the
create-layer and can be safely deleted. You can continue expanding your layer to include recipes for custom BSPs, applications and other open source components or stacks. At this point, it's pretty straight forward to put your layer under Git control.
Verify Your Layer
You can verify that your custom layer has been properly added to the Yocto build system by running
show-layers as shown below.
Removing Your Layer
To remove a layer, you can either manually edit the
bblayers.conf or use the
bitbake-layers remove-layer script as shown below from the
Creating a New Machine Configuration
Now lets create a machine configuration that inherits all of the defaults from the
zcu102-zynqmp machine. The name of this new machine will be the tuple
example-zcu102-zynqmp. In the
conf/machine directory of your custom layer, create a machine configuration file named
example-zcu102-zynqmp.conf with the
require statement below . This will include all of the defaults from the
zcu102-zynqmp. At this point you can customize the machine by adding new properties or overriding any of the
Now you can build your new machine by specifying the
MACHINE variable on the
bitbake command line.
Adding an HDF to a Xilinx Yocto Layer
Customizing Device Trees in Xilinx Yocto
Xilinx Yocto Builds without an Internet Connection
Yocto Project Mega-Manual (2.4.4)