diff mbox series

Add notes about layer.conf file

Message ID 20231016120058.3053694-1-bhstalel@gmail.com
State New
Headers show
Series Add notes about layer.conf file | expand

Commit Message

Talel BELHADJ SALEM Oct. 16, 2023, noon UTC
As discussed before with Richard Purdie, the code supports this but the documentation is not.
Developers in general will not notice this or focus on it because they do not mess with the
layer.conf template file, but in my opinion I think more details can help.

Signed-off-by: Talel BELHAJSALEM <bhstalel@gmail.com>
---
 documentation/dev-manual/layers.rst | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
diff mbox series

Patch

diff --git a/documentation/dev-manual/layers.rst b/documentation/dev-manual/layers.rst
index 2d809562d..31cd21dac 100644
--- a/documentation/dev-manual/layers.rst
+++ b/documentation/dev-manual/layers.rst
@@ -128,6 +128,27 @@  Follow these general steps to create your layer without using tools:
       variable is a good way to indicate if your particular layer is
       current.
 
+
+   .. note::
+
+      A layer does not have to contain only recipes `.bb` or append files `.bbappend`.
+      Generally, developers create layers using `bitbake-layers create-layer`, see
+      ":ref:`dev-manual/layers:creating a general layer using the \`\`bitbake-layers\`\` script`", that
+      creates the `layer.conf` file from a template located in `meta/lib/bblayers/templates/layer.conf`.
+      In fact, all the variables set in `layer.conf` are not mandatory except for the precense of
+      :term:`BBFILE_COLLECTIONS` will lead to the obligation of :term:`LAYERSERIES_COMPAT`, and :term:`BBFILE_PATTERN`.
+
+   .. note::
+
+      If you want to deviate from the regular `layer.conf` and specify the layer as top source for recipes
+      with::
+
+         BBFILES += "${LAYERDIR}"
+
+      then you need to keep all your recipes directly under the layer (example: `meta-example/recipe_0.1.bb`).
+      **IMPORTANT**: This is not recommended at all, but it is supported in the source code. Following
+      the same community convention is, always, the right way to go.
+
 #. *Add Content:* Depending on the type of layer, add the content. If
    the layer adds support for a machine, add the machine configuration
    in a ``conf/machine/`` file within the layer. If the layer adds