kernel-fit-image: skip kernel section if linux.bin is missing
Avoids errors during image generation by checking for the
presence of linux.bin before attempting to copy and emit the
kernel section. This ensures that the build process continues
gracefully when the kernel binary is not available.
A clean separation between firmware (including DTBs) and the
HLOS (Linux Kernel) is highly recommended and often necessary
to enable independent firmware updates, enforce trust boundaries,
and support running the same kernel across different hardware
platforms by simply swapping DTBs. One effective way to achieve
this separation is by using a Unified Kernel Image (UKI) that
contains only the Linux kernel and initramfs, while keeping the
DTBs in a separate FIT image, such as dtb.bin.
To support this setup, it's important to ensure that a FIT image
can be generated without requiring the Linux kernel binary,
allowing the build process to continue gracefully even when the
kernel is unavailable.
Additionally, this approach is very useful when the kernel-fit-
extra-artifacts class is not set, as it enables the creation of
an .its file without depending on the kernel.
Signed-off-by: Kavinaya S <kavinaya@qti.qualcomm.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>