X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=cmd%2Fbooti.c;h=de5058236e0a03dbad1e0706b124499d75edfb93;hb=1ebf50d9bb3ae844cc05b7e720e7a34ab53557c8;hp=04353b68eccc0d73d62c44128016da883fd9a5c5;hpb=de76610545f4350f8e3eac7c0c4ff6349106a9bf;p=oweals%2Fu-boot.git diff --git a/cmd/booti.c b/cmd/booti.c index 04353b68ec..de5058236e 100644 --- a/cmd/booti.c +++ b/cmd/booti.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include @@ -29,9 +30,9 @@ static int booti_start(cmd_tbl_t *cmdtp, int flag, int argc, /* Setup Linux kernel Image entry point */ if (!argc) { - ld = load_addr; + ld = image_load_addr; debug("* kernel: default image load address = 0x%08lx\n", - load_addr); + image_load_addr); } else { ld = simple_strtoul(argv[0], NULL, 16); debug("* kernel: cmdline image address = 0x%08lx\n", ld); @@ -48,6 +49,9 @@ static int booti_start(cmd_tbl_t *cmdtp, int flag, int argc, } images->ep = relocated_addr; + images->os.start = relocated_addr; + images->os.end = relocated_addr + image_size; + lmb_reserve(&images->lmb, images->ep, le32_to_cpu(image_size)); /* @@ -77,7 +81,11 @@ int do_booti(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) bootm_disable_interrupts(); images.os.os = IH_OS_LINUX; +#ifdef CONFIG_RISCV_SMODE + images.os.arch = IH_ARCH_RISCV; +#elif CONFIG_ARM64 images.os.arch = IH_ARCH_ARM64; +#endif ret = do_bootm_states(cmdtp, flag, argc, argv, #ifdef CONFIG_SYS_BOOT_RAMDISK_HIGH BOOTM_STATE_RAMDISK | @@ -92,7 +100,7 @@ int do_booti(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) #ifdef CONFIG_SYS_LONGHELP static char booti_help_text[] = "[addr [initrd[:size]] [fdt]]\n" - " - boot arm64 Linux Image stored in memory\n" + " - boot Linux 'Image' stored at 'addr'\n" "\tThe argument 'initrd' is optional and specifies the address\n" "\tof an initrd in memory. The optional parameter ':size' allows\n" "\tspecifying the size of a RAW initrd.\n" @@ -107,5 +115,5 @@ static char booti_help_text[] = U_BOOT_CMD( booti, CONFIG_SYS_MAXARGS, 1, do_booti, - "boot arm64 Linux Image image from memory", booti_help_text + "boot Linux kernel 'Image' format from memory", booti_help_text );