]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
bootm: don't call booti_setup for EFI images
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Tue, 13 Jun 2023 06:18:27 +0000 (08:18 +0200)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Fri, 16 Jun 2023 04:45:20 +0000 (06:45 +0200)
On the arm64 architecture booti_setup() is called for EFI FIT images.
This function call fails because EFI images typically do not have a
kernel signature.

Check that the operating system property "os" of the image is "linux"
before invoking booti_setup().

Fixes: 487b5fa6deb1 ("bootm: Handle kernel_noload on arm64")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
boot/bootm.c

index 4144ff3b03189929927a7bf90ad4da0e2292dde8..75f0b4a9af8a04bf6c2268cc4f6bf32b75478cbd 100644 (file)
@@ -240,7 +240,8 @@ static int bootm_find_os(struct cmd_tbl *cmdtp, int flag, int argc,
 
        if (images.os.type == IH_TYPE_KERNEL_NOLOAD) {
                if (IS_ENABLED(CONFIG_CMD_BOOTI) &&
-                   images.os.arch == IH_ARCH_ARM64) {
+                   images.os.arch == IH_ARCH_ARM64 &&
+                   images.os.os == IH_OS_LINUX) {
                        ulong image_addr;
                        ulong image_size;