diff options
author | Rick Chen <rick@andestech.com> | 2018-03-13 14:48:33 +0800 |
---|---|---|
committer | Andes <uboot@andestech.com> | 2018-03-30 13:13:29 +0800 |
commit | 0462358b623ea965dca9a811eea2454c95a64c8e (patch) | |
tree | 95cc26045dd4a5a9ab9cebf1ea26a9531d4cf7c9 /arch/riscv/lib/bootm.c | |
parent | 22e8c0f02b4f1b79ebc752c662498fb6fbe30935 (diff) | |
download | u-boot-0462358b623ea965dca9a811eea2454c95a64c8e.zip u-boot-0462358b623ea965dca9a811eea2454c95a64c8e.tar.gz u-boot-0462358b623ea965dca9a811eea2454c95a64c8e.tar.bz2 |
riscv: bootm: Support to boot riscv-linux
riscv-linux should use BBL (Berkeley bootloader) for
loading the Linux kernel.
U-Boot can play as FSBL(first stage bootloader)
to boot BBL and riscv-linux.
In BBL's init_first_hart(), it will pass dtb with a1.
So implement bootm to pass arguments to BBL correctly.
Signed-off-by: Rick Chen <rick@andestech.com>
Signed-off-by: Rick Chen <rickchen36@gmail.com>
Diffstat (limited to 'arch/riscv/lib/bootm.c')
-rw-r--r-- | arch/riscv/lib/bootm.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/riscv/lib/bootm.c b/arch/riscv/lib/bootm.c index 3744073..545d629 100644 --- a/arch/riscv/lib/bootm.c +++ b/arch/riscv/lib/bootm.c @@ -46,7 +46,7 @@ int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images) bd_t *bd = gd->bd; char *s; int machid = bd->bi_arch_number; - void (*theKernel)(int zero, int arch, uint params); + void (*theKernel)(int arch, uint params); #ifdef CONFIG_CMDLINE_TAG char *commandline = env_get("bootargs"); @@ -61,7 +61,7 @@ int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images) if ((flag != 0) && (flag != BOOTM_STATE_OS_GO)) return 1; - theKernel = (void (*)(int, int, uint))images->ep; + theKernel = (void (*)(int, uint))images->ep; s = env_get("machid"); if (s) { @@ -120,9 +120,9 @@ int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images) } cleanup_before_linux(); if (IMAGE_ENABLE_OF_LIBFDT && images->ft_len) - theKernel(0, machid, (unsigned long)images->ft_addr); + theKernel(machid, (unsigned long)images->ft_addr); else - theKernel(0, machid, bd->bi_boot_params); + theKernel(machid, bd->bi_boot_params); /* does not return */ return 1; |