diff options
| author | Kavinaya S <kavinaya@qti.qualcomm.com> | 2025-09-05 16:31:51 +0530 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-09-08 18:02:40 +0100 |
| commit | 0d17c4fb514f0b9f2117a844cdf00ed52631380a (patch) | |
| tree | 18f0b08bd33003aca4c1112183b03d131570f52e | |
| parent | 35d92cf31475a9e01695414e8171e4344d3dca0a (diff) | |
| download | poky-0d17c4fb514f0b9f2117a844cdf00ed52631380a.tar.gz | |
kernel-fit-image: control kernel section with FIT_LINUX_BIN
Update kernel-fit-image.bbclass to conditionally include the kernel
section based on FIT_LINUX_BIN variable.
Suggested-by: Adrian Freihofer <adrian.freihofer@siemens.com>
(From OE-Core rev: 9c8ef2119949900bee222ddc0fdfb23424a032d0)
Signed-off-by: Kavinaya S <kavinaya@qti.qualcomm.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta/classes-recipe/kernel-fit-image.bbclass | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/meta/classes-recipe/kernel-fit-image.bbclass b/meta/classes-recipe/kernel-fit-image.bbclass index fd4c6a30fe..f04aee1807 100644 --- a/meta/classes-recipe/kernel-fit-image.bbclass +++ b/meta/classes-recipe/kernel-fit-image.bbclass | |||
| @@ -59,12 +59,14 @@ python do_compile() { | |||
| 59 | ) | 59 | ) |
| 60 | 60 | ||
| 61 | # Prepare a kernel image section. | 61 | # Prepare a kernel image section. |
| 62 | shutil.copyfile(os.path.join(kernel_deploydir, "linux.bin"), "linux.bin") | 62 | linux_bin = d.getVar('FIT_LINUX_BIN') |
| 63 | with open(os.path.join(kernel_deploydir, "linux_comp")) as linux_comp_f: | 63 | if linux_bin: |
| 64 | linux_comp = linux_comp_f.read() | 64 | shutil.copyfile(os.path.join(kernel_deploydir, "linux.bin"), "linux.bin") |
| 65 | root_node.fitimage_emit_section_kernel("kernel-1", "linux.bin", linux_comp, | 65 | with open(os.path.join(kernel_deploydir, "linux_comp")) as linux_comp_f: |
| 66 | d.getVar('UBOOT_LOADADDRESS'), d.getVar('UBOOT_ENTRYPOINT'), | 66 | linux_comp = linux_comp_f.read() |
| 67 | d.getVar('UBOOT_MKIMAGE_KERNEL_TYPE'), d.getVar("UBOOT_ENTRYSYMBOL")) | 67 | root_node.fitimage_emit_section_kernel("kernel-1", "linux.bin", linux_comp, |
| 68 | d.getVar('UBOOT_LOADADDRESS'), d.getVar('UBOOT_ENTRYPOINT'), | ||
| 69 | d.getVar('UBOOT_MKIMAGE_KERNEL_TYPE'), d.getVar("UBOOT_ENTRYSYMBOL")) | ||
| 68 | 70 | ||
| 69 | # Prepare a DTB image section | 71 | # Prepare a DTB image section |
| 70 | kernel_devicetree = d.getVar('KERNEL_DEVICETREE') | 72 | kernel_devicetree = d.getVar('KERNEL_DEVICETREE') |
