Line 23: | Line 23: | ||
<syntaxhighlight lang="bash"> |
<syntaxhighlight lang="bash"> |
||
meta- |
meta-proventusnova/ |
||
├── conf |
├── conf |
||
│ └── layer.conf |
│ └── layer.conf |
||
└── README.md |
└── README.md |
||
</syntaxhighlight> |
|||
An example layer.conf file based on [https://github.com/OE4T/tegra-demo-distro/blob/scarthgap-l4t-r35.x/layers/meta-tegrademo/conf/layer.conf NVIDIA OE4T tegra_demo_distro] is shown in the following code snipped. |
|||
<syntaxhighlight lang="bash"> |
|||
BBPATH =. "${LAYERDIR}:" |
|||
BBFILES += "${LAYERDIR}/recipes-*/*/*.bb ${LAYERDIR}/recipes-*/*/*.bbappend" |
|||
BBFILES_DYNAMIC += "swupdate:${LAYERDIR}/dynamic-layers/meta-swupdate/recipes-*/*/*.bb \ |
|||
swupdate:${LAYERDIR}/dynamic-layers/meta-swupdate/recipes-*/*/*.bbappend" |
|||
BBFILE_COLLECTIONS += "proventusnova" |
|||
BBFILE_PATTERN_proventusnova = "^${LAYERDIR}/" |
|||
BBFILE_PRIORITY_proventusnova = "50" |
|||
LAYERVERSION_proventusnova = "4" |
|||
LAYERSERIES_COMPAT_proventusnova = "scarthgap" |
|||
# This is used by the tegra-distro-sanity bbclass |
|||
# to identify the distro layer directory during |
|||
# bblayers checks. |
|||
TD_DISTRO_LAYERDIR = "${LAYERDIR}" |
|||
</syntaxhighlight> |
</syntaxhighlight> |
||
Revision as of 17:35, 11 March 2025
Introduction
This wiki will provide a detailed guide on how to create a custom Yocto meta-layer.
Create Base Meta-Layer
This section contains steps to create the base custom meta-layer. After completion, the custom base meta-layer will contain the following parts:
- Custom layer configuration
- Custom distro configuration
- Custom machine
- Custom config template files
- Custom image recipe
Step 1. Add base layer.conf file
The layer configuration file provides Yocto with the configuration for the custom meta-layer. It shall be stored in a directory called conf inside the base meta-layer directory, and it shall be named layer.conf. According to the Yocto documentation it is recommended to start from an existing layer.conf file from a different meta-layer and change it according to the custom requirements.
For instance, here is an example of how the directory structure should look after creating the layer.conf file.
meta-proventusnova/
├── conf
│ └── layer.conf
└── README.md
An example layer.conf file based on NVIDIA OE4T tegra_demo_distro is shown in the following code snipped.
BBPATH =. "${LAYERDIR}:"
BBFILES += "${LAYERDIR}/recipes-*/*/*.bb ${LAYERDIR}/recipes-*/*/*.bbappend"
BBFILES_DYNAMIC += "swupdate:${LAYERDIR}/dynamic-layers/meta-swupdate/recipes-*/*/*.bb \
swupdate:${LAYERDIR}/dynamic-layers/meta-swupdate/recipes-*/*/*.bbappend"
BBFILE_COLLECTIONS += "proventusnova"
BBFILE_PATTERN_proventusnova = "^${LAYERDIR}/"
BBFILE_PRIORITY_proventusnova = "50"
LAYERVERSION_proventusnova = "4"
LAYERSERIES_COMPAT_proventusnova = "scarthgap"
# This is used by the tegra-distro-sanity bbclass
# to identify the distro layer directory during
# bblayers checks.
TD_DISTRO_LAYERDIR = "${LAYERDIR}"