summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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``