Skip to contentSkip to conversation

ref-manual: add uboot-extlinux-config class documentation

PATCH Applied Antonin Godard 1 participant 2 messages Aug 13 – Aug 24

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 ref-manual: add uboot-extlinux-config class documentation

Add documentation for the uboot-extlinux-config class and the variables it defines, including how to enable it and how to customize the output extlinux.conf file.

[YOCTO #15629]

---
Changes in v2:
- Address comments by Quentin (thanks!)
- Add doc for more extlinux related variables
- Link to v1: https://patch.msgid.link/[email protected]

---
 documentation/ref-manual/classes.rst   |  56 ++++++++++
 documentation/ref-manual/variables.rst | 184 +++++++++++++++++++++++++++++++++
 2 files changed, 240 insertions(+)
documentation/ref-manual/classes.rst +56 -0
index 98dff1bac..b015dc169 100644
@@ -3470,6 +3470,62 @@ possible.
 See the :term:`UBOOT_CONFIG` and :term:`UBOOT_MACHINE` variables for additional
 information.
 
+.. _ref-classes-uboot-extlinux-config:
+
+``uboot-extlinux-config``
+=========================
+
+The :ref:`ref-classes-uboot-extlinux-config` class provides support for
+generating an ``extlinux.conf`` file part of the `Generic Distro Configuration Concept
+<https://docs.u-boot-project.org/en/latest/develop/distro.html#boot-configuration-files>`__
+of U-Boot.
+
+The class can be inherited in a `U-Boot <https://u-boot-project.org/>`__ recipe
+with::
+
+   inherit uboot-extlinux-config
+
+However, the class functionality is disabled by default. To enable it, set the
+:term:`UBOOT_EXTLINUX` variable to "1" from the U-Boot recipe or from a
+``bbappend`` file::
+
+   UBOOT_EXTLINUX = "1"
+
+In addition to :term:`UBOOT_EXTLINUX`, the :term:`UBOOT_EXTLINUX_ROOT` variable
+must be set to the ``root=`` parameter of the `Linux kernel command-line
+<https://docs.kernel.org/admin-guide/kernel-parameters.html>`__. For example,
+the following would set this value to the second partition of MMC block device
+0::
+
+   UBOOT_EXTLINUX_ROOT = "root=/dev/mmcblk0p2"
+
+After building the U-Boot recipe, an ``extlinux.conf`` is generated and placed
+in the deployment directory (:term:`DEPLOY_DIR_IMAGE`):
+
+.. code-block:: text
+
+   tmp/deploy/images/<MACHINE>/extlinux.conf
+
+This file can be customized using the variables beginning with
+``UBOOT_EXTLINUX_`` in the :doc:`Variables Glossary </ref-manual/variables>`
+section of the Yocto Project Reference Manual.
+
+.. note::
+
+   Multiple ``LABELS`` can be specified through the
+   :term:`UBOOT_EXTLINUX_LABELS` variable (i.e. multiple boot entries).
+   Override-style assignment should then be used to specify label-specific
+   properties. See the definition of :term:`UBOOT_EXTLINUX_LABELS` for more
+   information.
+
+.. tip::
+
+   When using the :ref:`bootloader <ref-manual/kickstart:Command: bootloader>`
+   command with WIC, you should explicitly configure the ``.wks.in`` file to use
+   the ``extlinux.conf`` file generated by this class with
+   ``--configfile="${DEPLOY_DIR_IMAGE}/extlinux.conf"``. Otherwise it generates
+   a default ``extlinux.conf`` file without taking this class into account.
+
 .. _ref-classes-uboot-sign:
 
 ``uboot-sign``
documentation/ref-manual/variables.rst +184 -0

190 lines not on this page · raw message

---
base-commit: 41dae3c3da3ada1745fc60228ff6269c64ee2361
change-id: 20260429-uboot-extlinux-config-ff587c00925b

author Applied
#1 lore raw

Applied, thanks!

[1/1] ref-manual: add uboot-extlinux-config class documentation

      commit: 0ca79ce512afdd74193dd6fa21be6ddae34e5467