diff mbox series

[1/2] Revert "kernel-fit-image: control kernel section with FIT_LINUX_BIN"

Message ID 20251027205741.2452251-2-adrian.freihofer@siemens.com
State New
Headers show
Series fitimage cleanup | expand

Commit Message

AdrianF Oct. 27, 2025, 8:56 p.m. UTC
From: Adrian Freihofer <adrian.freihofer@siemens.com>

This reverts the commit (Oe-core 0d17c4fb514f0b9f2117a844cdf00ed52631380a)
which recently introduced the FIT_LINUX_BIN variable to control kernel
section inclusion in FIT images.

The original change aimed to provide flexibility by:
- Enabling FIT images without kernel sections for specific use cases
  by setting FIT_LINUX_BIN to an empty value.
- Supporting alternative kernel binary filenames instead of hardcoding
  "linux.bin" in multiple places.

However, the current implementation is incomplete. The filename
customization is not implemented - the code still hardcodes "linux.bin"
and doesn't actually use the variable in a consistent way.
There is also no test coverage for this new functionality.

Rather than completing the partial implementation, Qualcomm decided to
develop a solution that better aligns with their specific requirements
and may be independent of the kernel-fit-image class.

The revert restores the previous consistent behavior with unconditional
kernel section inclusion. This saves us from adding test coverage,
documentation and maintenance for this new but currently known to be
unused and incomplete feature. This feature can be reintroduced later
if there is a clear need and a complete implementation.

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

Patch

diff --git a/meta/classes-recipe/kernel-fit-image.bbclass b/meta/classes-recipe/kernel-fit-image.bbclass
index 16b6ab7b2fd..fd0d21ceeee 100644
--- a/meta/classes-recipe/kernel-fit-image.bbclass
+++ b/meta/classes-recipe/kernel-fit-image.bbclass
@@ -63,14 +63,12 @@  python do_compile() {
     )
 
     # Prepare a kernel image section.
-    linux_bin = d.getVar('FIT_LINUX_BIN')
-    if linux_bin:
-        shutil.copyfile(os.path.join(kernel_deploydir, "linux.bin"), "linux.bin")
-        with open(os.path.join(kernel_deploydir, "linux_comp")) as linux_comp_f:
-            linux_comp = linux_comp_f.read()
-        root_node.fitimage_emit_section_kernel("kernel-1", "linux.bin", linux_comp,
-            d.getVar('UBOOT_LOADADDRESS'), d.getVar('UBOOT_ENTRYPOINT'),
-            d.getVar('UBOOT_MKIMAGE_KERNEL_TYPE'), d.getVar("UBOOT_ENTRYSYMBOL"))
+    shutil.copyfile(os.path.join(kernel_deploydir, "linux.bin"), "linux.bin")
+    with open(os.path.join(kernel_deploydir, "linux_comp")) as linux_comp_f:
+        linux_comp = linux_comp_f.read()
+    root_node.fitimage_emit_section_kernel("kernel-1", "linux.bin", linux_comp,
+        d.getVar('UBOOT_LOADADDRESS'), d.getVar('UBOOT_ENTRYPOINT'),
+        d.getVar('UBOOT_MKIMAGE_KERNEL_TYPE'), d.getVar("UBOOT_ENTRYSYMBOL"))
 
     # Prepare a DTB image section
     kernel_devicetree = d.getVar('KERNEL_DEVICETREE')