diff options
| author | Mikko Rapeli <mikko.rapeli@linaro.org> | 2024-11-27 15:59:21 +0200 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-11-29 18:25:35 +0000 |
| commit | 3aa5c512a3a6d538847e92f674e933cd371bb2d5 (patch) | |
| tree | 752c9b86c7d73e276160b1716db621ce49ddce34 /documentation | |
| parent | 371f4b79415f1b6073d474aaceea4184459c4d3c (diff) | |
| download | poky-3aa5c512a3a6d538847e92f674e933cd371bb2d5.tar.gz | |
classes.rst variables.rst: add documentation for uki.bbclass
Documentation for the new class.
[YOCTO #15650]
https://bugzilla.yoctoproject.org/show_bug.cgi?id=15650
(From yocto-docs rev: fd46074dc7bba49ab49c706c408c92958e67cfa4)
Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org>
Reviewed-by: Antonin Godard <antonin.godard@bootlin.com>
Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation')
| -rw-r--r-- | documentation/ref-manual/classes.rst | 50 | ||||
| -rw-r--r-- | documentation/ref-manual/variables.rst | 42 |
2 files changed, 92 insertions, 0 deletions
diff --git a/documentation/ref-manual/classes.rst b/documentation/ref-manual/classes.rst index b92f4e4f20..33e1a4b435 100644 --- a/documentation/ref-manual/classes.rst +++ b/documentation/ref-manual/classes.rst | |||
| @@ -3345,6 +3345,56 @@ and the `signature process | |||
| 3345 | See also the description of :ref:`ref-classes-kernel-fitimage` class, which this class | 3345 | See also the description of :ref:`ref-classes-kernel-fitimage` class, which this class |
| 3346 | imitates. | 3346 | imitates. |
| 3347 | 3347 | ||
| 3348 | .. _ref-classes-uki: | ||
| 3349 | |||
| 3350 | ``uki`` | ||
| 3351 | ======= | ||
| 3352 | |||
| 3353 | The :ref:`ref-classes-uki` class provides support for `Unified Kernel Image | ||
| 3354 | (UKI) <https://uapi-group.org/specifications/specs/unified_kernel_image/>`__ | ||
| 3355 | format. UKIs combine kernel, :term:`Initramfs`, signatures, metadata etc to a | ||
| 3356 | single UEFI firmware compatible binary. The class is intended to be inherited | ||
| 3357 | by rootfs image recipes. The build configuration should also use an | ||
| 3358 | :term:`Initramfs`, ``systemd-boot`` as boot menu provider and have UEFI support | ||
| 3359 | on target hardware. Using ``systemd`` as init is recommended. Image builds | ||
| 3360 | should create an ESP partition for UEFI firmware and copy ``systemd-boot`` and | ||
| 3361 | UKI files there. Sample configuration for Wic images is provided in | ||
| 3362 | :oe_git:`scripts/lib/wic/canned-wks/efi-uki-bootdisk.wks.in | ||
| 3363 | <openembedded-core/tree/scripts/lib/wic/canned-wks/efi-uki-bootdisk.wks.in>`. | ||
| 3364 | UKIs are generated using ``systemd`` reference implementation `ukify | ||
| 3365 | <https://www.freedesktop.org/software/systemd/man/latest/ukify.html>`__. | ||
| 3366 | This class uses a number of variables but tries to find sensible defaults for | ||
| 3367 | them. | ||
| 3368 | |||
| 3369 | The variables used by this class are: | ||
| 3370 | |||
| 3371 | - :term:`EFI_ARCH`: architecture name within EFI standard, set in | ||
| 3372 | :oe_git:`meta/conf/image-uefi.conf | ||
| 3373 | <openembedded-core/tree/meta/conf/image-uefi.conf>` | ||
| 3374 | - :term:`IMAGE_EFI_BOOT_FILES`: files to install to EFI boot partition | ||
| 3375 | created by the ``bootimg-efi`` Wic plugin | ||
| 3376 | - :term:`INITRAMFS_IMAGE`: initramfs recipe name | ||
| 3377 | - :term:`KERNEL_DEVICETREE`: optional devicetree files to embed into UKI | ||
| 3378 | - :term:`UKIFY_CMD`: `ukify | ||
| 3379 | <https://www.freedesktop.org/software/systemd/man/latest/ukify.html>`__ | ||
| 3380 | command to build the UKI image | ||
| 3381 | - :term:`UKI_CMDLINE`: kernel command line to use with UKI | ||
| 3382 | - :term:`UKI_CONFIG_FILE`: optional config file for `ukify | ||
| 3383 | <https://www.freedesktop.org/software/systemd/man/latest/ukify.html>`__ | ||
| 3384 | - :term:`UKI_FILENAME`: output file name for the UKI image | ||
| 3385 | - :term:`UKI_KERNEL_FILENAME`: kernel image file name | ||
| 3386 | - :term:`UKI_SB_CERT`: optional UEFI secureboot certificate matching the | ||
| 3387 | private key | ||
| 3388 | - :term:`UKI_SB_KEY`: optional UEFI secureboot private key to sign UKI with | ||
| 3389 | |||
| 3390 | For examples on how to use this class see oeqa selftest | ||
| 3391 | :oe_git:`meta/lib/oeqa/selftest/cases/uki.py | ||
| 3392 | <openembedded-core/tree/meta/lib/oeqa/selftest/cases/uki.py>`. | ||
| 3393 | Also an oeqa runtime test :oe_git:`meta/lib/oeqa/runtime/cases/uki.py | ||
| 3394 | <openembedded-core/tree/meta/lib/oeqa/runtime/cases/uki.py>` is provided which | ||
| 3395 | verifies that the target system booted the same UKI binary as was set at | ||
| 3396 | buildtime via :term:`UKI_FILENAME`. | ||
| 3397 | |||
| 3348 | .. _ref-classes-uninative: | 3398 | .. _ref-classes-uninative: |
| 3349 | 3399 | ||
| 3350 | ``uninative`` | 3400 | ``uninative`` |
diff --git a/documentation/ref-manual/variables.rst b/documentation/ref-manual/variables.rst index ec4d7ab73f..1eee617d59 100644 --- a/documentation/ref-manual/variables.rst +++ b/documentation/ref-manual/variables.rst | |||
| @@ -2355,6 +2355,11 @@ system and gives an overview of their function and contents. | |||
| 2355 | specifies the size of padding appended to the device tree blob, used as | 2355 | specifies the size of padding appended to the device tree blob, used as |
| 2356 | extra space typically for additional properties during boot. | 2356 | extra space typically for additional properties during boot. |
| 2357 | 2357 | ||
| 2358 | :term:`EFI_ARCH` | ||
| 2359 | The CPU architecture name within EFI standard. Set in | ||
| 2360 | :oe_git:`meta/conf/image-uefi.conf | ||
| 2361 | <openembedded-core/tree/meta/conf/image-uefi.conf>`. | ||
| 2362 | |||
| 2358 | :term:`EFI_PROVIDER` | 2363 | :term:`EFI_PROVIDER` |
| 2359 | When building bootable images (i.e. where ``hddimg``, ``iso``, or | 2364 | When building bootable images (i.e. where ``hddimg``, ``iso``, or |
| 2360 | ``wic.vmdk`` is in :term:`IMAGE_FSTYPES`), the | 2365 | ``wic.vmdk`` is in :term:`IMAGE_FSTYPES`), the |
| @@ -9846,6 +9851,43 @@ system and gives an overview of their function and contents. | |||
| 9846 | passes and uses "all" for the target during the U-Boot building | 9851 | passes and uses "all" for the target during the U-Boot building |
| 9847 | process. | 9852 | process. |
| 9848 | 9853 | ||
| 9854 | :term:`UKIFY_CMD` | ||
| 9855 | When inheriting the :ref:`ref-classes-uki` class, | ||
| 9856 | `ukify <https://www.freedesktop.org/software/systemd/man/latest/ukify.html>`__ command to build | ||
| 9857 | `Unified Kernel Image (UKI) <https://uapi-group.org/specifications/specs/unified_kernel_image/>`__. | ||
| 9858 | Defaults to ``ukify build``. | ||
| 9859 | |||
| 9860 | :term:`UKI_CMDLINE` | ||
| 9861 | When inheriting the :ref:`ref-classes-uki` class, the kernel command line | ||
| 9862 | to use when booting the `Unified Kernel Image (UKI) | ||
| 9863 | <https://uapi-group.org/specifications/specs/unified_kernel_image/>`__. | ||
| 9864 | Defaults to ``rootwait root=LABEL=root console=${KERNEL_CONSOLE}``. | ||
| 9865 | |||
| 9866 | :term:`UKI_CONFIG_FILE` | ||
| 9867 | When inheriting the :ref:`ref-classes-uki` class, an optional config | ||
| 9868 | file for the `ukify | ||
| 9869 | <https://www.freedesktop.org/software/systemd/man/latest/ukify.html>`__ | ||
| 9870 | command. | ||
| 9871 | |||
| 9872 | :term:`UKI_FILENAME` | ||
| 9873 | When inheriting the :ref:`ref-classes-uki` class, the output file name | ||
| 9874 | for the generated `Unified Kernel Image (UKI) | ||
| 9875 | <https://uapi-group.org/specifications/specs/unified_kernel_image/>`__. | ||
| 9876 | Defaults to ``uki.efi``. | ||
| 9877 | |||
| 9878 | :term:`UKI_KERNEL_FILENAME` | ||
| 9879 | When inheriting the :ref:`ref-classes-uki` class, the kernel image file | ||
| 9880 | name to use as input. Defaults to :term:`KERNEL_IMAGETYPE`. | ||
| 9881 | |||
| 9882 | :term:`UKI_SB_CERT` | ||
| 9883 | When inheriting the :ref:`ref-classes-uki` class, optional UEFI | ||
| 9884 | secureboot certificate matching the private key in :term:`UKI_SB_KEY`. | ||
| 9885 | |||
| 9886 | :term:`UKI_SB_KEY` | ||
| 9887 | When inheriting the :ref:`ref-classes-uki` class, optional UEFI | ||
| 9888 | secureboot private key to sign the `Unified Kernel Image (UKI) | ||
| 9889 | <https://uapi-group.org/specifications/specs/unified_kernel_image/>`__. | ||
| 9890 | |||
| 9849 | :term:`UNKNOWN_CONFIGURE_OPT_IGNORE` | 9891 | :term:`UNKNOWN_CONFIGURE_OPT_IGNORE` |
| 9850 | Specifies a list of options that, if reported by the configure script | 9892 | Specifies a list of options that, if reported by the configure script |
| 9851 | as being invalid, should not generate a warning during the | 9893 | as being invalid, should not generate a warning during the |
