1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-09 17:39:31 +00:00

ref-manual: improve description of kernel-fitimage variables

- Mentioning that they are related to this class
  (for further information about their usage)
- Replace "fitImage" by "FIT image"
- Minor formating and style fixes

(From yocto-docs rev: 07214a4ff2646efb143a02fc9381a029870e9b56)

Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
CC: Jamin Lin <jamin_lin@aspeedtech.com>
Reviewed-by: Sean Anderson <sean.anderson@seco.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Michael Opdenacker
2023-05-10 17:31:29 +02:00
committed by Richard Purdie
parent 4417a30196
commit a95cbed77f
2 changed files with 68 additions and 41 deletions
+2 -2
View File
@@ -1582,13 +1582,13 @@ The :ref:`ref-classes-kernel-devicetree` class, which is inherited by the
=================== ===================
The :ref:`ref-classes-kernel-fitimage` class provides support to pack a kernel image, The :ref:`ref-classes-kernel-fitimage` class provides support to pack a kernel image,
device trees, a U-boot script, a :term:`Initramfs` bundle and a RAM disk device trees, a U-boot script, an :term:`Initramfs` bundle and a RAM disk
into a single FIT image. In theory, a FIT image can support any number into a single FIT image. In theory, a FIT image can support any number
of kernels, U-boot scripts, :term:`Initramfs` bundles, RAM disks and device-trees. of kernels, U-boot scripts, :term:`Initramfs` bundles, RAM disks and device-trees.
However, :ref:`ref-classes-kernel-fitimage` currently only supports However, :ref:`ref-classes-kernel-fitimage` currently only supports
limited usecases: just one kernel image, an optional U-boot script, limited usecases: just one kernel image, an optional U-boot script,
an optional :term:`Initramfs` bundle, an optional RAM disk, and any number of an optional :term:`Initramfs` bundle, an optional RAM disk, and any number of
device tree. device trees.
To create a FIT image, it is required that :term:`KERNEL_CLASSES` To create a FIT image, it is required that :term:`KERNEL_CLASSES`
is set to include ":ref:`ref-classes-kernel-fitimage`" and :term:`KERNEL_IMAGETYPE` is set to include ":ref:`ref-classes-kernel-fitimage`" and :term:`KERNEL_IMAGETYPE`
+66 -39
View File
@@ -2921,9 +2921,8 @@ system and gives an overview of their function and contents.
table file, examine the existing ``fs-perms.txt``. table file, examine the existing ``fs-perms.txt``.
:term:`FIT_ADDRESS_CELLS` :term:`FIT_ADDRESS_CELLS`
Specifies the value of the ``#address-cells`` value for the Specifies the value of the ``#address-cells`` value for the
description of the kernel FIT image. description of the FIT image.
The default value is set to "1" by the :ref:`ref-classes-kernel-fitimage` The default value is set to "1" by the :ref:`ref-classes-kernel-fitimage`
class, which corresponds to 32 bit addresses. class, which corresponds to 32 bit addresses.
@@ -2941,67 +2940,82 @@ system and gives an overview of their function and contents.
See `more details about #address-cells <https://elinux.org/Device_Tree_Usage#How_Addressing_Works>`__. See `more details about #address-cells <https://elinux.org/Device_Tree_Usage#How_Addressing_Works>`__.
:term:`FIT_CONF_DEFAULT_DTB` :term:`FIT_CONF_DEFAULT_DTB`
Specifies the default device tree binary (dtb) file for a fitImage when Specifies the default device tree binary (dtb) file for a FIT image
multiple are provided. when multiple ones are provided.
This variable is used in the :ref:`ref-classes-kernel-fitimage` class.
:term:`FIT_DESC` :term:`FIT_DESC`
Specifies the description string encoded into a fitImage. The default Specifies the description string encoded into a FIT image. The
value is set by the :ref:`ref-classes-kernel-fitimage` default value is set by the :ref:`ref-classes-kernel-fitimage` class as
class as follows:: follows::
FIT_DESC ?= "U-Boot fitImage for ${DISTRO_NAME}/${PV}/${MACHINE}" FIT_DESC ?= "U-Boot fitImage for ${DISTRO_NAME}/${PV}/${MACHINE}"
:term:`FIT_GENERATE_KEYS` :term:`FIT_GENERATE_KEYS`
Decides whether to generate the keys for signing fitImage if they Decides whether to generate the keys for signing the FIT image if
don't already exist. The keys are created in :term:`UBOOT_SIGN_KEYDIR`. they don't already exist. The keys are created in
The default value is 0. :term:`UBOOT_SIGN_KEYDIR`. The default value is set to "0"
by the :ref:`ref-classes-kernel-fitimage` class.
:term:`FIT_HASH_ALG` :term:`FIT_HASH_ALG`
Specifies the hash algorithm used in creating the FIT Image. For e.g. sha256. Specifies the hash algorithm used in creating the FIT Image.
This variable is set by default to "sha256" by the
:ref:`ref-classes-kernel-fitimage` class.
:term:`FIT_KERNEL_COMP_ALG` :term:`FIT_KERNEL_COMP_ALG`
Compression algorithm to use for the kernel image inside the FIT Image. The compression algorithm to use for the kernel image inside the FIT Image.
At present, the only supported values are "gzip" (default), "lzo" or "none". At present, the only supported values are "gzip" (default), "lzo" or "none".
If you set this variable to anything other than "none" you may also need If you set this variable to anything other than "none" you may also need
to set :term:`FIT_KERNEL_COMP_ALG_EXTENSION`. to set :term:`FIT_KERNEL_COMP_ALG_EXTENSION`.
This variable is used in the :ref:`ref-classes-kernel-uboot` class.
:term:`FIT_KERNEL_COMP_ALG_EXTENSION` :term:`FIT_KERNEL_COMP_ALG_EXTENSION`
File extension corresponding to :term:`FIT_KERNEL_COMP_ALG`. The default File extension corresponding to :term:`FIT_KERNEL_COMP_ALG`. The default
value is ".gz". If you set :term:`FIT_KERNEL_COMP_ALG` to "lzo", value is set ".gz" by the :ref:`ref-classes-kernel-uboot` class. If you
you may want to set this variable to ".lzo". set :term:`FIT_KERNEL_COMP_ALG` to "lzo", you may want to set this
variable to ".lzo".
:term:`FIT_KEY_GENRSA_ARGS` :term:`FIT_KEY_GENRSA_ARGS`
Arguments to openssl genrsa for generating RSA private key for signing Arguments to ``openssl genrsa`` for generating a RSA private key for
fitImage. The default value is "-F4". i.e. the public exponent 65537 to signing the FIT image. The default value is set to "-F4" by the
use. :ref:`ref-classes-kernel-fitimage` class.
:term:`FIT_KEY_REQ_ARGS` :term:`FIT_KEY_REQ_ARGS`
Arguments to openssl req for generating certificate for signing fitImage. Arguments to ``openssl req`` for generating a certificate for signing
The default value is "-batch -new". batch for non interactive mode the FIT image. The default value is "-batch -new" by the
and new for generating new keys. :ref:`ref-classes-kernel-fitimage` class, "batch" for
non interactive mode and "new" for generating new keys.
:term:`FIT_KEY_SIGN_PKCS` :term:`FIT_KEY_SIGN_PKCS`
Format for public key certificate used in signing fitImage. Format for the public key certificate used for signing the FIT image.
The default value is "x509". The default value is set to "x509" by the
:ref:`ref-classes-kernel-fitimage` class.
:term:`FIT_SIGN_ALG` :term:`FIT_SIGN_ALG`
Specifies the signature algorithm used in creating the FIT Image. Specifies the signature algorithm used in creating the FIT Image.
For e.g. rsa2048. This variable is set by default to "rsa2048" by the
:ref:`ref-classes-kernel-fitimage` class.
:term:`FIT_PAD_ALG` :term:`FIT_PAD_ALG`
Specifies the padding algorithm used in creating the FIT Image. Specifies the padding algorithm used in creating the FIT Image.
The default value is "pkcs-1.5". The default value is set to "pkcs-1.5" by the
:ref:`ref-classes-kernel-fitimage` class.
:term:`FIT_SIGN_INDIVIDUAL` :term:`FIT_SIGN_INDIVIDUAL`
If set to "1", then the :ref:`ref-classes-kernel-fitimage` If set to "1", then the :ref:`ref-classes-kernel-fitimage`
class will sign the kernel, dtb and ramdisk images individually in addition class will sign the kernel, dtb and ramdisk images individually in addition
to signing the fitImage itself. This could be useful if you are to signing the FIT image itself. This could be useful if you are
intending to verify signatures in another context than booting via intending to verify signatures in another context than booting via
U-Boot. U-Boot.
This variable is set to "0" by default.
:term:`FIT_SIGN_NUMBITS` :term:`FIT_SIGN_NUMBITS`
Size of private key in number of bits used in fitImage. The default Size of the private key used in the FIT image, in number of bits.
value is "2048". The default value for this variable is set to "2048"
by the :ref:`ref-classes-kernel-fitimage` class.
:term:`FONT_EXTRA_RDEPENDS` :term:`FONT_EXTRA_RDEPENDS`
When inheriting the :ref:`ref-classes-fontcache` class, When inheriting the :ref:`ref-classes-fontcache` class,
@@ -4396,7 +4410,7 @@ system and gives an overview of their function and contents.
:ref:`ref-classes-kernel` class should inherit. You typically :ref:`ref-classes-kernel` class should inherit. You typically
append this variable to enable extended image types. An example is append this variable to enable extended image types. An example is
":ref:`ref-classes-kernel-fitimage`", which enables ":ref:`ref-classes-kernel-fitimage`", which enables
fitImage support and resides in ``meta/classes-recipe/kernel-fitimage.bbclass``. FIT image support and resides in ``meta/classes-recipe/kernel-fitimage.bbclass``.
You can register custom kernel image types with the You can register custom kernel image types with the
:ref:`ref-classes-kernel` class using this variable. :ref:`ref-classes-kernel` class using this variable.
@@ -9094,6 +9108,11 @@ system and gives an overview of their function and contents.
To pass a 64 bit address for FIT image creation, you will need to set To pass a 64 bit address for FIT image creation, you will need to set
the :term:`FIT_ADDRESS_CELLS` variable too. the :term:`FIT_ADDRESS_CELLS` variable too.
This variable is used by the :ref:`ref-classes-kernel-fitimage`,
:ref:`ref-classes-kernel-uimage`, :ref:`ref-classes-kernel`,
:ref:`ref-classes-uboot-config` and :ref:`ref-classes-uboot-sign`
classes.
:term:`UBOOT_LOCALVERSION` :term:`UBOOT_LOCALVERSION`
Appends a string to the name of the local version of the U-Boot Appends a string to the name of the local version of the U-Boot
image. For example, assuming the version of the U-Boot image built image. For example, assuming the version of the U-Boot image built
@@ -9122,11 +9141,13 @@ system and gives an overview of their function and contents.
script or function if desired. The default is "uboot-mkimage". script or function if desired. The default is "uboot-mkimage".
:term:`UBOOT_MKIMAGE_DTCOPTS` :term:`UBOOT_MKIMAGE_DTCOPTS`
Options for the device tree compiler passed to mkimage '-D' feature while Options for the device tree compiler passed to ``mkimage -D`` feature
creating FIT image in :ref:`ref-classes-kernel-fitimage` class. If while creating a FIT image with the :ref:`ref-classes-kernel-fitimage`
:term:`UBOOT_MKIMAGE_DTCOPTS` is not set then class. If :term:`UBOOT_MKIMAGE_DTCOPTS` is not set then the
:ref:`ref-classes-kernel-fitimage` will not pass the ``-D`` option to :ref:`ref-classes-kernel-fitimage` class will not pass the ``-D`` option
mkimage. to ``mkimage``.
This variable is also used by the :ref:`ref-classes-uboot-sign` class.
:term:`UBOOT_MKIMAGE_KERNEL_TYPE` :term:`UBOOT_MKIMAGE_KERNEL_TYPE`
Specifies the type argument for the kernel as passed to ``uboot-mkimage``. Specifies the type argument for the kernel as passed to ``uboot-mkimage``.
@@ -9159,15 +9180,21 @@ system and gives an overview of their function and contents.
:term:`UBOOT_SIGN_ENABLE` :term:`UBOOT_SIGN_ENABLE`
Enable signing of FIT image. The default value is "0". Enable signing of FIT image. The default value is "0".
This variable is used by the :ref:`ref-classes-kernel-fitimage`,
:ref:`ref-classes-uboot-config` and :ref:`ref-classes-uboot-sign`
classes.
:term:`UBOOT_SIGN_KEYDIR` :term:`UBOOT_SIGN_KEYDIR`
Location of the directory containing the RSA key and Location of the directory containing the RSA key and certificate used for
certificate used for signing FIT image. signing FIT image, used by the :ref:`ref-classes-kernel-fitimage` and
:ref:`ref-classes-uboot-sign` classes.
:term:`UBOOT_SIGN_KEYNAME` :term:`UBOOT_SIGN_KEYNAME`
The name of keys used for signing U-Boot FIT image stored in The name of keys used by the :ref:`ref-classes-kernel-fitimage` class
:term:`UBOOT_SIGN_KEYDIR` directory. For e.g. dev.key key and dev.crt for signing U-Boot FIT image stored in the :term:`UBOOT_SIGN_KEYDIR`
certificate stored in :term:`UBOOT_SIGN_KEYDIR` directory will have directory. If we have for example a ``dev.key`` key and a ``dev.crt``
:term:`UBOOT_SIGN_KEYNAME` set to "dev". certificate stored in the :term:`UBOOT_SIGN_KEYDIR` directory, you will
have to set :term:`UBOOT_SIGN_KEYNAME` to ``dev``.
:term:`UBOOT_SUFFIX` :term:`UBOOT_SUFFIX`
Points to the generated U-Boot extension. For example, ``u-boot.sb`` Points to the generated U-Boot extension. For example, ``u-boot.sb``