diff mbox series

kernel-fit-image: make loadables load address optional

Message ID 20261119205834.697816-1-denis@denix.org
State New
Headers show
Series kernel-fit-image: make loadables load address optional | expand

Commit Message

Denys Dmytriyenko Nov. 19, 2026, 8:58 p.m. UTC
From: Denys Dmytriyenko <denys@konsulko.com>

When support for FIT image loadables was added, both the commit
message[1] and the configuration file[2] had this text:

> Sensible defaults will be used for some parameters (type, compression,
> description, arch, os) if the corresponding flag is not set, while
> others (load address and entry point) will be omitted in the final FIT
> image.

Yet, the code actually checks for the load address to be specified.
Let's make it optional, as intended.

[1] https://git.openembedded.org/openembedded-core/commit/?id=2535427d8de07f6e432d08cbdc046bdfd8788911
[2] https://git.openembedded.org/openembedded-core/tree/meta/conf/image-fitimage.conf#n104

Signed-off-by: Denys Dmytriyenko <denys@konsulko.com>
---
 meta/classes-recipe/kernel-fit-image.bbclass | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/meta/classes-recipe/kernel-fit-image.bbclass b/meta/classes-recipe/kernel-fit-image.bbclass
index abf7327c97..0c8dac23ee 100644
--- a/meta/classes-recipe/kernel-fit-image.bbclass
+++ b/meta/classes-recipe/kernel-fit-image.bbclass
@@ -174,14 +174,11 @@  python do_compile() {
         if not loadable_file:
             bb.fatal("File for loadable %s not specified through FIT_LOADABLE_FILENAME[%s]" % (loadable, loadable))
 
-        loadable_loadaddress = d.getVarFlag('FIT_LOADABLE_LOADADDRESS', loadable)
-        if not loadable_loadaddress:
-            bb.fatal("Load address for loadable %s not specified through FIT_LOADABLE_LOADADDRESS[%s]" % (loadable, loadable))
-
         # Optional parameters
         loadable_arch = d.getVarFlag('FIT_LOADABLE_ARCH', loadable)
         loadable_compression = d.getVarFlag('FIT_LOADABLE_COMPRESSION', loadable)
         loadable_description = d.getVarFlag('FIT_LOADABLE_DESCRIPTION', loadable) or ("%s loadable" % loadable)
+        loadable_loadaddress = d.getVarFlag('FIT_LOADABLE_LOADADDRESS', loadable)
         loadable_entrypoint = d.getVarFlag('FIT_LOADABLE_ENTRYPOINT', loadable)
         loadable_os = d.getVarFlag('FIT_LOADABLE_OS', loadable)
         loadable_type = d.getVarFlag('FIT_LOADABLE_TYPE', loadable)