From: Adrian Freihofer <[email protected]> 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] with a single appendVarFlag call after 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 <[email protected]> --- meta/classes-recipe/kernel-fit-image.bbclass | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/meta/classes-recipe/kernel-fit-image.bbclass b/meta/classes-recipe/kernel-fit-image.bbclass index 7b2bcd4673..a238de1aa2 100644 --- a/meta/classes-recipe/kernel-fit-image.bbclass +++ b/meta/classes-recipe/kernel-fit-image.bbclass @@ -32,17 +32,19 @@ 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 - for v in ['FIT_LOADABLE_ARCH', 'FIT_LOADABLE_COMPRESSION', - 'FIT_LOADABLE_DESCRIPTION', 'FIT_LOADABLE_ENTRYPOINT', - 'FIT_LOADABLE_FILENAME', 'FIT_LOADABLE_LOADADDRESS', - 'FIT_LOADABLE_OS', 'FIT_LOADABLE_TYPE']: + # Forbid direct assignment, set synthetic values for testability and + # add the vars to vardeps so their flags are part of the signature. + loadable_vars = ['FIT_LOADABLE_ARCH', 'FIT_LOADABLE_COMPRESSION', + 'FIT_LOADABLE_DESCRIPTION', 'FIT_LOADABLE_ENTRYPOINT', + 'FIT_LOADABLE_FILENAME', 'FIT_LOADABLE_LOADADDRESS', + 'FIT_LOADABLE_OS', 'FIT_LOADABLE_TYPE'] + for v in loadable_vars: if d.getVar(v): raise bb.parse.SkipRecipe("You cannot use %s as a variable, you can only set flags." % v) synt_value = " ? ".join([ d.getVarFlag(v, loadable) or "" for loadable in loadables.split() ]) d.setVar(v, synt_value) + d.appendVarFlag('do_compile', 'vardeps', ' ' + ' '.join(loadable_vars)) } do_configure[noexec] = "1" -- 2.56.0
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#248612): https://lists.openembedded.org/g/openembedded-core/message/248612 Mute This Topic: https://lists.openembedded.org/mt/121930721/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
