From patchwork Wed Jul 12 22:03:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ulrich_=C3=96lmann?= X-Patchwork-Id: 27291 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 62F73C001B0 for ; Wed, 12 Jul 2023 22:03:49 +0000 (UTC) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [85.220.165.71]) by mx.groups.io with SMTP id smtpd.web11.2726.1689199420513358413 for ; Wed, 12 Jul 2023 15:03:41 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: pengutronix.de, ip: 85.220.165.71, mailfrom: uol@pengutronix.de) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qJhvt-0008Oe-W6; Thu, 13 Jul 2023 00:03:38 +0200 Received: from [2a0a:edc0:0:1101:1d::39] (helo=dude03.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1qJhvs-00DyaB-Ak; Thu, 13 Jul 2023 00:03:36 +0200 Received: from uol by dude03.red.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1qJhvr-006qGH-0Z; Thu, 13 Jul 2023 00:03:35 +0200 From: =?utf-8?q?Ulrich_=C3=96lmann?= To: Yocto Project Documentation Cc: yocto@pengutronix.de, =?utf-8?q?Ulrich_=C3=96lmann?= Subject: [PATCH 1/3] ref-manual: classes: kernel-fitimage: fix variable name Date: Thu, 13 Jul 2023 00:03:30 +0200 Message-Id: <20230712220332.1630850-1-u.oelmann@pengutronix.de> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: uol@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: docs@lists.yoctoproject.org List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 12 Jul 2023 22:03:49 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/docs/message/4046 The actual code in kernel-fitimage.bbclass checks if "fitImage" is listed in KERNEL_IMAGETYPES (see e.g. [1]) whereas the class does not use KERNEL_IMAGETYPE at all. [1] https://git.yoctoproject.org/poky/tree/meta/classes-recipe/kernel-fitimage.bbclass?h=4.3_M1&id=cc97d775cb402df0d4122bf54eab1a5198c98471#n9 Signed-off-by: Ulrich Ölmann --- documentation/ref-manual/classes.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/documentation/ref-manual/classes.rst b/documentation/ref-manual/classes.rst index e555a80b5af9..c3fa9a86966e 100644 --- a/documentation/ref-manual/classes.rst +++ b/documentation/ref-manual/classes.rst @@ -1599,8 +1599,8 @@ an optional :term:`Initramfs` bundle, an optional RAM disk, and any number of device trees. 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 "fitImage". +is set to include ":ref:`ref-classes-kernel-fitimage`" and :term:`KERNEL_IMAGETYPES` +is set to include "fitImage". The options for the device tree compiler passed to ``mkimage -D`` when creating the FIT image are specified using the From patchwork Wed Jul 12 22:03:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ulrich_=C3=96lmann?= X-Patchwork-Id: 27293 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6461EC001DE for ; Wed, 12 Jul 2023 22:03:49 +0000 (UTC) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [85.220.165.71]) by mx.groups.io with SMTP id smtpd.web10.2846.1689199419861248432 for ; Wed, 12 Jul 2023 15:03:40 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: pengutronix.de, ip: 85.220.165.71, mailfrom: uol@pengutronix.de) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qJhvt-0008Ob-W6; Thu, 13 Jul 2023 00:03:38 +0200 Received: from [2a0a:edc0:0:1101:1d::39] (helo=dude03.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1qJhvs-00Dya8-8K; Thu, 13 Jul 2023 00:03:36 +0200 Received: from uol by dude03.red.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1qJhvr-006qGK-3i; Thu, 13 Jul 2023 00:03:35 +0200 From: =?utf-8?q?Ulrich_=C3=96lmann?= To: Yocto Project Documentation Cc: yocto@pengutronix.de, =?utf-8?q?Ulrich_=C3=96lmann?= Subject: [PATCH 2/3] ref-manual: classes: kernel-fitimage: fix typos Date: Thu, 13 Jul 2023 00:03:31 +0200 Message-Id: <20230712220332.1630850-2-u.oelmann@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230712220332.1630850-1-u.oelmann@pengutronix.de> References: <20230712220332.1630850-1-u.oelmann@pengutronix.de> MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: uol@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: docs@lists.yoctoproject.org List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 12 Jul 2023 22:03:49 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/docs/message/4044 Signed-off-by: Ulrich Ölmann --- documentation/ref-manual/classes.rst | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/documentation/ref-manual/classes.rst b/documentation/ref-manual/classes.rst index c3fa9a86966e..63bdbea9f98e 100644 --- a/documentation/ref-manual/classes.rst +++ b/documentation/ref-manual/classes.rst @@ -1623,8 +1623,8 @@ Only a single RAM disk can be added to the FIT image created by :ref:`ref-classes-kernel-fitimage` and the RAM disk in FIT is optional. The address where the RAM disk image is to be loaded by U-Boot is specified by :term:`UBOOT_RD_LOADADDRESS` and the entrypoint by -:term:`UBOOT_RD_ENTRYPOINT`. The ramdisk is added to FIT image when -:term:`INITRAMFS_IMAGE` is specified and that :term:`INITRAMFS_IMAGE_BUNDLE` +:term:`UBOOT_RD_ENTRYPOINT`. The ramdisk is added to the FIT image when +:term:`INITRAMFS_IMAGE` is specified and requires that :term:`INITRAMFS_IMAGE_BUNDLE` is set to 0. Only a single :term:`Initramfs` bundle can be added to the FIT image created by @@ -1633,7 +1633,7 @@ In case of :term:`Initramfs`, the kernel is configured to be bundled with the ro in the same binary (example: zImage-initramfs-:term:`MACHINE`.bin). When the kernel is copied to RAM and executed, it unpacks the :term:`Initramfs` root filesystem. The :term:`Initramfs` bundle can be enabled when :term:`INITRAMFS_IMAGE` -is specified and that :term:`INITRAMFS_IMAGE_BUNDLE` is set to 1. +is specified and requires that :term:`INITRAMFS_IMAGE_BUNDLE` is set to 1. The address where the :term:`Initramfs` bundle is to be loaded by U-boot is specified by :term:`UBOOT_LOADADDRESS` and the entrypoint by :term:`UBOOT_ENTRYPOINT`. @@ -1644,14 +1644,14 @@ U-boot commands. When using a boot script the user should configure the U-boot :ref:`ref-tasks-install` task to copy the script to sysroot. So the script can be included in the FIT image by the :ref:`ref-classes-kernel-fitimage` class. At run-time, U-boot CONFIG_BOOTCOMMAND define can be configured to -load the boot script from the FIT image and executes it. +load the boot script from the FIT image and execute it. -The FIT image generated by :ref:`ref-classes-kernel-fitimage` class is signed when the +The FIT image generated by the :ref:`ref-classes-kernel-fitimage` class is signed when the variables :term:`UBOOT_SIGN_ENABLE`, :term:`UBOOT_MKIMAGE_DTCOPTS`, :term:`UBOOT_SIGN_KEYDIR` and :term:`UBOOT_SIGN_KEYNAME` are set appropriately. The default values used for :term:`FIT_HASH_ALG` and :term:`FIT_SIGN_ALG` in :ref:`ref-classes-kernel-fitimage` are "sha256" and -"rsa2048" respectively. The keys for signing fitImage can be generated using +"rsa2048" respectively. The keys for signing the FIT image can be generated using the :ref:`ref-classes-kernel-fitimage` class when both :term:`FIT_GENERATE_KEYS` and :term:`UBOOT_SIGN_ENABLE` are set to "1". From patchwork Wed Jul 12 22:03:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ulrich_=C3=96lmann?= X-Patchwork-Id: 27292 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 60DE9EB64DA for ; Wed, 12 Jul 2023 22:03:49 +0000 (UTC) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [85.220.165.71]) by mx.groups.io with SMTP id smtpd.web10.2847.1689199419962267838 for ; Wed, 12 Jul 2023 15:03:40 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: pengutronix.de, ip: 85.220.165.71, mailfrom: uol@pengutronix.de) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qJhvt-0008Oa-W6; Thu, 13 Jul 2023 00:03:38 +0200 Received: from [2a0a:edc0:0:1101:1d::39] (helo=dude03.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1qJhvs-00Dya5-5A; Thu, 13 Jul 2023 00:03:36 +0200 Received: from uol by dude03.red.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1qJhvr-006qGO-4X; Thu, 13 Jul 2023 00:03:35 +0200 From: =?utf-8?q?Ulrich_=C3=96lmann?= To: Yocto Project Documentation Cc: yocto@pengutronix.de, =?utf-8?q?Ulrich_=C3=96lmann?= Subject: [PATCH 3/3] ref-manual: classes: kernel-fitimage: refine role of INITRAMFS_IMAGE_BUNDLE Date: Thu, 13 Jul 2023 00:03:32 +0200 Message-Id: <20230712220332.1630850-3-u.oelmann@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230712220332.1630850-1-u.oelmann@pengutronix.de> References: <20230712220332.1630850-1-u.oelmann@pengutronix.de> MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: uol@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: docs@lists.yoctoproject.org List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 12 Jul 2023 22:03:49 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/docs/message/4045 Although it might seem a little bit pedantic this patch describes what the class actually checks (see e.g. [1]) and kernel.bbclass per default sets the parameter INITRAMFS_IMAGE_BUNDLE to the empty string (see [2]) which already satisfies that check without the need of additionally explicitly setting it to '0'. [1] https://git.yoctoproject.org/poky/tree/meta/classes-recipe/kernel-fitimage.bbclass?h=4.3_M1&id=cc97d775cb402df0d4122bf54eab1a5198c98471#n667 [2] https://git.yoctoproject.org/poky/tree/meta/classes-recipe/kernel.bbclass?h=4.3_M1&id=cc97d775cb402df0d4122bf54eab1a5198c98471#n37 Signed-off-by: Ulrich Ölmann --- documentation/ref-manual/classes.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/ref-manual/classes.rst b/documentation/ref-manual/classes.rst index 63bdbea9f98e..bbda6ecb83c0 100644 --- a/documentation/ref-manual/classes.rst +++ b/documentation/ref-manual/classes.rst @@ -1625,7 +1625,7 @@ The address where the RAM disk image is to be loaded by U-Boot is specified by :term:`UBOOT_RD_LOADADDRESS` and the entrypoint by :term:`UBOOT_RD_ENTRYPOINT`. The ramdisk is added to the FIT image when :term:`INITRAMFS_IMAGE` is specified and requires that :term:`INITRAMFS_IMAGE_BUNDLE` -is set to 0. +is not set to 1. Only a single :term:`Initramfs` bundle can be added to the FIT image created by :ref:`ref-classes-kernel-fitimage` and the :term:`Initramfs` bundle in FIT is optional.