]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commit
oe-selftest: fitimage add more u-boot tests
authorAdrian Freihofer <adrian.freihofer@gmail.com>
Mon, 17 Mar 2025 17:13:56 +0000 (18:13 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 18 Mar 2025 10:26:10 +0000 (10:26 +0000)
commitdda1fcbc85c26d1851dda6ed235238b15939998e
treee6d49da4a5108cf913049874b0cd93f3194a4215
parent22a554e1d5a2449c4c1b34f4d5cfe1572a72a142
oe-selftest: fitimage add more u-boot tests

Add a new test function which checks that the device-tree of U-Boot
contains the public keys which are required for checking the signature
of the kernel FIT image at run-time.

Use this new _check_kernel_dtb function in the existing
test_sign_cascaded_uboot_fit_image test case which already creates a
build configuration with UBOOT_SIGN_ENABLE = "1" and keys for the kernel.
But so far there was no check that the keys for the kernel verification
got added to U-Boot's DTB.
This test case checks the configuration where only the configuration
nodes of the kernel FIT image are signed.

A new test case test_sign_uboot_kernel_individual checks the
configuration with two keys and signed image and signed configuration
nodes.
This test case covers the use case which recently broke with commit:
  OE-Core rev: 259bfa86f384206f0d0a96a5b84887186c5f689e
               u-boot: kernel-fitimage: Fix dependency loop if
               UBOOT_SIGN_ENABLE and UBOOT_ENV enabled
and got fixed with commit
  OE-Core rev: 0106e5efab99c8016836a2ab71e2327ce58a9a9d
               u-boot: kernel-fitimage: Restore FIT_SIGN_INDIVIDUAL="1"
               behavior

This patch also fixes a few more details:
- Simplify the code by moving all the U-Boot related variables to the
  _fit_get_bb_vars function.
- Do not set FIT_GENERATE_KEYS = "1" without inheriting the
  kernel-fitimage.bbclass which handles this variable.

Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/selftest/cases/fitimage.py