From patchwork Thu Dec 3 14:30:11 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AdrianF X-Patchwork-Id: 107212 Received: from mta-64-228.siemens.flowmailer.net (mta-64-228.siemens.flowmailer.net [185.136.64.228]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.15050.1796308258637365089 for ; Thu, 03 Dec 2026 06:30:59 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=adrian.freihofer@siemens.com header.s=fm1 header.b=SNbpUNp9; spf=pass (domain: rts-flowmailer.siemens.com, ip: 185.136.64.228, mailfrom: fm-1329275-2026120314305661f19f489e000207af-nv79ij@rts-flowmailer.siemens.com) Received: by mta-64-228.siemens.flowmailer.net with ESMTPSA id 2026120314305661f19f489e000207af for ; Thu, 03 Dec 2026 15:30:56 +0100 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=fm1; d=siemens.com; i=adrian.freihofer@siemens.com; h=from:from:sender:to:to:cc:cc:subject:subject:content-type:content-transfer-encoding:content-transfer-encoding:References:In-Reply-To:Date:Message-ID:MIME-Version; bh=6HIL0j5k9wtEitGiPAwT2p00KFPKamvm/1Yome4Ye4A=; b=SNbpUNp92KNwW3V7aU0yAznuWFU2ZRD62vw7d77I4hzasFonvnU9UVj2oDqX1YzHCYrYRI yRJaPo5Z+Dopab/5LdW37/OMYYCvmIQXJYIT3yfpcxuVr0Dc906+UdRIPze+fyU9faOSIAuk rpFdwf9GykCGdCvqCbjXVNwRlLsuyCF7FS0dT2Dv54Io1l/1VwZ8KBe14/nETXj4u2w3PUWp Gh89SrUDJfkdS5iHzY70wo4WETV8lZdAKyp4AkcV99OfIi4SSgsyYX++yyQv8iIq8VjceYVc kH98Vjb30M5xZtvk456Lpp2pXGzwl/vzH2fknzgd26HdRIvl+YN+fytw==; From: AdrianF To: openembedded-core@lists.openembedded.org Cc: marex@nabladev.com, Adrian Freihofer Subject: [PATCH 8/8] oe-selftest: fitimage: add test_sign_uboot_kernel_crt_only Date: Thu, 3 Dec 2026 15:30:11 +0100 Message-ID: <20261203143044.592073-9-adrian.freihofer@siemens.com> In-Reply-To: <20261203143044.592073-1-adrian.freihofer@siemens.com> References: <20261203143044.592073-1-adrian.freihofer@siemens.com> MIME-Version: 1.0 X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-1329275:519-21489:flowmailer List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by lin-tor-korg-lkml-alma10-1 with HTTPS for ; Thu, 03 Dec 2026 14:31:05 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/251899 From: Adrian Freihofer Check that uboot-sign adds the kernel FIT public keys to the U-Boot DTB when only the certificates are available, as with keys in an HSM. Signed-off-by: Adrian Freihofer --- meta/lib/oeqa/selftest/cases/fitimage.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/meta/lib/oeqa/selftest/cases/fitimage.py b/meta/lib/oeqa/selftest/cases/fitimage.py index 0180a3c962..ee7f52e1ca 100644 --- a/meta/lib/oeqa/selftest/cases/fitimage.py +++ b/meta/lib/oeqa/selftest/cases/fitimage.py @@ -2646,6 +2646,29 @@ FIT_SIGN_INDIVIDUAL = "1" # Just check the DTB of u-boot since there is no u-boot FIT image self._check_kernel_dtb(bb_vars) + def test_sign_uboot_kernel_crt_only(self): + """ + Summary: Check if the public keys for verifying the kernel FIT + image are added to the U-Boot DTB if only the + certificates are available, e.g. because the private + keys are in an HSM. + Expected: The U-Boot build succeeds without the .key file and + the U-Boot DTB has the signature node. + """ + machine = self._get_machine_or_skip() + config = """ +UBOOT_SIGN_ENABLE = "1" +UBOOT_SIGN_KEYDIR = "${TOPDIR}/signing-keys-crt-only" +""" + config = FitImageTestCase._config_add_machine_settings(config, machine, keys=["UBOOT_MACHINE", "UBOOT_DTB_BINARY", "UBOOT_ARCH"]) + self.write_config(config) + bb_vars = self._fit_get_bb_vars() + self._gen_signing_key(bb_vars) + os.remove(os.path.join(bb_vars['UBOOT_SIGN_KEYDIR'], bb_vars['UBOOT_SIGN_KEYNAME'] + '.key')) + + self._bitbake_fit_image(bb_vars) + self._check_kernel_dtb(bb_vars) + def test_sign_uboot_fit_image_without_spl(self): """