diff mbox series

kernel-fit-image: make "os" field of loadables optional

Message ID 20261120001448.714390-1-denis@denix.org
State New
Headers show
Series kernel-fit-image: make "os" field of loadables optional | expand

Commit Message

Denys Dmytriyenko Nov. 20, 2026, 12:14 a.m. UTC
From: Denys Dmytriyenko <denys@konsulko.com>

It is not required to specify the "os" field for the loadables
section, which current implementation incorrectly defaults to
"linux". Make it truly optional and if not specified, simply
omit it from the section.

Signed-off-by: Denys Dmytriyenko <denys@konsulko.com>
---
 meta/conf/image-fitimage.conf | 2 +-
 meta/lib/oe/fitimage.py       | 4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/meta/conf/image-fitimage.conf b/meta/conf/image-fitimage.conf
index a06d30e494..44b7554cfa 100644
--- a/meta/conf/image-fitimage.conf
+++ b/meta/conf/image-fitimage.conf
@@ -99,6 +99,6 @@  FIT_UBOOT_ENV ?= ""
 #   FIT_LOADABLE_LOADADDRESS[atf] = "0x204E0000"
 #   FIT_LOADABLE_ENTRYPOINT[atf] = "0x204E0000"
 # Sensible defalts will be used for some parameters (compression, description,
-# arch, os) if the corresponding flag is not set, while others (load address
+# arch) if the corresponding flag is not set, while others (os, load address
 # and entry point) will be omitted in the final FIT.
 FIT_LOADABLES ?= ""
diff --git a/meta/lib/oe/fitimage.py b/meta/lib/oe/fitimage.py
index c97b334413..dec1da79ff 100644
--- a/meta/lib/oe/fitimage.py
+++ b/meta/lib/oe/fitimage.py
@@ -407,9 +407,11 @@  class ItsNodeRootKernel(ItsNode):
         opt_props = {
             "data": '/incbin/("' + filepath + '")',
             "arch": arch if arch is not None else self._arch,
-            "os": fit_os if fit_os is not None else self._os,
         }
 
+
+        if fit_os:
+            opt_props["os"] = fit_os
         if load:
             opt_props["load"] = f"<{load}>"
         if entry: