Revert "booti/bootm: riscv: Verify image arch type"
authorMayuresh Chitale <mchitale@ventanamicro.com>
Thu, 29 May 2025 03:30:49 +0000 (03:30 +0000)
committerLeo Yu-Chi Liang <ycliang@andestech.com>
Mon, 2 Jun 2025 08:17:21 +0000 (16:17 +0800)
This reverts commit 37b0b22d8b7bbed6aa95b6daed06dcbf4a66f211 as
discussed in [1].

[1] https://lists.denx.de/pipermail/u-boot/2025-May/590841.html

Signed-off-by: Mayuresh Chitale <mchitale@ventanamicro.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
arch/riscv/lib/bootm.c
cmd/booti.c

index c98c5e7..9544907 100644 (file)
@@ -90,10 +90,6 @@ static void boot_jump_linux(struct bootm_headers *images, int flag)
        announce_and_cleanup(fake);
 
        if (!fake) {
-               if (images->os.arch != IH_ARCH_DEFAULT) {
-                       printf("Image arch not compatible with host arch.\n");
-                       hang();
-               }
                if (CONFIG_IS_ENABLED(OF_LIBFDT) && images->ft_len) {
 #ifdef CONFIG_SMP
                        ret = smp_call_function(images->ep,
index ced2c10..1a57fe9 100644 (file)
@@ -130,11 +130,8 @@ int do_booti(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
        bootm_disable_interrupts();
 
        images.os.os = IH_OS_LINUX;
-       if (IS_ENABLED(CONFIG_RISCV))
-               if (IS_ENABLED(CONFIG_64BIT))
-                       images.os.arch = IH_ARCH_RISCV64;
-               else
-                       images.os.arch = IH_ARCH_RISCV;
+       if (IS_ENABLED(CONFIG_RISCV_SMODE))
+               images.os.arch = IH_ARCH_RISCV;
        else if (IS_ENABLED(CONFIG_ARM64))
                images.os.arch = IH_ARCH_ARM64;