diff mbox series

kernel-fit-image: add FIT_LOADABLE_* variables to do_compile vardeps

Message ID 20261025101306.3845699-1-adrian.freihofer@siemens.com
State New
Headers show
Series kernel-fit-image: add FIT_LOADABLE_* variables to do_compile vardeps | expand

Commit Message

AdrianF Oct. 25, 2026, 10:13 a.m. UTC
From: Adrian Freihofer <adrian.freihofer@siemens.com>

do_compile only reads the per-loadable flags of the FIT_LOADABLE_*
variables with d.getVarFlag('FIT_LOADABLE_*', loadable), never their
values. As the flag names are not literals, bitbake cannot track these
accesses, so the flags are not part of the do_compile signature.
Changing e.g. FIT_LOADABLE_LOADADDRESS[atf] did not trigger a rebuild
and a stale FIT image was reused.

When FIT_LOADABLES is set, add the FIT_LOADABLE_* variables to
do_compile[vardeps] in the loop that already processes them.
Referencing a variable includes all its flags in the signature.

While at it, fix the duplicated word in the comment.

This is a fixup for commit 2535427d8de0
"kernel-fit-image: support arbitrary loadables"

Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com>
---
 meta/classes-recipe/kernel-fit-image.bbclass | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/meta/classes-recipe/kernel-fit-image.bbclass b/meta/classes-recipe/kernel-fit-image.bbclass
index 7b2bcd4673..d6a41d4979 100644
--- a/meta/classes-recipe/kernel-fit-image.bbclass
+++ b/meta/classes-recipe/kernel-fit-image.bbclass
@@ -32,8 +32,12 @@  python () {
     # Parse loadables config
     loadables = d.getVar('FIT_LOADABLES')
     if loadables:
-        # Check that the loadables configuration variables are not set directly
-        # directly, then assign them a synthetic value for testability purposes
+        # Check that the loadables configuration variables are not set
+        # directly, then assign them a synthetic value for testability purposes.
+        # do_compile only reads the flags of these variables, never their
+        # values, and as the flag names are not literals bitbake cannot track
+        # these accesses. Add the variables to the do_compile vardeps to get
+        # all their flags into the task signature.
         for v in ['FIT_LOADABLE_ARCH', 'FIT_LOADABLE_COMPRESSION',
                   'FIT_LOADABLE_DESCRIPTION', 'FIT_LOADABLE_ENTRYPOINT',
                   'FIT_LOADABLE_FILENAME', 'FIT_LOADABLE_LOADADDRESS',
@@ -43,6 +47,7 @@  python () {
 
             synt_value = " ? ".join([ d.getVarFlag(v, loadable) or "" for loadable in loadables.split() ])
             d.setVar(v, synt_value)
+            d.appendVarFlag('do_compile', 'vardeps', ' ' + v)
 }
 
 do_configure[noexec] = "1"