]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
kernel-fit-image: make kernel entry point and load address optional
authorNora Schiffer <nora.schiffer@ew.tq-group.com>
Tue, 21 Jul 2026 14:08:06 +0000 (16:08 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 23 Jul 2026 10:27:21 +0000 (11:27 +0100)
With image type kernel_noload, these are not used, and with [1] and
[2], U-Boot will not require them anymore for this image type. Allow
omitting them from image generation.

[1] https://git.u-boot-project.org/u-boot/u-boot/-/commit/c2abc606653e7eb1e8dbdbaaf1eac392689875ea
[2] https://git.u-boot-project.org/u-boot/u-boot/-/commit/c63051237f2bc79838a27473709948408acdf38b

Signed-off-by: Nora Schiffer <nora.schiffer@ew.tq-group.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oe/fitimage.py

index 79ac88966f4ed65032a120220fb2c26e555f2188..81d18f6c91914717cf8658ddd1869c947ecc8cff 100644 (file)
@@ -276,18 +276,22 @@ class ItsNodeRootKernel(ItsNode):
                 if len(parts) == 3 and parts[2] == entrysymbol:
                     entrypoint = "<0x%s>" % parts[0]
                     break
+        opt_props = {
+            "data": '/incbin/("' + kernel_path + '")',
+            "arch": self._arch,
+            "os": "linux",
+        }
+        if load:
+            opt_props["load"] = f"<{load}>"
+        if entrypoint:
+            opt_props["entry"] = f"<{entrypoint}>"
+
         kernel_node = self.its_add_node_image(
             kernel_id,
             "Linux kernel",
             mkimage_kernel_type,
             compression,
-            {
-                "data": '/incbin/("' + kernel_path + '")',
-                "arch": self._arch,
-                "os": "linux",
-                "load": f"<{load}>",
-                "entry": f"<{entrypoint}>"
-            }
+            opt_props,
         )
         self._kernel = kernel_node