All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: antonin.godard@bootlin.com, docs@lists.yoctoproject.org
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Subject: Re: [docs] [PATCH 01/18] ref-manual/layers.rst: add document
Date: Wed, 02 Dec 2026 17:30:41 +0000	[thread overview]
Message-ID: <9727e5083660211b7fa5b17ae02ae26acc93db81.camel@linuxfoundation.org> (raw)
In-Reply-To: <20261202-layer-conf-changes-v1-1-da34d4c770c6@bootlin.com>

On Wed, 2026-12-02 at 15:55 +0100, Antonin Godard via docs wrote:
> +
> +At a minimum, this file should contain the following variable assignments::
> +
> +   LAYERNAME = "meta-example"
> +   LAYERVERSION = "1"
> +   LAYERDEPENDS = "oe-core ..."
> +   LAYERSERIES_COMPAT = "garburn"


Technically, you don't need LAYERVERSION since it defaults to 1. It
depends whether this is what is the actual minimal or recommended...


> +See each variable's definition in the :doc:`variable glossary
> +</ref-manual/variables>` for more information.
> +
> +In addition to these variables:
> +
> +-  Only the variable prefixes listed in :term:`LAYER_PASSTHROUGH_VARS_PREFIXES`
> +   are allowed to be set from the :ref:`structure-conf-layer.conf` file. The
> +   :term:`OpenEmbedded-Core (OE-Core)` layer sets this variable.
> +
> +   .. note::
> +
> +      While not recommended, a layer can override the
> +      :term:`LAYER_PASSTHROUGH_VARS_PREFIXES` variable to allow other variables
> +      to be set from the :ref:`structure-conf-layer.conf` file.
> +
> +      This layer must set *the entire list* of prefixes with a regular ``=``
> +      assignment. It also must be the first one setting the
> +      :term:`LAYER_PASSTHROUGH_VARS_PREFIXES` variable in the :term:`BBLAYERS`
> +      list. As a consequence, any other statement made by another layer setting
> +      or appending the :term:`LAYER_PASSTHROUGH_VARS_PREFIXES` variable is
> +      ignored.

I'd like to suggest people use += on the values. This makes it clearer
to people it will get appended.

> +      If setting a global variable is required, it is recommended to do so from
> +      a distro :term:`configuration file` or from a :term:`configuration
> +      fragment`.
> +
> +   .. warning::
> +
> +      Any other variables set in this file will have no effect! To set a
> +      variable from a layer configuration file, which only affects the scope of
> +      the :term:`metadata` part of the layer, see the
> +      :ref:`structure-conf-layervars.conf` file definition.
> +
> +-  The :ref:`addpylib <bitbake-user-manual/bitbake-user-manual-metadata:Extending
> +   Python Library Code>` directive can be used to make an internal Python
> +   library available to the :term:`metadata`.
> +
> +.. _structure-conf-layervars.conf:
> +
> +``conf/layervars.conf``
> +-----------------------
> +
> +The :ref:`structure-conf-layervars.conf` is, like
> +:ref:`structure-conf-layer.conf`, part of the layer's ``conf/`` directory, and
> +can contain variable assignments. Those assignments only affect the
> +:term:`metadata` part of the layer itself *without affecting the global scope*.
> +
> +For example, if a layer provides a global :doc:`class </ref-manual/classes>`,
> +but this class only makes sense for the recipes part of the layer, then one
> +could write the following in :ref:`structure-conf-layervars.conf`::
> +
> +   INHERIT += "myclass"
> +
> +This class would be inherited only by the recipes part of the layer containing
> +the file, but other recipes *not* part of the layer would not inherit that
> +class.

Should we note it does not apply to bbappend files?

> +Layer Metadata
> +==============
> +
> +A layer can contain various forms of :term:`metadata`. The aim of this section
> +is not to explain what each of these types of :term:`metadata` do, but rather
> +enumerate and link to each part of the documentation associated with them:
> +
> +-  Recipes: see the :ref:`bitbake-user-manual/bitbake-user-manual-intro:Recipes`
> +   section for more information.
> +
> +-  Append files (bbappends): see the :ref:`bitbake:append-bbappend-files`
> +   section for information.
> +
> +-  Configuration files:
> +
> +   -  Machine configuration files, see the :ref:`bsp-manual/bsp:Hardware
> +      Configuration Options` section for more information.
> +
> +   -  Distro configuration files, see the :doc:`/dev-manual/custom-distribution`
> +      section for more information.
> +
> +   -  Configuration Fragments: see the :doc:`/dev-manual/creating-fragments`
> +      section for more information.
> +
> +-  :doc:`classes </ref-manual/classes>`: expected to be found by
> +   :term:`BitBake` in any of the ``classes/``, ``classes-global/``, and
> +   ``classes-recipe/`` directories at the root of the layer.
> +
> +   See the :doc:`/ref-manual/classes` section for more information on classes.
> +
> +-  Internal Python libraries: see the
> +   :ref:`bitbake-user-manual/bitbake-user-manual-metadata:Extending
> +   Python Library Code` section for more information.
> +
> +Additional Information on Layers
> +================================
> +
> +The BitBake User Manual contains additional information on layers which can be
> +found here:
> +
> +-  :ref:`bitbake-user-manual/bitbake-user-manual-execution:Locating and Parsing Recipes`.
> +-  :ref:`bitbake-user-manual/bitbake-user-manual-execution:Dynamic Recipes and Append Files`.
> +-  :ref:`bitbake-user-manual/bitbake-user-manual-execution:Parsing Order And Priorities`.

Should we recommend yocto-check-layer here somewhere?

Cheers,

Richard


  reply	other threads:[~2026-12-02 17:30 UTC|newest]

Thread overview: 20+ 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 17:30   ` Richard Purdie [this message]
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 ` [PATCH 07/18] migration-guides/migration-6.2.rst: add section on now layer format Antonin Godard
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=9727e5083660211b7fa5b17ae02ae26acc93db81.camel@linuxfoundation.org \
    --to=richard.purdie@linuxfoundation.org \
    --cc=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.