From: Adrian Freihofer Date: Mon, 27 Oct 2025 20:56:48 +0000 (+0100) Subject: Revert "kernel-fit-image: control kernel section with FIT_LINUX_BIN" X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6eae261b6f52ebfad4d6644cbdad4afe22423ec6;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git Revert "kernel-fit-image: control kernel section with FIT_LINUX_BIN" 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 Signed-off-by: Mathieu Dubois-Briand Signed-off-by: Richard Purdie --- diff --git a/meta/classes-recipe/kernel-fit-image.bbclass b/meta/classes-recipe/kernel-fit-image.bbclass index 16b6ab7b2f..fd0d21ceee 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')