diff options
-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`` |