diff options
author | Michael Opdenacker <michael.opdenacker@bootlin.com> | 2023-04-04 19:35:43 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-05-03 11:46:08 +0100 |
commit | edb884a7eddcbc7ed045c5cb137e694bd8a5954d (patch) | |
tree | 8f617dd1794409042801ec1f22e94ca5b21a4758 /documentation | |
parent | 878271e1a144200bc576f18462d2e3a1d1df3670 (diff) | |
download | poky-edb884a7eddcbc7ed045c5cb137e694bd8a5954d.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>
Diffstat (limited to 'documentation')
-rw-r--r-- | documentation/ref-manual/classes.rst | 43 |
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 |
581 | staging the files from :term:`DEPLOYDIR` to :term:`DEPLOY_DIR_IMAGE`. | 581 | staging the files from :term:`DEPLOYDIR` to :term:`DEPLOY_DIR_IMAGE`. |
582 | 582 | ||
583 | .. _ref-classes-devicetree: | ||
584 | |||
585 | ``devicetree`` | ||
586 | ============== | ||
587 | |||
588 | The :ref:`ref-classes-devicetree` class allows to build a recipe that compiles | ||
589 | device tree source files that are not in the kernel tree. | ||
590 | |||
591 | The compilation of out-of-tree device tree sources is the same as the kernel | ||
592 | in-tree device tree compilation process. This includes the ability to include | ||
593 | sources from the kernel such as SoC ``dtsi`` files as well as C header files, | ||
594 | such as ``gpio.h``. | ||
595 | |||
596 | The :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 | |||
603 | This class behaves in a similar way as the :ref:`ref-classes-kernel-devicetree` | ||
604 | class, also deploying output files into ``/boot/devicetree``. However, this | ||
605 | class stores the deployed device tree binaries into the ``devicetree`` | ||
606 | subdirectory. This avoids clashes with the :ref:`ref-classes-kernel-devicetree` | ||
607 | output. Additionally, the device trees are populated into the sysroot for | ||
608 | access via the sysroot from within other recipes. | ||
609 | |||
610 | An extra padding is appended to non-overlay device trees binaries. This | ||
611 | can typically be used as extra space for adding extra properties at boot time. | ||
612 | The padding size can be modified by setting ``DT_PADDING_SIZE`` to the desired | ||
613 | size, in bytes. | ||
614 | |||
615 | See :oe_git:`devicetree.bbclass sources | ||
616 | </openembedded-core/tree/meta/classes-recipe/devicetree.bbclass>` | ||
617 | for further variables controlling this class. | ||
618 | |||
619 | Here is an excerpt of an example ``recipes-kernel/linux/devicetree-acme.bb`` | ||
620 | recipe 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`` |