diff mbox series

[1/2] boot/uboot: Introduce BR2_TARGET_UBOOT_NEEDS_OPENSBI

Message ID 1610355672-3008-2-git-send-email-bmeng.cn@gmail.com
State Accepted
Headers show
Series board/sifive: Update defconfig and genimage config files | expand

Commit Message

Bin Meng Jan. 11, 2021, 9:01 a.m. UTC
From: Bin Meng <bin.meng@windriver.com>

Some RISC-V platforms (such as SiFive HiFive Unleashed) encapsulate
the OpenSBI firmware image inside U-Boot.

Signed-off-by: Bin Meng <bin.meng@windriver.com>
---

 boot/uboot/Config.in | 10 ++++++++++
 boot/uboot/uboot.mk  |  5 +++++
 2 files changed, 15 insertions(+)

Comments

Alistair Francis Jan. 11, 2021, 7:06 p.m. UTC | #1
On Mon, Jan 11, 2021 at 1:01 AM Bin Meng <bmeng.cn@gmail.com> wrote:
>
> From: Bin Meng <bin.meng@windriver.com>
>
> Some RISC-V platforms (such as SiFive HiFive Unleashed) encapsulate
> the OpenSBI firmware image inside U-Boot.
>
> Signed-off-by: Bin Meng <bin.meng@windriver.com>

Reviewed-by: Alistair Francis <alistair.francis@wdc.com>

Alistair

> ---
>
>  boot/uboot/Config.in | 10 ++++++++++
>  boot/uboot/uboot.mk  |  5 +++++
>  2 files changed, 15 insertions(+)
>
> diff --git a/boot/uboot/Config.in b/boot/uboot/Config.in
> index e4a0f48..b18216a 100644
> --- a/boot/uboot/Config.in
> +++ b/boot/uboot/Config.in
> @@ -229,6 +229,16 @@ config BR2_TARGET_UBOOT_NEEDS_ATF_BL31_ELF
>
>  endchoice
>
> +config BR2_TARGET_UBOOT_NEEDS_OPENSBI
> +       bool "U-Boot needs OpenSBI"
> +       depends on BR2_TARGET_OPENSBI
> +       help
> +         Some RISC-V platforms (such as SiFive HiFive Unleashed)
> +         encapsulate the OpenSBI firmware image inside U-Boot.
> +         This option makes sure OpenSBI gets built prior to U-Boot,
> +         and that the OpenSBI variable pointing to OpenSBI binary,
> +         is passed during the Buildroot build.
> +
>  menu "U-Boot binary format"
>
>  config BR2_TARGET_UBOOT_FORMAT_AIS
> diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk
> index a29d71f..d92000f 100644
> --- a/boot/uboot/uboot.mk
> +++ b/boot/uboot/uboot.mk
> @@ -163,6 +163,11 @@ UBOOT_MAKE_OPTS += BL31=$(BINARIES_DIR)/bl31.bin
>  endif
>  endif
>
> +ifeq ($(BR2_TARGET_UBOOT_NEEDS_OPENSBI),y)
> +UBOOT_DEPENDENCIES += opensbi
> +UBOOT_MAKE_OPTS += OPENSBI=$(BINARIES_DIR)/fw_dynamic.bin
> +endif
> +
>  ifeq ($(BR2_TARGET_UBOOT_NEEDS_DTC),y)
>  UBOOT_DEPENDENCIES += host-dtc
>  endif
> --
> 2.7.4
>
> _______________________________________________
> buildroot mailing list
> buildroot@busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
Bin Meng Jan. 16, 2021, 2:23 p.m. UTC | #2
+Peter, Thomas,

On Tue, Jan 12, 2021 at 3:06 AM Alistair Francis <alistair23@gmail.com> wrote:
>
> On Mon, Jan 11, 2021 at 1:01 AM Bin Meng <bmeng.cn@gmail.com> wrote:
> >
> > From: Bin Meng <bin.meng@windriver.com>
> >
> > Some RISC-V platforms (such as SiFive HiFive Unleashed) encapsulate
> > the OpenSBI firmware image inside U-Boot.
> >
> > Signed-off-by: Bin Meng <bin.meng@windriver.com>
>
> Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
>

Ping for apply? Thanks!
Thomas Petazzoni Jan. 16, 2021, 9:41 p.m. UTC | #3
On Mon, 11 Jan 2021 17:01:11 +0800
Bin Meng <bmeng.cn@gmail.com> wrote:

> From: Bin Meng <bin.meng@windriver.com>
> 
> Some RISC-V platforms (such as SiFive HiFive Unleashed) encapsulate
> the OpenSBI firmware image inside U-Boot.
> 
> Signed-off-by: Bin Meng <bin.meng@windriver.com>
> ---

Applied to master, thanks.

Thomas
diff mbox series

Patch

diff --git a/boot/uboot/Config.in b/boot/uboot/Config.in
index e4a0f48..b18216a 100644
--- a/boot/uboot/Config.in
+++ b/boot/uboot/Config.in
@@ -229,6 +229,16 @@  config BR2_TARGET_UBOOT_NEEDS_ATF_BL31_ELF
 
 endchoice
 
+config BR2_TARGET_UBOOT_NEEDS_OPENSBI
+	bool "U-Boot needs OpenSBI"
+	depends on BR2_TARGET_OPENSBI
+	help
+	  Some RISC-V platforms (such as SiFive HiFive Unleashed)
+	  encapsulate the OpenSBI firmware image inside U-Boot.
+	  This option makes sure OpenSBI gets built prior to U-Boot,
+	  and that the OpenSBI variable pointing to OpenSBI binary,
+	  is passed during the Buildroot build.
+
 menu "U-Boot binary format"
 
 config BR2_TARGET_UBOOT_FORMAT_AIS
diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk
index a29d71f..d92000f 100644
--- a/boot/uboot/uboot.mk
+++ b/boot/uboot/uboot.mk
@@ -163,6 +163,11 @@  UBOOT_MAKE_OPTS += BL31=$(BINARIES_DIR)/bl31.bin
 endif
 endif
 
+ifeq ($(BR2_TARGET_UBOOT_NEEDS_OPENSBI),y)
+UBOOT_DEPENDENCIES += opensbi
+UBOOT_MAKE_OPTS += OPENSBI=$(BINARIES_DIR)/fw_dynamic.bin
+endif
+
 ifeq ($(BR2_TARGET_UBOOT_NEEDS_DTC),y)
 UBOOT_DEPENDENCIES += host-dtc
 endif