Skip to contentSkip to conversation

kernel-fit-image: make loadables load address optional

PATCH New Denys Dmytriyenko 1 participant 1 message Nov 19

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kernel-fit-image: make loadables load address optional

From: Denys Dmytriyenko <[email protected]>

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

Quoted 4 lines

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

---
 meta/classes-recipe/kernel-fit-image.bbclass | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
meta/classes-recipe/kernel-fit-image.bbclass +1 -4
index abf7327c97..0c8dac23ee 100644
@@ -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)
Signature · 1 line
2.25.1