Adding Your Custom Yocto Layer#
It is recommended that you add your own custom meta-layer for setting up your device image according to your requirements. With this method, all settings and image contents coming with the BSP can be overruled without editing the underlying source files. For additional information about Yocto Layers, please visit the corresponding Yocto Documentation pages.
Layer Priority#
To ensure that all your adaptations are applied, your meta-layer must become the highest priority. The highest number indicates the highest priority.
Layer Priority Table
Layer Name |
Priority |
|---|---|
meta-demmelproducts |
13 |
meta-<CUSTOM LAYER NAME> |
≥14 |
Create and Add Your Custom Layer#
First, set up or re-initialize the build environment as shown in the Yocto Build Setup. Subsequently, the simplest method to add your custom layer is to use the bitbake-layers script. Therefore, enter the sources directory and create a new layer using the bitbake-layers script. Finally, execute the bitbake-layers script again to add your layer to the build environment.
### 1. Set up the build environment (as shown in Yocto Build Setup)
### 2. Enter the sources directory
cd ../sources
### 3. Create your custom layer with the desired priority
bitbake-layers create-layer meta-<CUSTOM LAYER NAME> --priority <LAYER PRIORITY>
# e.g. bitbake-layers create-layer meta-customlayer --priority 14
### 4. Add the custom layer to the build environment
bitbake-layers add-layer meta-<CUSTOM LAYER NAME>
# e.g. bitbake-layers add-layer meta-customlayer
### 5. Show the bitbake layer structure to verify the previous commands (optional)
bitbake-layers show-layers