From: Antonin Godard <antonin.godard@bootlin.com>
To: docs@lists.yoctoproject.org
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
Antonin Godard <antonin.godard@bootlin.com>
Subject: [PATCH 07/18] migration-guides/migration-6.2.rst: add section on now layer format
Date: Wed, 02 Dec 2026 15:55:42 +0100 [thread overview]
Message-ID: <20261202-layer-conf-changes-v1-7-da34d4c770c6@bootlin.com> (raw)
In-Reply-To: <20261202-layer-conf-changes-v1-0-da34d4c770c6@bootlin.com>
Document a migration guide on the new layer configuration file format,
what it implies and how to convert a previous layer.conf file.
Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
---
documentation/migration-guides/migration-6.2.rst | 92 ++++++++++++++++++++++++
1 file changed, 92 insertions(+)
diff --git a/documentation/migration-guides/migration-6.2.rst b/documentation/migration-guides/migration-6.2.rst
index 750be4b48..638f62c23 100644
--- a/documentation/migration-guides/migration-6.2.rst
+++ b/documentation/migration-guides/migration-6.2.rst
@@ -30,6 +30,98 @@ GNU/Linux distributions:
See :ref:`all supported distributions <system-requirements-supported-distros>`.
+New layer configuration file format
+-----------------------------------
+
+With |yocto-codename|, the :term:`layer` configuration file has a new format for
+which all layers should adapt. This file is the ``conf/layer.conf`` file found
+in any layer.
+
+This section goes through the consequences of these changes and what is required
+to do to update your configuration file accordingly.
+
+#. This file should now contain a minimal number of variables::
+
+ LAYERNAME = "<layer name>"
+ LAYERVERSION = "1"
+ LAYERDEPENDS = "oe-core ..."
+ LAYERSERIES_COMPAT = "garburn"
+
+ These four variables (:term:`LAYERNAME`, :term:`LAYERVERSION`,
+ :term:`LAYERDEPENDS` and :term:`LAYERSERIES_COMPAT`) are sufficient for a
+ layer to function correctly.
+
+ Let's take a look at the previous default definition for a layer
+ configuration file::
+
+ # We have a conf and classes directory, add to BBPATH
+ BBPATH .= ":${LAYERDIR}"
+
+ # We have recipes-* directories, add to BBFILES
+ BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
+ ${LAYERDIR}/recipes-*/*/*.bbappend"
+
+ BBFILE_COLLECTIONS += "<layer name>"
+ BBFILE_PATTERN_<layer name> = "^${LAYERDIR}/"
+ BBFILE_PRIORITY_<layer name> = "100"
+
+ LAYERDEPENDS_<layer name> = "core"
+ LAYERSERIES_COMPAT_<layer name> = "garburn"
+
+ Some variables *no longer need to be set*: :term:`BBPATH`, :term:`BBFILES`,
+ ``BBFILE_COLLECTIONS``, ``BBFILE_PATTERN``, and
+ ``BBFILE_PRIORITY``. These variables are all either automatically
+ determined by :term:`BitBake`, or obsolete. The priority removal is detailed
+ below.
+
+ The following table recapitulates the conversions from one format to the other:
+
+ .. list-table::
+ :widths: 50 50
+ :header-rows: 1
+
+ * - Before
+ - After
+ * - ``BBPATH .= ":${LAYERDIR}"``
+ - *No longer needed*
+ * - ``BBFILES += "..."``
+ - *No longer needed*
+ * - ``BBFILE_COLLECTIONS += "<layer name>"``
+ - ``LAYERNAME = "<layer name>"``
+ * - ``BBFILE_PATTERN_<layer name> = "^${LAYERDIR}/"``
+ - *No longer needed*
+ * - ``BBFILE_PRIORITY_<layer name> = "100"``
+ - *No longer needed* (see explanation below)
+ * - ``LAYERDEPENDS_<layer name> = "core"``
+ - ``LAYERDEPENDS = "oe-core"``
+ * - ``LAYERSERIES_COMPAT_<layer name> = "garburn"``
+ - ``LAYERSERIES_COMPAT = "garburn"``
+ * - ``LAYERVERSION_<layer name> = "1"``
+ - ``LAYERVERSION = "1"``
+
+#. The list of variables allowed to be set from the
+ :ref:`structure-conf-layer.conf` file is limited to the variable prefixes
+ part of the :term:`LAYER_PASSTHROUGH_VARS_PREFIXES` variable. See the
+ :ref:`structure-conf-layer.conf` for more information.
+
+ A layer can also set variables that apply to the layer's :term:`metadata`
+ only with the :ref:`structure-conf-layervars.conf` file. It is otherwise
+ recommended to provide your own distro :term:`configuration file`, or your
+ own :term:`configuration fragments <Configuration Fragment>` (which you can
+ recommend with :term:`LAYER_FRAGMENT_RECOMMENDS_ANY`).
+
+#. Layers no longer have a concept of numbered priority, which was represented
+ by the ``BBFILE_PRIORITY`` variable.
+
+ Priorities were mainly used in situations where two layers provided the same
+ recipe: the layer with the higher priority won, and its recipe was selected.
+
+ Now, users are expected to set the :term:`PREFERRED_VERSION` variable from a
+ :term:`configuration file` in order to select which version they prefer to
+ select for the build.
+
+ Otherwise, a recipe can set the :term:`DEFAULT_PREFERENCE` variable.
+
Removed recipes
---------------
--
2.56.0
next prev parent reply other threads:[~2026-12-02 14:56 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-02 14:55 [PATCH 00/18] docs: refresh after layer configuration format changes Antonin Godard
2026-12-02 14:55 ` [PATCH 01/18] ref-manual/layers.rst: add document Antonin Godard
2026-12-02 14:55 ` [PATCH 02/18] ref-manual/variables.rst: BBFILES: refresh the definition Antonin Godard
2026-12-02 14:55 ` [PATCH 03/18] ref-manual/variables.rst: drop obsolete BBFILE* variables Antonin Godard
2026-12-02 14:55 ` [PATCH 04/18] ref-manual/variables.rst: drop LAYERDIR_RE Antonin Godard
2026-12-02 14:55 ` [PATCH 05/18] ref-manual/variables.rst: link bitbake-specific to the bitbake manual Antonin Godard
2026-12-02 14:55 ` [PATCH 06/18] ref-manual/variables.rst: document LAYER_FRAGMENTS_OPTED_OUT/LAYER_FRAGMENT_RECOMMENDS_ANY Antonin Godard
2026-12-02 14:55 ` Antonin Godard [this message]
2026-12-02 14:55 ` [PATCH 08/18] migration-guides/migration-6.2.rst: add a section on the new core layer names Antonin Godard
2026-12-02 14:55 ` [PATCH 09/18] dev-manual/layers.rst: remove a leftover poky repo reference Antonin Godard
2026-12-02 14:55 ` [PATCH 10/18] dev-manual/layers.rst: refresh after layer configuration format changes Antonin Godard
2026-12-02 14:55 ` [PATCH 11/18] bsp-manual/bsp.rst: remove obsolete layer.conf references Antonin Godard
2026-12-02 14:55 ` [PATCH 12/18] kernel-dev/common.rst: " Antonin Godard
2026-12-02 14:55 ` [PATCH 13/18] docs-wide: rename core/* fragments to oe-core/* Antonin Godard
2026-12-02 14:55 ` [PATCH 14/18] dev-manual/creating-fragments.rst: remove obsolete BBFILE_COLLECTIONS reference Antonin Godard
2026-12-02 14:55 ` [PATCH 15/18] dev-manual/licenses.rst: refresh obsolete bblayers.conf.sample example Antonin Godard
2026-12-02 14:55 ` [PATCH 16/18] dev-manual/new-recipe.rst: remove obsolete BBFILES statement Antonin Godard
2026-12-02 14:55 ` [PATCH 17/18] security-manual/vulnerabilities.rst: rename core -> oe-core in JSON snippet Antonin Godard
2026-12-02 14:55 ` [PATCH 18/18] test-manual/runtime-testing.rst: fix wrong BBPATH statements Antonin Godard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261202-layer-conf-changes-v1-7-da34d4c770c6@bootlin.com \
--to=antonin.godard@bootlin.com \
--cc=docs@lists.yoctoproject.org \
--cc=thomas.petazzoni@bootlin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.