boot/opensbi: Upgrade from v0.3 to v0.4
PATCH v2 1/2 boot/opensbi: Upgrade from v0.3 to v0.4
---
v2:
- Install both bin and elf for fw_dynamic.*
boot/opensbi/opensbi.hash | 2 +- boot/opensbi/opensbi.mk | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-)
boot/opensbi/opensbi.hash +1 -1
@@ -1,2 +1,2 @@ # locally computed -sha256 07f18b73abf3b85aabe5bead19a923716c100d30eb58033459f39c3a224be300 opensbi-0.3.tar.gz +sha256 d3060bf51af00204ce90fc73106955c694463b59a5b81be64cf780cd32743abf opensbi-0.4.tar.gz
boot/opensbi/opensbi.mk +3 -1
@@ -4,7 +4,7 @@ # ################################################################################ -OPENSBI_VERSION = 0.3 +OPENSBI_VERSION = 0.4 OPENSBI_SITE = $(call github,riscv,opensbi,v$(OPENSBI_VERSION)) OPENSBI_LICENSE = BSD-2-Clause OPENSBI_LICENSE_FILES = COPYING.BSD
@@ -28,6 +28,8 @@ OPENSBI_INSTALL_IMAGES = YES define OPENSBI_INSTALL_IMAGES_CMDS $(INSTALL) -m 0644 -D $(@D)/build/platform/$(OPENSBI_PLAT)/firmware/fw_jump.bin $(BINARIES_DIR)/fw_jump.bin $(INSTALL) -m 0644 -D $(@D)/build/platform/$(OPENSBI_PLAT)/firmware/fw_jump.elf $(BINARIES_DIR)/fw_jump.elf + $(INSTALL) -m 0644 -D $(@D)/build/platform/$(OPENSBI_PLAT)/firmware/fw_dynamic.bin $(BINARIES_DIR)/fw_dynamic.bin + $(INSTALL) -m 0644 -D $(@D)/build/platform/$(OPENSBI_PLAT)/firmware/fw_dynamic.elf $(BINARIES_DIR)/fw_dynamic.elf endef endif
Signature · 1 line
2.22.0
PATCH v2 2/2 boot/opensbi: Implement a choice for the OpenSBI Platform
Instead of requiring users to look at the OpenSBI source code and determine the platform string let's use a choice option to allow them to specify the platform they would like to target. We still allow them to specify a custom string if they want to.
--- boot/opensbi/Config.in | 25 ++++++++++++++++++++++--- boot/opensbi/opensbi.mk | 11 ++++++++++- configs/qemu_riscv32_virt_defconfig | 2 +- configs/qemu_riscv64_virt_defconfig | 2 +- 4 files changed, 34 insertions(+), 6 deletions(-)
boot/opensbi/Config.in +22 -3
@@ -13,13 +13,32 @@ config BR2_TARGET_OPENSBI https://github.com/riscv/opensbi.git if BR2_TARGET_OPENSBI -config BR2_TARGET_OPENSBI_PLAT - string "OpenSBI Platform" - default "" + +choice + prompt "OpenSBI Platform" help Specifies the OpenSBI platform to build. If no platform is specified only the OpenSBI platform independent static library libsbi.a is built. If a platform is specified then the platform specific static library libplatsbi.a and firmware examples are built. + +config BR2_TARGET_OPENSBI_LIBRARY_ONLY + bool "Library Only" + +config BR2_TARGET_OPENSBI_QEMU_VIRT + bool "QEMU Virt" + +config BR2_TARGET_OPENSBI_QEMU_SIFIVE_U + bool "QEMU SiFive U" + +config BR2_TARGET_OPENSBI_CUSTOM_PLATFORM + bool "Custom Platform" + +endchoice + +config BR2_TARGET_OPENSBI_CUSTOM_PLATFORM_VALUE + string "OpenSBI Platform String" + depends on BR2_TARGET_OPENSBI_CUSTOM_PLATFORM + endif
boot/opensbi/opensbi.mk +10 -1
@@ -14,7 +14,16 @@ OPENSBI_INSTALL_STAGING = YES OPENSBI_MAKE_ENV = \ CROSS_COMPILE=$(TARGET_CROSS) -OPENSBI_PLAT = $(call qstrip,$(BR2_TARGET_OPENSBI_PLAT)) +ifeq ($(BR2_TARGET_OPENSBI_QEMU_VIRT),y) +OPENSBI_PLAT = qemu/virt +else ifeq ($(BR2_TARGET_OPENSBI_QEMU_SIFIVE_U),y) +OPENSBI_PLAT = qemu/sifive_u +else ifeq ($(BR2_TARGET_OPENSBI_SIFIVE_FU540),y) +OPENSBI_PLAT = sifive/fu540 +else ifeq ($(BR2_TARGET_OPENSBI_CUSTOM_PLATFORM),y) +OPENSBI_PLAT = $(call qstrip,$(BR2_TARGET_OPENSBI_CUSTOM_PLATFORM_VALUE)) +endif + ifneq ($(OPENSBI_PLAT),) OPENSBI_MAKE_ENV += PLATFORM=$(OPENSBI_PLAT) endif
configs/qemu_riscv32_virt_defconfig +1 -1
@@ -24,4 +24,4 @@ BR2_LINUX_KERNEL_IMAGE=y # Bootloader BR2_TARGET_OPENSBI=y BR2_TARGET_OPENSBI_USE_PLAT=y -BR2_TARGET_OPENSBI_PLAT="qemu/virt" +BR2_TARGET_OPENSBI_QEMU_VIRT=y
configs/qemu_riscv64_virt_defconfig +1 -1
@@ -23,4 +23,4 @@ BR2_LINUX_KERNEL_IMAGE=y # Bootloader BR2_TARGET_OPENSBI=y BR2_TARGET_OPENSBI_USE_PLAT=y -BR2_TARGET_OPENSBI_PLAT="qemu/virt" +BR2_TARGET_OPENSBI_QEMU_VIRT=y
Signature · 1 line
2.22.0
PATCH v2 2/2 boot/opensbi: Implement a choice for the OpenSBI Platform
Hello Alistair,
Quoted 6 lines · On Tue, 9 Jul 2019 15:36:49 -0700 Alistair Francis <[email protected]>…
Instead of requiring users to look at the OpenSBI source code and determine the platform string let's use a choice option to allow them to specify the platform they would like to target. We still allow them to specify a custom string if they want to.
Signed-off-by Alistair Francis <[email protected]>
I have not applied this patch, because we don't do this anywhere in Buildroot. For things like U-Boot, Linux or Barebox, the name of the platform/configuration is always a free-form string. Having an explicit list of platform is difficult to maintain as the list of platforms can be huge. Also the list of supported platforms can differ from one version to the other (in the case where the version itself is configurable). In addition, how do you draw the line between platforms that should be explicitly listed in the Config.in choice, and the ones for which users should use the free-form string option.
But again, the main reason for rejecting is that in exactly this situation in other packages in Buildroot, we use a simple free-form string.
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH v2 2/2 boot/opensbi: Implement a choice for the OpenSBI Platform
Quoted 23 lines · Thomas Petazzoni
Hello Alistair,
Quoted 6 lines · On Tue, 9 Jul 2019 15:36:49 -0700 Alistair Francis <[email protected]>…
Instead of requiring users to look at the OpenSBI source code and determine the platform string let's use a choice option to allow them to specify the platform they would like to target. We still allow them to specify a custom string if they want to.
Signed-off-by Alistair Francis <[email protected]>I have not applied this patch, because we don't do this anywhere in Buildroot. For things like U-Boot, Linux or Barebox, the name of the platform/configuration is always a free-form string. Having an explicit list of platform is difficult to maintain as the list of platforms can be huge. Also the list of supported platforms can differ from one version to the other (in the case where the version itself is configurable). In addition, how do you draw the line between platforms that should be explicitly listed in the Config.in choice, and the ones for which users should use the free-form string option.
Quoted 3 lines
But again, the main reason for rejecting is that in exactly this situation in other packages in Buildroot, we use a simple free-form string.
No worries. As that was the main problem Mark had with the HiFive Unleashed patches these should be good to merge.
I just sent a v2 with an updated readme to the list.
Alistair
Quoted 12 lines
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
PATCH v2 1/2 boot/opensbi: Upgrade from v0.3 to v0.4
In reply to Alistair FrancisQuoted 2 lines · Alistair Francis
Signed-off-by Alistair Francis <[email protected]>
Ping?
Alistair
Quoted 45 lines
---
v2:
- Install both bin and elf for fw_dynamic.*boot/opensbi/opensbi.hash | 2 +- boot/opensbi/opensbi.mk | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-)boot/opensbi/opensbi.hash +1
-1@@ -1,2 +1,2 @@ # locally computed -sha256 07f18b73abf3b85aabe5bead19a923716c100d30eb58033459f39c3a224be300 opensbi-0.3.tar.gz +sha256 d3060bf51af00204ce90fc73106955c694463b59a5b81be64cf780cd32743abf opensbi-0.4.tar.gzboot/opensbi/opensbi.mk +3
-2@@ -4,7 +4,7 @@ # ################################################################################ -OPENSBI_VERSION = 0.3 +OPENSBI_VERSION = 0.4 OPENSBI_SITE = $(call github,riscv,opensbi,v$(OPENSBI_VERSION)) OPENSBI_LICENSE = BSD-2-Clause OPENSBI_LICENSE_FILES = COPYING.BSD@@ -28,6 +28,8 @@ OPENSBI_INSTALL_IMAGES = YES define OPENSBI_INSTALL_IMAGES_CMDS $(INSTALL) -m 0644 -D $(@D)/build/platform/$(OPENSBI_PLAT)/firmware/fw_jump.bin $(BINARIES_DIR)/fw_jump.bin $(INSTALL) -m 0644 -D $(@D)/build/platform/$(OPENSBI_PLAT)/firmware/fw_jump.elf $(BINARIES_DIR)/fw_jump.elf + $(INSTALL) -m 0644 -D $(@D)/build/platform/$(OPENSBI_PLAT)/firmware/fw_dynamic.bin $(BINARIES_DIR)/fw_dynamic.bin + $(INSTALL) -m 0644 -D $(@D)/build/platform/$(OPENSBI_PLAT)/firmware/fw_dynamic.elf $(BINARIES_DIR)/fw_dynamic.elf endef endif --2.22.0
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Thomas Petazzoni
AppliedPATCH v2 1/2 boot/opensbi: Upgrade from v0.3 to v0.4
In reply to Alistair FrancisQuoted 4 lines · On Tue, 9 Jul 2019 15:36:48 -0700 Alistair Francis <[email protected]>…
Signed-off-by Alistair Francis <[email protected]>---
v2:
- Install both bin and elf for fw_dynamic.*
Applied to master, thanks.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com