summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Opdenacker <michael.opdenacker@bootlin.com>2023-04-04 19:35:43 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-04-28 14:46:17 +0100
commit6f71ce82141d977ae684ebdb9a3f2cff0ed0edc1 (patch)
treee6f8b41b4bd5000575617e1b3b18de0f527a3b3c
parent8fba3022119d155ea58f7b2c3cc8a1fe0fa823a3 (diff)
downloadpoky-6f71ce82141d977ae684ebdb9a3f2cff0ed0edc1.tar.gz
ref-manual: classes.rst: document devicetree.bbclass
This addresses [YOCTO #15092] (From yocto-docs rev: f65816f5ea62e6c4301c0bd0c6aad91110963f9e) Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com> Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--documentation/ref-manual/classes.rst43
1 files changed, 43 insertions, 0 deletions
diff --git a/documentation/ref-manual/classes.rst b/documentation/ref-manual/classes.rst
index 0762d1d8bc..a78368b380 100644
--- a/documentation/ref-manual/classes.rst
+++ b/documentation/ref-manual/classes.rst
@@ -580,6 +580,49 @@ add the task at the appropriate place, which is usually after
580:ref:`ref-tasks-install`. The class then takes care of 580:ref:`ref-tasks-install`. The class then takes care of
581staging the files from :term:`DEPLOYDIR` to :term:`DEPLOY_DIR_IMAGE`. 581staging the files from :term:`DEPLOYDIR` to :term:`DEPLOY_DIR_IMAGE`.
582 582
583.. _ref-classes-devicetree:
584
585``devicetree``
586==============
587
588The :ref:`ref-classes-devicetree` class allows to build a recipe that compiles
589device tree source files that are not in the kernel tree.
590
591The compilation of out-of-tree device tree sources is the same as the kernel
592in-tree device tree compilation process. This includes the ability to include
593sources from the kernel such as SoC ``dtsi`` files as well as C header files,
594such as ``gpio.h``.
595
596The :ref:`ref-tasks-compile` task will compile two kinds of files:
597
598- Regular device tree sources with a ``.dts`` extension.
599
600- Device tree overlays, detected from the presence of the ``/plugin/;``
601 string in the file contents.
602
603This class behaves in a similar way as the :ref:`ref-classes-kernel-devicetree`
604class, also deploying output files into ``/boot/devicetree``. However, this
605class stores the deployed device tree binaries into the ``devicetree``
606subdirectory. This avoids clashes with the :ref:`ref-classes-kernel-devicetree`
607output. Additionally, the device trees are populated into the sysroot for
608access via the sysroot from within other recipes.
609
610An extra padding is appended to non-overlay device trees binaries. This
611can typically be used as extra space for adding extra properties at boot time.
612The padding size can be modified by setting ``DT_PADDING_SIZE`` to the desired
613size, in bytes.
614
615See :oe_git:`devicetree.bbclass sources
616</openembedded-core/tree/meta/classes-recipe/devicetree.bbclass>`
617for further variables controlling this class.
618
619Here is an excerpt of an example ``recipes-kernel/linux/devicetree-acme.bb``
620recipe inheriting this class::
621
622 inherit devicetree
623 COMPATIBLE_MACHINE = "^mymachine$"
624 SRC_URI:mymachine = "file://mymachine.dts"
625
583.. _ref-classes-devshell: 626.. _ref-classes-devshell:
584 627
585``devshell`` 628``devshell``