[U-Boot] [PATCH 2/2] riscv: qemu-riscv.h: define CONFIG_PREBOOT (enables extlinux)

Anup Patel Anup.Patel at wdc.com
Wed Apr 10 05:55:29 UTC 2019



> -----Original Message-----
> From: David Abdurachmanov <david.abdurachmanov at gmail.com>
> Sent: Tuesday, April 9, 2019 4:13 PM
> To: rick at andestech.com; Atish Patra <Atish.Patra at wdc.com>; Anup Patel
> <Anup.Patel at wdc.com>; lukas.auer at aisec.fraunhofer.de; u-
> boot at lists.denx.de
> Cc: David Abdurachmanov <david.abdurachmanov at gmail.com>
> Subject: [PATCH 2/2] riscv: qemu-riscv.h: define CONFIG_PREBOOT (enables
> extlinux)
> 
> - Set fdt_addr variable, which is needed for extlinux to find FDT.
>   Otherwise booting kernel using extlinux results in missing FDT.
> 
> - Also run fdt addr with FDT address so that fdt commands would
>   work out of the box in U-Boot prompt.
> 
> This is successfully used by Fedora/RISCV with 5.1-rc3+ kernel using OpenSBI
> -> U-Boot (S-mode) [extlinux] -> Kernel setup.
> 
> Signed-off-by: David Abdurachmanov <david.abdurachmanov at gmail.com>
> ---
>  include/configs/qemu-riscv.h | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/include/configs/qemu-riscv.h b/include/configs/qemu-riscv.h
> index 22a5cd7365..b7110edebc 100644
> --- a/include/configs/qemu-riscv.h
> +++ b/include/configs/qemu-riscv.h
> @@ -48,4 +48,8 @@
>  	"ramdisk_addr_r=0x88300000\0" \
>  	BOOTENV
> 
> +#define CONFIG_PREBOOT \
> +	"setenv fdt_addr ${fdtcontroladdr};" \
> +	"fdt addr ${fdtcontroladdr};"
> +
>  #endif /* __CONFIG_H */
> --
> 2.20.1

Looks good to me.

Reviewed-by: Anup Patel <anup.patel at wdc.com>

Regards,
Anup


More information about the U-Boot mailing list