All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v4 1/5] board/qemu/riscv32-virt: Update linux config
@ 2019-03-19 18:15 Alistair Francis
  2019-03-19 18:15 ` [Buildroot] [PATCH v4 2/5] linux: Enable BR2_LINUX_KERNEL_IMAGE on RISC-V Alistair Francis
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Alistair Francis @ 2019-03-19 18:15 UTC (permalink / raw)
  To: buildroot

Update the Linux defconfig. This defconfig is the in tree defconfig with
32-bit support enabled.

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
---
 board/qemu/riscv32-virt/linux.config | 85 +++++++++++++++++++++++++---
 1 file changed, 78 insertions(+), 7 deletions(-)

diff --git a/board/qemu/riscv32-virt/linux.config b/board/qemu/riscv32-virt/linux.config
index c25583f768..b7d1825126 100644
--- a/board/qemu/riscv32-virt/linux.config
+++ b/board/qemu/riscv32-virt/linux.config
@@ -1,23 +1,94 @@
+CONFIG_32BIT=y
+CONFIG_PAGE_OFFSET=0xC0000000
+CONFIG_PGTABLE_LEVELS=2
 CONFIG_ARCH_RV32I=y
+# CONFIG_ARCH_RV64I is not set
+CONFIG_MAXPHYSMEM_2GB=y
+CONFIG_LBDAF=y
+# CONFIG_SCSI_NSP32 is not set
+CONFIG_GENERIC_ATOMIC64=y
+CONFIG_GENERIC_LIB_ASHLDI3=y
+CONFIG_GENERIC_LIB_ASHRDI3=y
+CONFIG_GENERIC_LIB_LSHRDI3=y
+CONFIG_GENERIC_LIB_UCMPDI2=y
+CONFIG_GENERIC_LIB_UMODDI3=y
+CONFIG_SYSVIPC=y
+CONFIG_POSIX_MQUEUE=y
+CONFIG_IKCONFIG=y
+CONFIG_IKCONFIG_PROC=y
+CONFIG_CGROUPS=y
+CONFIG_CGROUP_SCHED=y
+CONFIG_CFS_BANDWIDTH=y
+CONFIG_CGROUP_BPF=y
+CONFIG_NAMESPACES=y
+CONFIG_USER_NS=y
+CONFIG_CHECKPOINT_RESTORE=y
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_EXPERT=y
+CONFIG_BPF_SYSCALL=y
 CONFIG_SMP=y
-CONFIG_NR_CPUS=8
 CONFIG_PCI=y
-CONFIG_SYSVIPC=y
+CONFIG_PCIE_XILINX=y
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
 CONFIG_NET=y
 CONFIG_PACKET=y
 CONFIG_UNIX=y
 CONFIG_INET=y
-# CONFIG_WIRELESS is not set
+CONFIG_IP_MULTICAST=y
+CONFIG_IP_ADVANCED_ROUTER=y
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+CONFIG_IP_PNP_BOOTP=y
+CONFIG_IP_PNP_RARP=y
+CONFIG_NETLINK_DIAG=y
+CONFIG_DEVTMPFS=y
+CONFIG_BLK_DEV_LOOP=y
 CONFIG_VIRTIO_BLK=y
+CONFIG_BLK_DEV_SD=y
+CONFIG_BLK_DEV_SR=y
+CONFIG_ATA=y
+CONFIG_SATA_AHCI=y
+CONFIG_SATA_AHCI_PLATFORM=y
 CONFIG_NETDEVICES=y
 CONFIG_VIRTIO_NET=y
-# CONFIG_ETHERNET is not set
-# CONFIG_WLAN is not set
+CONFIG_MACB=y
+CONFIG_E1000E=y
+CONFIG_R8169=y
+CONFIG_MICROSEMI_PHY=y
+CONFIG_INPUT_MOUSEDEV=y
 CONFIG_SERIAL_8250=y
 CONFIG_SERIAL_8250_CONSOLE=y
 CONFIG_SERIAL_OF_PLATFORM=y
-CONFIG_VIRT_DRIVERS=y
+CONFIG_HVC_RISCV_SBI=y
+# CONFIG_PTP_1588_CLOCK is not set
+CONFIG_DRM=y
+CONFIG_DRM_RADEON=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+CONFIG_USB=y
+CONFIG_USB_XHCI_HCD=y
+CONFIG_USB_XHCI_PLATFORM=y
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_EHCI_HCD_PLATFORM=y
+CONFIG_USB_OHCI_HCD=y
+CONFIG_USB_OHCI_HCD_PLATFORM=y
+CONFIG_USB_STORAGE=y
+CONFIG_USB_UAS=y
 CONFIG_VIRTIO_MMIO=y
-CONFIG_EXT2_FS=y
+CONFIG_SIFIVE_PLIC=y
+CONFIG_RAS=y
 CONFIG_EXT4_FS=y
+CONFIG_EXT4_FS_POSIX_ACL=y
+CONFIG_AUTOFS4_FS=y
+CONFIG_MSDOS_FS=y
+CONFIG_VFAT_FS=y
 CONFIG_TMPFS=y
+CONFIG_TMPFS_POSIX_ACL=y
+CONFIG_NFS_FS=y
+CONFIG_NFS_V4=y
+CONFIG_NFS_V4_1=y
+CONFIG_NFS_V4_2=y
+CONFIG_ROOT_NFS=y
+CONFIG_CRYPTO_USER_API_HASH=y
+CONFIG_PRINTK_TIME=y
+# CONFIG_RCU_TRACE is not set
-- 
2.21.0

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [Buildroot] [PATCH v4 2/5] linux: Enable BR2_LINUX_KERNEL_IMAGE on RISC-V
  2019-03-19 18:15 [Buildroot] [PATCH v4 1/5] board/qemu/riscv32-virt: Update linux config Alistair Francis
@ 2019-03-19 18:15 ` Alistair Francis
  2019-03-19 21:06   ` Thomas Petazzoni
  2019-03-19 18:15 ` [Buildroot] [PATCH v4 3/5] boot/opensbi: Initial commit of OpenSBI for RISC-V Alistair Francis
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 10+ messages in thread
From: Alistair Francis @ 2019-03-19 18:15 UTC (permalink / raw)
  To: buildroot

We will need to build Image files for OpenSBI so allow that now.

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
---
 linux/Config.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/linux/Config.in b/linux/Config.in
index 818b94e1c0..dc10238053 100644
--- a/linux/Config.in
+++ b/linux/Config.in
@@ -258,7 +258,7 @@ config BR2_LINUX_KERNEL_SIMPLEIMAGE
 
 config BR2_LINUX_KERNEL_IMAGE
 	bool "Image"
-	depends on BR2_aarch64
+	depends on BR2_aarch64 || BR2_riscv
 
 config BR2_LINUX_KERNEL_LINUX_BIN
 	bool "linux.bin"
-- 
2.21.0

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [Buildroot] [PATCH v4 3/5] boot/opensbi: Initial commit of OpenSBI for RISC-V
  2019-03-19 18:15 [Buildroot] [PATCH v4 1/5] board/qemu/riscv32-virt: Update linux config Alistair Francis
  2019-03-19 18:15 ` [Buildroot] [PATCH v4 2/5] linux: Enable BR2_LINUX_KERNEL_IMAGE on RISC-V Alistair Francis
@ 2019-03-19 18:15 ` Alistair Francis
  2019-03-19 21:09   ` Thomas Petazzoni
  2019-03-19 18:15 ` [Buildroot] [PATCH v4 4/5] configs: qemu_riscv*_virt: Use OpenSBI by default Alistair Francis
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 10+ messages in thread
From: Alistair Francis @ 2019-03-19 18:15 UTC (permalink / raw)
  To: buildroot

OpenSBI is a much improved alternative to BBL (riscv-pk). Add OpenSBI
support to buildroot.

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
---
 DEVELOPERS              |  1 +
 boot/Config.in          |  1 +
 boot/opensbi/Config.in  | 25 +++++++++++++++++++++++++
 boot/opensbi/opensbi.mk | 32 ++++++++++++++++++++++++++++++++
 4 files changed, 59 insertions(+)
 create mode 100644 boot/opensbi/Config.in
 create mode 100644 boot/opensbi/opensbi.mk

diff --git a/DEVELOPERS b/DEVELOPERS
index 3e0ac08e11..91eda42949 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -122,6 +122,7 @@ F:	package/kvazaar/
 F:	package/v4l2loopback/
 
 N:	Alistair Francis <alistair@alistair23.me>
+F:	boot/opensbi/
 F:	package/xen/
 
 N:	Alvaro G. M <alvaro.gamez@hazent.com>
diff --git a/boot/Config.in b/boot/Config.in
index 74481e7545..97bd3de6e9 100644
--- a/boot/Config.in
+++ b/boot/Config.in
@@ -14,6 +14,7 @@ source "boot/lpc32xxcdl/Config.in"
 source "boot/mv-ddr-marvell/Config.in"
 source "boot/mxs-bootlets/Config.in"
 source "boot/optee-os/Config.in"
+source "boot/opensbi/Config.in"
 source "boot/riscv-pk/Config.in"
 source "boot/s500-bootloader/Config.in"
 source "boot/shim/Config.in"
diff --git a/boot/opensbi/Config.in b/boot/opensbi/Config.in
new file mode 100644
index 0000000000..5f3cc13312
--- /dev/null
+++ b/boot/opensbi/Config.in
@@ -0,0 +1,25 @@
+config BR2_TARGET_OPENSBI
+	bool "opensbi"
+	depends on BR2_riscv
+	help
+	  OpenSBI aims to provide an open-source and extensible
+	  implementation of the RISC-V SBI specification for a platform
+	  specific firmware (M-mode) and a general purpose OS,
+	  hypervisor or bootloader (S-mode or HS-mode). OpenSBI
+	  implementation can be easily extended by RISC-V platform or
+	  System-on-Chip vendors to fit a particular hadware
+	  configuration.
+
+	  https://github.com/riscv/opensbi.git
+
+if BR2_TARGET_OPENSBI
+config BR2_TARGET_OPENSBI_PLAT
+	string "OpenSBI Platform"
+	default ""
+	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.
+endif
diff --git a/boot/opensbi/opensbi.mk b/boot/opensbi/opensbi.mk
new file mode 100644
index 0000000000..13dffb9ce0
--- /dev/null
+++ b/boot/opensbi/opensbi.mk
@@ -0,0 +1,32 @@
+################################################################################
+#
+# OpenSBI
+#
+################################################################################
+
+OPENSBI_VERSION = v0.3
+OPENSBI_SITE = $(call github,riscv,opensbi,$(OPENSBI_VERSION))
+OPENSBI_LICENSE = BSD-2-Clause
+OPENSBI_LICENSE_FILES = COPYING.BSD
+OPENSBI_INSTALL_IMAGES = YES
+
+OPENSBI_MAKE_ENV = \
+	CROSS_COMPILE=$(TARGET_CROSS)
+
+OPENSBI_PLAT = $(call qstrip,$(BR2_TARGET_OPENSBI_PLAT))
+ifneq ($(OPENSBI_PLAT),)
+OPENSBI_MAKE_ENV += PLATFORM=$(OPENSBI_PLAT)
+endif
+
+define OPENSBI_BUILD_CMDS
+	$(TARGET_MAKE_ENV) $(OPENSBI_MAKE_ENV) $(MAKE) -C $(@D)
+endef
+
+ifneq ($(OPENSBI_PLAT),)
+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
+endef
+endif
+
+$(eval $(generic-package))
-- 
2.21.0

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [Buildroot] [PATCH v4 4/5] configs: qemu_riscv*_virt: Use OpenSBI by default
  2019-03-19 18:15 [Buildroot] [PATCH v4 1/5] board/qemu/riscv32-virt: Update linux config Alistair Francis
  2019-03-19 18:15 ` [Buildroot] [PATCH v4 2/5] linux: Enable BR2_LINUX_KERNEL_IMAGE on RISC-V Alistair Francis
  2019-03-19 18:15 ` [Buildroot] [PATCH v4 3/5] boot/opensbi: Initial commit of OpenSBI for RISC-V Alistair Francis
@ 2019-03-19 18:15 ` Alistair Francis
  2019-03-19 18:15 ` [Buildroot] [PATCH v4 5/5] boot/riscv-pk: Deprecate riscv-pk and BBL Alistair Francis
  2019-03-19 21:05 ` [Buildroot] [PATCH v4 1/5] board/qemu/riscv32-virt: Update linux config Thomas Petazzoni
  4 siblings, 0 replies; 10+ messages in thread
From: Alistair Francis @ 2019-03-19 18:15 UTC (permalink / raw)
  To: buildroot

Use OpenSBI by default instead of riscv-pk (BBL).

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
---
 board/qemu/riscv32-virt/readme.txt  | 6 +++---
 board/qemu/riscv64-virt/readme.txt  | 6 +++---
 configs/qemu_riscv32_virt_defconfig | 5 ++++-
 configs/qemu_riscv64_virt_defconfig | 5 ++++-
 4 files changed, 14 insertions(+), 8 deletions(-)

diff --git a/board/qemu/riscv32-virt/readme.txt b/board/qemu/riscv32-virt/readme.txt
index 2da99580e5..fb441723fd 100644
--- a/board/qemu/riscv32-virt/readme.txt
+++ b/board/qemu/riscv32-virt/readme.txt
@@ -1,7 +1,7 @@
-Run the emulation with:
+Run Linux in emulation with:
 
-  qemu-system-riscv32 -M virt -kernel output/images/bbl -append "root=/dev/vda ro console=ttyS0" -drive file=output/images/rootfs.ext2,format=raw,id=hd0 -device virtio-blk-device,drive=hd0 -netdev user,id=net0 -device virtio-net-device,netdev=net0 -nographic
+  qemu-system-riscv32 -M virt -kernel output/images/fw_jump.elf -device loader,file=output/images/Image,addr=0x80400000 -append "root=/dev/vda ro console=ttyS0" -drive file=output/images/rootfs.ext2,format=raw,id=hd0 -device virtio-blk-device,drive=hd0 -netdev user,id=net0 -device virtio-net-device,netdev=net0 -nographic
 
 The login prompt will appear in the terminal that started Qemu.
 
-Tested with QEMU 2.12.1
+Tested with QEMU 3.1
diff --git a/board/qemu/riscv64-virt/readme.txt b/board/qemu/riscv64-virt/readme.txt
index 9f6e35c867..0af27f7bf2 100644
--- a/board/qemu/riscv64-virt/readme.txt
+++ b/board/qemu/riscv64-virt/readme.txt
@@ -1,7 +1,7 @@
-Run the emulation with:
+Run Linux in emulation with:
 
-  qemu-system-riscv64 -M virt -kernel output/images/bbl -append "root=/dev/vda ro console=ttyS0" -drive file=output/images/rootfs.ext2,format=raw,id=hd0 -device virtio-blk-device,drive=hd0 -netdev user,id=net0 -device virtio-net-device,netdev=net0 -nographic
+  qemu-system-riscv64 -M virt -kernel output/images/fw_jump.elf -device loader,file=output/images/Image,addr=0x80200000 -append "root=/dev/vda ro console=ttyS0" -drive file=output/images/rootfs.ext2,format=raw,id=hd0 -device virtio-blk-device,drive=hd0 -netdev user,id=net0 -device virtio-net-device,netdev=net0 -nographic
 
 The login prompt will appear in the terminal that started Qemu.
 
-Tested with QEMU 2.12.1
+Tested with QEMU 3.1
diff --git a/configs/qemu_riscv32_virt_defconfig b/configs/qemu_riscv32_virt_defconfig
index 6f9a61b11c..96d971333a 100644
--- a/configs/qemu_riscv32_virt_defconfig
+++ b/configs/qemu_riscv32_virt_defconfig
@@ -20,6 +20,9 @@ BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://github.com/riscv/riscv-linux.git"
 BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="8fe28cb58bcb235034b64cbbb7550a8a43fd88be"
 BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
 BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/riscv32-virt/linux.config"
+BR2_LINUX_KERNEL_IMAGE=y
 
 # Bootloader
-BR2_TARGET_RISCV_PK=y
+BR2_TARGET_OPENSBI=y
+BR2_TARGET_OPENSBI_USE_PLAT=y
+BR2_TARGET_OPENSBI_PLAT="qemu/virt"
diff --git a/configs/qemu_riscv64_virt_defconfig b/configs/qemu_riscv64_virt_defconfig
index 596edf2fcd..05d2764003 100644
--- a/configs/qemu_riscv64_virt_defconfig
+++ b/configs/qemu_riscv64_virt_defconfig
@@ -19,6 +19,9 @@ BR2_LINUX_KERNEL_CUSTOM_GIT=y
 BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://github.com/riscv/riscv-linux.git"
 BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="8fe28cb58bcb235034b64cbbb7550a8a43fd88be"
 BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y
+BR2_LINUX_KERNEL_IMAGE=y
 
 # Bootloader
-BR2_TARGET_RISCV_PK=y
+BR2_TARGET_OPENSBI=y
+BR2_TARGET_OPENSBI_USE_PLAT=y
+BR2_TARGET_OPENSBI_PLAT="qemu/virt"
-- 
2.21.0

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [Buildroot] [PATCH v4 5/5] boot/riscv-pk: Deprecate riscv-pk and BBL
  2019-03-19 18:15 [Buildroot] [PATCH v4 1/5] board/qemu/riscv32-virt: Update linux config Alistair Francis
                   ` (2 preceding siblings ...)
  2019-03-19 18:15 ` [Buildroot] [PATCH v4 4/5] configs: qemu_riscv*_virt: Use OpenSBI by default Alistair Francis
@ 2019-03-19 18:15 ` Alistair Francis
  2019-03-19 21:05 ` [Buildroot] [PATCH v4 1/5] board/qemu/riscv32-virt: Update linux config Thomas Petazzoni
  4 siblings, 0 replies; 10+ messages in thread
From: Alistair Francis @ 2019-03-19 18:15 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
---
 boot/riscv-pk/Config.in | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/boot/riscv-pk/Config.in b/boot/riscv-pk/Config.in
index b4fe36590f..cf9c5cd8ee 100644
--- a/boot/riscv-pk/Config.in
+++ b/boot/riscv-pk/Config.in
@@ -3,10 +3,13 @@ comment "riscv-pk needs a Linux kernel to be built"
 	depends on !BR2_LINUX_KERNEL
 
 config BR2_TARGET_RISCV_PK
-	bool "riscv-pk"
+	bool "riscv-pk (deprecated)"
 	depends on BR2_riscv
 	depends on BR2_LINUX_KERNEL
 	help
+	  The RISC-V Proxy Kernel (pk) and Boot Loader (BBL) have
+	  been deprecated. Please use OpenSBI instead.
+
 	  The RISC-V Proxy Kernel (pk) package contains the Berkeley
 	  Boot Loader (BBL) which has been designed to boot a Linux
 	  kernel on a RISC-V processor.
-- 
2.21.0

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [Buildroot] [PATCH v4 1/5] board/qemu/riscv32-virt: Update linux config
  2019-03-19 18:15 [Buildroot] [PATCH v4 1/5] board/qemu/riscv32-virt: Update linux config Alistair Francis
                   ` (3 preceding siblings ...)
  2019-03-19 18:15 ` [Buildroot] [PATCH v4 5/5] boot/riscv-pk: Deprecate riscv-pk and BBL Alistair Francis
@ 2019-03-19 21:05 ` Thomas Petazzoni
  2019-03-19 21:24   ` Alistair Francis
  4 siblings, 1 reply; 10+ messages in thread
From: Thomas Petazzoni @ 2019-03-19 21:05 UTC (permalink / raw)
  To: buildroot

Hello,

On Tue, 19 Mar 2019 18:15:46 +0000
Alistair Francis <Alistair.Francis@wdc.com> wrote:

> Update the Linux defconfig. This defconfig is the in tree defconfig with
> 32-bit support enabled.
> 
> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>

If it's just the in-tree defconfig + one option to enable 32-bit
support, what about using the in-tree defconfig directly + a small
config fragment to enable 32-bit support ?

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Buildroot] [PATCH v4 2/5] linux: Enable BR2_LINUX_KERNEL_IMAGE on RISC-V
  2019-03-19 18:15 ` [Buildroot] [PATCH v4 2/5] linux: Enable BR2_LINUX_KERNEL_IMAGE on RISC-V Alistair Francis
@ 2019-03-19 21:06   ` Thomas Petazzoni
  0 siblings, 0 replies; 10+ messages in thread
From: Thomas Petazzoni @ 2019-03-19 21:06 UTC (permalink / raw)
  To: buildroot

On Tue, 19 Mar 2019 18:15:47 +0000
Alistair Francis <Alistair.Francis@wdc.com> wrote:

> We will need to build Image files for OpenSBI so allow that now.
> 
> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
> ---
>  linux/Config.in | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Buildroot] [PATCH v4 3/5] boot/opensbi: Initial commit of OpenSBI for RISC-V
  2019-03-19 18:15 ` [Buildroot] [PATCH v4 3/5] boot/opensbi: Initial commit of OpenSBI for RISC-V Alistair Francis
@ 2019-03-19 21:09   ` Thomas Petazzoni
  2019-03-20  0:37     ` Alistair Francis
  0 siblings, 1 reply; 10+ messages in thread
From: Thomas Petazzoni @ 2019-03-19 21:09 UTC (permalink / raw)
  To: buildroot

Hello,

I was about to apply this patch, but there is still an issue (see
below). Since a new iteration will be needed, I'll point out some minor
nits as well that I would have normally fixed myself when applying, but
that you can fix together with the more significant issue.

First minor nit: the commit title should be "boot/opensbi: new package"

On Tue, 19 Mar 2019 18:15:48 +0000
Alistair Francis <Alistair.Francis@wdc.com> wrote:


> diff --git a/boot/opensbi/opensbi.mk b/boot/opensbi/opensbi.mk
> new file mode 100644
> index 0000000000..13dffb9ce0
> --- /dev/null
> +++ b/boot/opensbi/opensbi.mk
> @@ -0,0 +1,32 @@
> +################################################################################
> +#
> +# OpenSBI

opensbi in lower-case

> +#
> +################################################################################
> +
> +OPENSBI_VERSION = v0.3
> +OPENSBI_SITE = $(call github,riscv,opensbi,$(OPENSBI_VERSION))
> +OPENSBI_LICENSE = BSD-2-Clause
> +OPENSBI_LICENSE_FILES = COPYING.BSD
> +OPENSBI_INSTALL_IMAGES = YES
> +
> +OPENSBI_MAKE_ENV = \
> +	CROSS_COMPILE=$(TARGET_CROSS)
> +
> +OPENSBI_PLAT = $(call qstrip,$(BR2_TARGET_OPENSBI_PLAT))
> +ifneq ($(OPENSBI_PLAT),)
> +OPENSBI_MAKE_ENV += PLATFORM=$(OPENSBI_PLAT)
> +endif
> +
> +define OPENSBI_BUILD_CMDS
> +	$(TARGET_MAKE_ENV) $(OPENSBI_MAKE_ENV) $(MAKE) -C $(@D)
> +endef
> +
> +ifneq ($(OPENSBI_PLAT),)
> +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
> +endef
> +endif

So the issue that I have is that this package doesn't install anything
when OPENSBI_PLAT is empty. It doesn't install any image, it doesn't
install any library to STAGING_DIR.

Should the libplatsbi.a library be installed in
$(STAGING_DIR)/usr/lib ? This location is normally for regular Linux
user-space libraries, which I suppose libplatsbi.a is not. Perhaps it
should be in another location ?

In any case, it should be installed somewhere, otherwise the package is
pretty meaningless when OPENSBI_PLAT is empty.

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Buildroot] [PATCH v4 1/5] board/qemu/riscv32-virt: Update linux config
  2019-03-19 21:05 ` [Buildroot] [PATCH v4 1/5] board/qemu/riscv32-virt: Update linux config Thomas Petazzoni
@ 2019-03-19 21:24   ` Alistair Francis
  0 siblings, 0 replies; 10+ messages in thread
From: Alistair Francis @ 2019-03-19 21:24 UTC (permalink / raw)
  To: buildroot

On Tue, Mar 19, 2019 at 2:05 PM Thomas Petazzoni
<thomas.petazzoni@bootlin.com> wrote:
>
> Hello,
>
> On Tue, 19 Mar 2019 18:15:46 +0000
> Alistair Francis <Alistair.Francis@wdc.com> wrote:
>
> > Update the Linux defconfig. This defconfig is the in tree defconfig with
> > 32-bit support enabled.
> >
> > Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
>
> If it's just the in-tree defconfig + one option to enable 32-bit
> support, what about using the in-tree defconfig directly + a small
> config fragment to enable 32-bit support ?

That would be great! That's what we do in OpenEmbedded. I couldn't
figure out how to enable that though. How can I append a config to the
arch defconfig?

Alistair

>
> Thanks!
>
> Thomas
> --
> Thomas Petazzoni, CTO, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Buildroot] [PATCH v4 3/5] boot/opensbi: Initial commit of OpenSBI for RISC-V
  2019-03-19 21:09   ` Thomas Petazzoni
@ 2019-03-20  0:37     ` Alistair Francis
  0 siblings, 0 replies; 10+ messages in thread
From: Alistair Francis @ 2019-03-20  0:37 UTC (permalink / raw)
  To: buildroot

On Tue, Mar 19, 2019 at 2:09 PM Thomas Petazzoni
<thomas.petazzoni@bootlin.com> wrote:
>
> Hello,
>
> I was about to apply this patch, but there is still an issue (see
> below). Since a new iteration will be needed, I'll point out some minor
> nits as well that I would have normally fixed myself when applying, but
> that you can fix together with the more significant issue.
>
> First minor nit: the commit title should be "boot/opensbi: new package"
>
> On Tue, 19 Mar 2019 18:15:48 +0000
> Alistair Francis <Alistair.Francis@wdc.com> wrote:
>
>
> > diff --git a/boot/opensbi/opensbi.mk b/boot/opensbi/opensbi.mk
> > new file mode 100644
> > index 0000000000..13dffb9ce0
> > --- /dev/null
> > +++ b/boot/opensbi/opensbi.mk
> > @@ -0,0 +1,32 @@
> > +################################################################################
> > +#
> > +# OpenSBI
>
> opensbi in lower-case
>
> > +#
> > +################################################################################
> > +
> > +OPENSBI_VERSION = v0.3
> > +OPENSBI_SITE = $(call github,riscv,opensbi,$(OPENSBI_VERSION))
> > +OPENSBI_LICENSE = BSD-2-Clause
> > +OPENSBI_LICENSE_FILES = COPYING.BSD
> > +OPENSBI_INSTALL_IMAGES = YES
> > +
> > +OPENSBI_MAKE_ENV = \
> > +     CROSS_COMPILE=$(TARGET_CROSS)
> > +
> > +OPENSBI_PLAT = $(call qstrip,$(BR2_TARGET_OPENSBI_PLAT))
> > +ifneq ($(OPENSBI_PLAT),)
> > +OPENSBI_MAKE_ENV += PLATFORM=$(OPENSBI_PLAT)
> > +endif
> > +
> > +define OPENSBI_BUILD_CMDS
> > +     $(TARGET_MAKE_ENV) $(OPENSBI_MAKE_ENV) $(MAKE) -C $(@D)
> > +endef
> > +
> > +ifneq ($(OPENSBI_PLAT),)
> > +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
> > +endef
> > +endif
>
> So the issue that I have is that this package doesn't install anything
> when OPENSBI_PLAT is empty. It doesn't install any image, it doesn't
> install any library to STAGING_DIR.
>
> Should the libplatsbi.a library be installed in
> $(STAGING_DIR)/usr/lib ? This location is normally for regular Linux
> user-space libraries, which I suppose libplatsbi.a is not. Perhaps it
> should be in another location ?
>
> In any case, it should be installed somewhere, otherwise the package is
> pretty meaningless when OPENSBI_PLAT is empty.

Fixed in v5.

Alistair

>
> Thanks!
>
> Thomas
> --
> Thomas Petazzoni, CTO, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2019-03-20  0:37 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-19 18:15 [Buildroot] [PATCH v4 1/5] board/qemu/riscv32-virt: Update linux config Alistair Francis
2019-03-19 18:15 ` [Buildroot] [PATCH v4 2/5] linux: Enable BR2_LINUX_KERNEL_IMAGE on RISC-V Alistair Francis
2019-03-19 21:06   ` Thomas Petazzoni
2019-03-19 18:15 ` [Buildroot] [PATCH v4 3/5] boot/opensbi: Initial commit of OpenSBI for RISC-V Alistair Francis
2019-03-19 21:09   ` Thomas Petazzoni
2019-03-20  0:37     ` Alistair Francis
2019-03-19 18:15 ` [Buildroot] [PATCH v4 4/5] configs: qemu_riscv*_virt: Use OpenSBI by default Alistair Francis
2019-03-19 18:15 ` [Buildroot] [PATCH v4 5/5] boot/riscv-pk: Deprecate riscv-pk and BBL Alistair Francis
2019-03-19 21:05 ` [Buildroot] [PATCH v4 1/5] board/qemu/riscv32-virt: Update linux config Thomas Petazzoni
2019-03-19 21:24   ` Alistair Francis

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.