]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
Revert "kernel-fit-image: control kernel section with FIT_LINUX_BIN"
authorAdrian Freihofer <adrian.freihofer@siemens.com>
Mon, 27 Oct 2025 20:56:48 +0000 (21:56 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 30 Oct 2025 11:06:22 +0000 (11:06 +0000)
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>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes-recipe/kernel-fit-image.bbclass

index 16b6ab7b2fd24f97b5f7e5ed52c5fb56174d8e9d..fd0d21ceeeef67677db8c15999983a2f9c137e7d 100644 (file)
@@ -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')