* [Buildroot] [PATCH v2 2/5] configs: qemu_riscv32_virt: Upgrade to 4.20 kernel
2019-03-18 21:02 [Buildroot] [PATCH v2 1/5] package/glibc: Update glibc 32-bit RISC-V version Alistair Francis
@ 2019-03-18 21:02 ` Alistair Francis
2019-03-18 21:59 ` Thomas Petazzoni
2019-03-19 15:20 ` Mark Corbin
2019-03-18 21:02 ` [Buildroot] [PATCH v2 3/5] configs: qemu_riscv64_virt: Fix config layout Alistair Francis
` (3 subsequent siblings)
4 siblings, 2 replies; 15+ messages in thread
From: Alistair Francis @ 2019-03-18 21:02 UTC (permalink / raw)
To: buildroot
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
---
configs/qemu_riscv32_virt_defconfig | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/configs/qemu_riscv32_virt_defconfig b/configs/qemu_riscv32_virt_defconfig
index fb37da6a89..6f9a61b11c 100644
--- a/configs/qemu_riscv32_virt_defconfig
+++ b/configs/qemu_riscv32_virt_defconfig
@@ -10,14 +10,14 @@ BR2_TARGET_GENERIC_GETTY_PORT="ttyS0"
# Filesystem
BR2_TARGET_ROOTFS_EXT2=y
-# Linux headers same as kernel, a 4.15 series
-BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_15=y
+# Linux headers same as kernel, a 4.20 series
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_20=y
# Kernel
BR2_LINUX_KERNEL=y
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="fe92d7905c6ea0ebeabeb725b8040754ede7c220"
+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"
--
2.21.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [Buildroot] [PATCH v2 1/5] package/glibc: Update glibc 32-bit RISC-V version
@ 2019-03-18 21:02 Alistair Francis
2019-03-18 21:02 ` [Buildroot] [PATCH v2 2/5] configs: qemu_riscv32_virt: Upgrade to 4.20 kernel Alistair Francis
` (4 more replies)
0 siblings, 5 replies; 15+ messages in thread
From: Alistair Francis @ 2019-03-18 21:02 UTC (permalink / raw)
To: buildroot
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
---
.../glibc.hash | 2 +-
...C-V-32-bit-build-of-riscv-glibc-2.26.patch | 59 -------------------
...rror-that-breaks-RISC-V-architecture.patch | 39 ------------
package/glibc/glibc.mk | 2 +-
4 files changed, 2 insertions(+), 100 deletions(-)
rename package/glibc/{4e2943456e690d89f48e6e710757dd09404b0c9a => 06983fe52cfe8e4779035c27e8cc5d2caab31531}/glibc.hash (71%)
delete mode 100644 package/glibc/4e2943456e690d89f48e6e710757dd09404b0c9a/0001-Fix-RISC-V-32-bit-build-of-riscv-glibc-2.26.patch
delete mode 100644 package/glibc/4e2943456e690d89f48e6e710757dd09404b0c9a/0002-Fix-mcontext_t-error-that-breaks-RISC-V-architecture.patch
diff --git a/package/glibc/4e2943456e690d89f48e6e710757dd09404b0c9a/glibc.hash b/package/glibc/06983fe52cfe8e4779035c27e8cc5d2caab31531/glibc.hash
similarity index 71%
rename from package/glibc/4e2943456e690d89f48e6e710757dd09404b0c9a/glibc.hash
rename to package/glibc/06983fe52cfe8e4779035c27e8cc5d2caab31531/glibc.hash
index 3eb5e04e96..09ddc7be72 100644
--- a/package/glibc/4e2943456e690d89f48e6e710757dd09404b0c9a/glibc.hash
+++ b/package/glibc/06983fe52cfe8e4779035c27e8cc5d2caab31531/glibc.hash
@@ -1,5 +1,5 @@
# Locally calculated (fetched from Github)
-sha256 a40f908125135bad2cf92c18d07ad25b3091b161b3a5d3aea46c23ffd2ac90b8 glibc-4e2943456e690d89f48e6e710757dd09404b0c9a.tar.gz
+sha256 703877c0df77fce00719fe55cc62b07bb8d5f44fdb704bbb1b0bf2cf38afe10a glibc-06983fe52cfe8e4779035c27e8cc5d2caab31531.tar.gz
# Hashes for license files
sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING
diff --git a/package/glibc/4e2943456e690d89f48e6e710757dd09404b0c9a/0001-Fix-RISC-V-32-bit-build-of-riscv-glibc-2.26.patch b/package/glibc/4e2943456e690d89f48e6e710757dd09404b0c9a/0001-Fix-RISC-V-32-bit-build-of-riscv-glibc-2.26.patch
deleted file mode 100644
index ab157e9e7b..0000000000
--- a/package/glibc/4e2943456e690d89f48e6e710757dd09404b0c9a/0001-Fix-RISC-V-32-bit-build-of-riscv-glibc-2.26.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-From 4909cfbbe8dd512b8fc0892859549c26e1b14d30 Mon Sep 17 00:00:00 2001
-From: Mark Corbin <mark.corbin@embecosm.com>
-Date: Sun, 21 Oct 2018 10:38:18 +0100
-Subject: [PATCH] Fix RISC-V 32-bit build of riscv-glibc 2.26
-
-This patch fixes two build errors with the 32-bit version of
-glibc-2.26 from the riscv-glibc repository.
-
-A void reference to 'refsym' has been added to dl-runtime.c to avoid
-an 'unused variable' error when building with '-Werror'.
-
-Some data types were hard-coded for 64-bit in ldsodefs.h. These have
-been modified to allow 32-bit builds.
-
-This patch was provided by Fabrice Bellard as part of his RISC-V
-Buildroot development source.
-
-Signed-off-by: Mark Corbin <mark.corbin@embecosm.com>
----
- elf/dl-runtime.c | 1 +
- sysdeps/riscv/ldsodefs.h | 4 ++--
- 2 files changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/elf/dl-runtime.c b/elf/dl-runtime.c
-index 51d3819d4a..e728e8907e 100644
---- a/elf/dl-runtime.c
-+++ b/elf/dl-runtime.c
-@@ -146,6 +146,7 @@ _dl_fixup (
- if (__glibc_unlikely (GLRO(dl_bind_not)))
- return value;
-
-+ (void)refsym;
- return elf_machine_fixup_plt (l, result, refsym, sym, reloc, rel_addr, value);
- }
-
-diff --git a/sysdeps/riscv/ldsodefs.h b/sysdeps/riscv/ldsodefs.h
-index db993df80a..91e7a8c88f 100644
---- a/sysdeps/riscv/ldsodefs.h
-+++ b/sysdeps/riscv/ldsodefs.h
-@@ -25,14 +25,14 @@ struct La_riscv_regs;
- struct La_riscv_retval;
-
- #define ARCH_PLTENTER_MEMBERS \
-- Elf64_Addr (*riscv_gnu_pltenter) (Elf64_Sym *, unsigned int, \
-+ ElfW(Addr) (*riscv_gnu_pltenter) (ElfW(Sym) *, unsigned int, \
- uintptr_t *, uintptr_t *, \
- const struct La_riscv_regs *, \
- unsigned int *, const char *name, \
- long int *framesizep);
-
- #define ARCH_PLTEXIT_MEMBERS \
-- unsigned int (*riscv_gnu_pltexit) (Elf64_Sym *, unsigned int, \
-+ unsigned int (*riscv_gnu_pltexit) (ElfW(Sym) *, unsigned int, \
- uintptr_t *, uintptr_t *, \
- const struct La_riscv_regs *, \
- struct La_riscv_retval *, \
---
-2.17.1
-
diff --git a/package/glibc/4e2943456e690d89f48e6e710757dd09404b0c9a/0002-Fix-mcontext_t-error-that-breaks-RISC-V-architecture.patch b/package/glibc/4e2943456e690d89f48e6e710757dd09404b0c9a/0002-Fix-mcontext_t-error-that-breaks-RISC-V-architecture.patch
deleted file mode 100644
index 961d5a1cb6..0000000000
--- a/package/glibc/4e2943456e690d89f48e6e710757dd09404b0c9a/0002-Fix-mcontext_t-error-that-breaks-RISC-V-architecture.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From 6b4520e13c2ed7fca725d5f5c879854cd7c96c19 Mon Sep 17 00:00:00 2001
-From: Mark Corbin <mark.corbin@embecosm.com>
-Date: Mon, 4 Feb 2019 10:35:27 +0000
-Subject: [PATCH] Fix mcontext_t error that breaks RISC-V architecture
- package builds
-
-The riscv-glibc repository version of glibc 2.26 will build for
-RISC-V 32bit, but when many packages are built against the resulting
-library an 'unknown type name mcontext_t' error is reported. The
-definition of mcontext_h in the ucontext.h header file needs to be
-moved outside of the '#ifdef __USE_MISC' structure to fix this
-issue.
-
-Signed-off-by: Mark Corbin <mark.corbin@embecosm.com>
----
- sysdeps/unix/sysv/linux/riscv/sys/ucontext.h | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git a/sysdeps/unix/sysv/linux/riscv/sys/ucontext.h b/sysdeps/unix/sysv/linux/riscv/sys/ucontext.h
-index 8f02f09106..b9dd04564a 100644
---- a/sysdeps/unix/sysv/linux/riscv/sys/ucontext.h
-+++ b/sysdeps/unix/sysv/linux/riscv/sys/ucontext.h
-@@ -48,12 +48,11 @@ typedef greg_t gregset_t[NGREG];
-
- /* Container for floating-point state. */
- typedef union __riscv_fp_state fpregset_t;
-+#endif
-
- /* Context to describe whole processor state. */
- typedef struct sigcontext mcontext_t;
-
--#endif
--
- /* Userlevel context. */
- typedef struct ucontext
- {
---
-2.19.1
-
diff --git a/package/glibc/glibc.mk b/package/glibc/glibc.mk
index cb867d4d5b..5ee53df2b2 100644
--- a/package/glibc/glibc.mk
+++ b/package/glibc/glibc.mk
@@ -8,7 +8,7 @@ ifeq ($(BR2_arc),y)
GLIBC_VERSION = arc-2018.09-release
GLIBC_SITE = $(call github,foss-for-synopsys-dwc-arc-processors,glibc,$(GLIBC_VERSION))
else ifeq ($(BR2_RISCV_32),y)
-GLIBC_VERSION = 4e2943456e690d89f48e6e710757dd09404b0c9a
+GLIBC_VERSION = 06983fe52cfe8e4779035c27e8cc5d2caab31531
GLIBC_SITE = $(call github,riscv,riscv-glibc,$(GLIBC_VERSION))
else
# Generate version string using:
--
2.21.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [Buildroot] [PATCH v2 3/5] configs: qemu_riscv64_virt: Fix config layout
2019-03-18 21:02 [Buildroot] [PATCH v2 1/5] package/glibc: Update glibc 32-bit RISC-V version Alistair Francis
2019-03-18 21:02 ` [Buildroot] [PATCH v2 2/5] configs: qemu_riscv32_virt: Upgrade to 4.20 kernel Alistair Francis
@ 2019-03-18 21:02 ` Alistair Francis
2019-03-18 21:59 ` Thomas Petazzoni
2019-03-18 21:02 ` [Buildroot] [PATCH v2 5/5] boot: riscv: Initial commit of OpenSBI Alistair Francis
` (2 subsequent siblings)
4 siblings, 1 reply; 15+ messages in thread
From: Alistair Francis @ 2019-03-18 21:02 UTC (permalink / raw)
To: buildroot
Fix the config layout, no functional change.
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
---
configs/qemu_riscv64_virt_defconfig | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/configs/qemu_riscv64_virt_defconfig b/configs/qemu_riscv64_virt_defconfig
index 65dbef4135..596edf2fcd 100644
--- a/configs/qemu_riscv64_virt_defconfig
+++ b/configs/qemu_riscv64_virt_defconfig
@@ -4,11 +4,11 @@ BR2_RISCV_64=y
# System
BR2_SYSTEM_DHCP="eth0"
+BR2_TARGET_GENERIC_GETTY=y
+BR2_TARGET_GENERIC_GETTY_PORT="ttyS0"
# Filesystem
BR2_TARGET_ROOTFS_EXT2=y
-BR2_TARGET_GENERIC_GETTY=y
-BR2_TARGET_GENERIC_GETTY_PORT="ttyS0"
# Linux headers same as kernel, a 4.20 series
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_20=y
--
2.21.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [Buildroot] [PATCH v2 4/5] configs: qemu_riscv*: Build the kernel Image file
2019-03-18 21:02 [Buildroot] [PATCH v2 1/5] package/glibc: Update glibc 32-bit RISC-V version Alistair Francis
` (2 preceding siblings ...)
2019-03-18 21:02 ` [Buildroot] [PATCH v2 5/5] boot: riscv: Initial commit of OpenSBI Alistair Francis
@ 2019-03-18 21:02 ` Alistair Francis
2019-03-18 21:23 ` Thomas Petazzoni
2019-03-18 21:59 ` [Buildroot] [PATCH v2 1/5] package/glibc: Update glibc 32-bit RISC-V version Thomas Petazzoni
4 siblings, 1 reply; 15+ messages in thread
From: Alistair Francis @ 2019-03-18 21:02 UTC (permalink / raw)
To: buildroot
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
---
configs/qemu_riscv32_virt_defconfig | 1 +
configs/qemu_riscv64_virt_defconfig | 1 +
linux/Config.in | 2 +-
3 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/configs/qemu_riscv32_virt_defconfig b/configs/qemu_riscv32_virt_defconfig
index 6f9a61b11c..f7e9a23106 100644
--- a/configs/qemu_riscv32_virt_defconfig
+++ b/configs/qemu_riscv32_virt_defconfig
@@ -20,6 +20,7 @@ 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
diff --git a/configs/qemu_riscv64_virt_defconfig b/configs/qemu_riscv64_virt_defconfig
index 596edf2fcd..ae67979d29 100644
--- a/configs/qemu_riscv64_virt_defconfig
+++ b/configs/qemu_riscv64_virt_defconfig
@@ -19,6 +19,7 @@ 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
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] 15+ messages in thread
* [Buildroot] [PATCH v2 5/5] boot: riscv: Initial commit of OpenSBI
2019-03-18 21:02 [Buildroot] [PATCH v2 1/5] package/glibc: Update glibc 32-bit RISC-V version Alistair Francis
2019-03-18 21:02 ` [Buildroot] [PATCH v2 2/5] configs: qemu_riscv32_virt: Upgrade to 4.20 kernel Alistair Francis
2019-03-18 21:02 ` [Buildroot] [PATCH v2 3/5] configs: qemu_riscv64_virt: Fix config layout Alistair Francis
@ 2019-03-18 21:02 ` Alistair Francis
2019-03-18 21:26 ` Thomas Petazzoni
2019-03-18 21:02 ` [Buildroot] [PATCH v2 4/5] configs: qemu_riscv*: Build the kernel Image file Alistair Francis
2019-03-18 21:59 ` [Buildroot] [PATCH v2 1/5] package/glibc: Update glibc 32-bit RISC-V version Thomas Petazzoni
4 siblings, 1 reply; 15+ messages in thread
From: Alistair Francis @ 2019-03-18 21:02 UTC (permalink / raw)
To: buildroot
OpenSBI is a much improved alternative to BBL (riscv-pk). Add OpenSBI
support to buildroot.
OpenSBI is also set as the default boot loader for RISC-V.
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
---
DEVELOPERS | 1 +
board/qemu/riscv32-virt/readme.txt | 10 ++++++---
board/qemu/riscv64-virt/readme.txt | 10 ++++++---
boot/Config.in | 1 +
boot/opensbi/Config.in | 23 +++++++++++++++++++++
boot/opensbi/opensbi.mk | 32 +++++++++++++++++++++++++++++
configs/qemu_riscv32_virt_defconfig | 4 +++-
configs/qemu_riscv64_virt_defconfig | 4 +++-
8 files changed, 77 insertions(+), 8 deletions(-)
create mode 100644 boot/opensbi/Config.in
create mode 100644 boot/opensbi/opensbi.mk
diff --git a/DEVELOPERS b/DEVELOPERS
index c91325e284..72aca1a342 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -123,6 +123,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/board/qemu/riscv32-virt/readme.txt b/board/qemu/riscv32-virt/readme.txt
index 2da99580e5..f73f4278de 100644
--- a/board/qemu/riscv32-virt/readme.txt
+++ b/board/qemu/riscv32-virt/readme.txt
@@ -1,7 +1,11 @@
-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
+It is also possible to boot u-boot in QEMU. Although at the time of testing there were some issues with the OpenSBI to u-boot hand off. Run u-boot in emulation with:
+
+ qemu-system-riscv32 -M virt -kernel output/images/fw_jump.elf -device loader,file=output/images/u-boot,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
+
+Tested with QEMU 3.1
diff --git a/board/qemu/riscv64-virt/readme.txt b/board/qemu/riscv64-virt/readme.txt
index 9f6e35c867..02b6fe0506 100644
--- a/board/qemu/riscv64-virt/readme.txt
+++ b/board/qemu/riscv64-virt/readme.txt
@@ -1,7 +1,11 @@
-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
+It is also possible to boot u-boot in QEMU. Although at the time of testing there were some issues with the OpenSBI to u-boot hand off. Run u-boot in emulation with:
+
+ qemu-system-riscv64 -M virt -kernel output/images/fw_jump.elf -device loader,file=output/images/u-boot,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
+
+Tested with QEMU 3.1
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..65d39aa664
--- /dev/null
+++ b/boot/opensbi/Config.in
@@ -0,0 +1,23 @@
+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..ac4b70d8a8
--- /dev/null
+++ b/boot/opensbi/opensbi.mk
@@ -0,0 +1,32 @@
+################################################################################
+#
+# OpenSBI
+#
+################################################################################
+
+OPENSBI_VERSION = ca20ac0cd4c099006d4eea4d9ac7bd7b58e2ae0f
+OPENSBI_SITE = git://github.com/riscv/opensbi.git
+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))
diff --git a/configs/qemu_riscv32_virt_defconfig b/configs/qemu_riscv32_virt_defconfig
index f7e9a23106..96d971333a 100644
--- a/configs/qemu_riscv32_virt_defconfig
+++ b/configs/qemu_riscv32_virt_defconfig
@@ -23,4 +23,6 @@ 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 ae67979d29..05d2764003 100644
--- a/configs/qemu_riscv64_virt_defconfig
+++ b/configs/qemu_riscv64_virt_defconfig
@@ -22,4 +22,6 @@ 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] 15+ messages in thread
* [Buildroot] [PATCH v2 4/5] configs: qemu_riscv*: Build the kernel Image file
2019-03-18 21:02 ` [Buildroot] [PATCH v2 4/5] configs: qemu_riscv*: Build the kernel Image file Alistair Francis
@ 2019-03-18 21:23 ` Thomas Petazzoni
0 siblings, 0 replies; 15+ messages in thread
From: Thomas Petazzoni @ 2019-03-18 21:23 UTC (permalink / raw)
To: buildroot
Hello Alistair,
On Mon, 18 Mar 2019 21:02:04 +0000
Alistair Francis <Alistair.Francis@wdc.com> wrote:
> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
This commit should have a non-empty commit log, and should actually be
split into to:
- One allowing to enable BR2_LINUX_KERNEL_IMAGE on RISC-V
- One moving the defconfig to using OpenSBI, which requires using the
Image target if I understood correctly. As it is, the change to the
defconfigs in this commit is pretty useless: the new Image is not
generated. Worse: it probably breaks the defconfig because the Linux
kernel build no longer installs $(BINARIES_DIR)/vmlinux, which is
needed by riscv-pk. So your patch series is not bisectable.
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Buildroot] [PATCH v2 5/5] boot: riscv: Initial commit of OpenSBI
2019-03-18 21:02 ` [Buildroot] [PATCH v2 5/5] boot: riscv: Initial commit of OpenSBI Alistair Francis
@ 2019-03-18 21:26 ` Thomas Petazzoni
2019-03-18 22:10 ` Alistair Francis
0 siblings, 1 reply; 15+ messages in thread
From: Thomas Petazzoni @ 2019-03-18 21:26 UTC (permalink / raw)
To: buildroot
Hello Alistair,
On Mon, 18 Mar 2019 21:02:04 +0000
Alistair Francis <Alistair.Francis@wdc.com> wrote:
> OpenSBI is a much improved alternative to BBL (riscv-pk). Add OpenSBI
> support to buildroot.
>
> OpenSBI is also set as the default boot loader for RISC-V.
>
> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
This should be two separate commits:
- One adding boot/opensbi/ as a new package
- One updating the defconfig to use opensbi (and the new Image kernel
format)
So overall, you should have the following commits:
linux: allow BR2_LINUX_KERNEL_IMAGE on RISC-V
boot/opensbi: new package
configs/qemu_riscv*_virt: use opensbi instead of riscv-pk
> N: Alvaro G. M <alvaro.gamez@hazent.com>
> diff --git a/board/qemu/riscv32-virt/readme.txt b/board/qemu/riscv32-virt/readme.txt
> index 2da99580e5..f73f4278de 100644
> --- a/board/qemu/riscv32-virt/readme.txt
> +++ b/board/qemu/riscv32-virt/readme.txt
> @@ -1,7 +1,11 @@
> -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
> +It is also possible to boot u-boot in QEMU. Although at the time of testing there were some issues with the OpenSBI to u-boot hand off. Run u-boot in emulation with:
> +
> + qemu-system-riscv32 -M virt -kernel output/images/fw_jump.elf -device loader,file=output/images/u-boot,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 defconfig is not building U-Boot for RISC-V, so this part is not
relevant in this readme.txt.
> +It is also possible to boot u-boot in QEMU. Although at the time of testing there were some issues with the OpenSBI to u-boot hand off. Run u-boot in emulation with:
> +
> + qemu-system-riscv64 -M virt -kernel output/images/fw_jump.elf -device loader,file=output/images/u-boot,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
Ditto.
> diff --git a/boot/opensbi/Config.in b/boot/opensbi/Config.in
> new file mode 100644
> index 0000000000..65d39aa664
> --- /dev/null
> +++ b/boot/opensbi/Config.in
> @@ -0,0 +1,23 @@
> +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.
I'm pretty sure "make check-package" would whine here about the lines
being too long. Could you make sure to run "make check-package" before
your next submission ?
> +OPENSBI_PLAT = $(call qstrip,$(BR2_TARGET_OPENSBI_PLAT))
> +ifneq ($(OPENSBI_PLAT),)
> + OPENSBI_MAKE_ENV += PLATFORM=$(OPENSBI_PLAT)
No indentation here.
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Buildroot] [PATCH v2 1/5] package/glibc: Update glibc 32-bit RISC-V version
2019-03-18 21:02 [Buildroot] [PATCH v2 1/5] package/glibc: Update glibc 32-bit RISC-V version Alistair Francis
` (3 preceding siblings ...)
2019-03-18 21:02 ` [Buildroot] [PATCH v2 4/5] configs: qemu_riscv*: Build the kernel Image file Alistair Francis
@ 2019-03-18 21:59 ` Thomas Petazzoni
4 siblings, 0 replies; 15+ messages in thread
From: Thomas Petazzoni @ 2019-03-18 21:59 UTC (permalink / raw)
To: buildroot
On Mon, 18 Mar 2019 21:02:02 +0000
Alistair Francis <Alistair.Francis@wdc.com> wrote:
> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
> ---
> .../glibc.hash | 2 +-
> ...C-V-32-bit-build-of-riscv-glibc-2.26.patch | 59 -------------------
> ...rror-that-breaks-RISC-V-architecture.patch | 39 ------------
> package/glibc/glibc.mk | 2 +-
> 4 files changed, 2 insertions(+), 100 deletions(-)
> rename package/glibc/{4e2943456e690d89f48e6e710757dd09404b0c9a => 06983fe52cfe8e4779035c27e8cc5d2caab31531}/glibc.hash (71%)
> delete mode 100644 package/glibc/4e2943456e690d89f48e6e710757dd09404b0c9a/0001-Fix-RISC-V-32-bit-build-of-riscv-glibc-2.26.patch
> delete mode 100644 package/glibc/4e2943456e690d89f48e6e710757dd09404b0c9a/0002-Fix-mcontext_t-error-that-breaks-RISC-V-architecture.patch
Applied to master, thanks.
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Buildroot] [PATCH v2 2/5] configs: qemu_riscv32_virt: Upgrade to 4.20 kernel
2019-03-18 21:02 ` [Buildroot] [PATCH v2 2/5] configs: qemu_riscv32_virt: Upgrade to 4.20 kernel Alistair Francis
@ 2019-03-18 21:59 ` Thomas Petazzoni
2019-03-19 15:20 ` Mark Corbin
1 sibling, 0 replies; 15+ messages in thread
From: Thomas Petazzoni @ 2019-03-18 21:59 UTC (permalink / raw)
To: buildroot
On Mon, 18 Mar 2019 21:02:02 +0000
Alistair Francis <Alistair.Francis@wdc.com> wrote:
> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
> ---
> configs/qemu_riscv32_virt_defconfig | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
Applied to master, thanks.
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Buildroot] [PATCH v2 3/5] configs: qemu_riscv64_virt: Fix config layout
2019-03-18 21:02 ` [Buildroot] [PATCH v2 3/5] configs: qemu_riscv64_virt: Fix config layout Alistair Francis
@ 2019-03-18 21:59 ` Thomas Petazzoni
0 siblings, 0 replies; 15+ messages in thread
From: Thomas Petazzoni @ 2019-03-18 21:59 UTC (permalink / raw)
To: buildroot
On Mon, 18 Mar 2019 21:02:03 +0000
Alistair Francis <Alistair.Francis@wdc.com> wrote:
> Fix the config layout, no functional change.
>
> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
> ---
> configs/qemu_riscv64_virt_defconfig | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Applied to master, thanks.
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Buildroot] [PATCH v2 5/5] boot: riscv: Initial commit of OpenSBI
2019-03-18 21:26 ` Thomas Petazzoni
@ 2019-03-18 22:10 ` Alistair Francis
0 siblings, 0 replies; 15+ messages in thread
From: Alistair Francis @ 2019-03-18 22:10 UTC (permalink / raw)
To: buildroot
On Mon, Mar 18, 2019 at 2:26 PM Thomas Petazzoni
<thomas.petazzoni@bootlin.com> wrote:
>
> Hello Alistair,
>
> On Mon, 18 Mar 2019 21:02:04 +0000
> Alistair Francis <Alistair.Francis@wdc.com> wrote:
>
> > OpenSBI is a much improved alternative to BBL (riscv-pk). Add OpenSBI
> > support to buildroot.
> >
> > OpenSBI is also set as the default boot loader for RISC-V.
> >
> > Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
>
> This should be two separate commits:
>
> - One adding boot/opensbi/ as a new package
>
> - One updating the defconfig to use opensbi (and the new Image kernel
> format)
>
> So overall, you should have the following commits:
>
> linux: allow BR2_LINUX_KERNEL_IMAGE on RISC-V
> boot/opensbi: new package
> configs/qemu_riscv*_virt: use opensbi instead of riscv-pk
Done, will be fixed in v3.
>
>
> > N: Alvaro G. M <alvaro.gamez@hazent.com>
> > diff --git a/board/qemu/riscv32-virt/readme.txt b/board/qemu/riscv32-virt/readme.txt
> > index 2da99580e5..f73f4278de 100644
> > --- a/board/qemu/riscv32-virt/readme.txt
> > +++ b/board/qemu/riscv32-virt/readme.txt
> > @@ -1,7 +1,11 @@
> > -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
> > +It is also possible to boot u-boot in QEMU. Although at the time of testing there were some issues with the OpenSBI to u-boot hand off. Run u-boot in emulation with:
> > +
> > + qemu-system-riscv32 -M virt -kernel output/images/fw_jump.elf -device loader,file=output/images/u-boot,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 defconfig is not building U-Boot for RISC-V, so this part is not
> relevant in this readme.txt.
Although I think it makes sense to leave in for those who are
interested in booting u-boot, I will remove it.
>
> > +It is also possible to boot u-boot in QEMU. Although at the time of testing there were some issues with the OpenSBI to u-boot hand off. Run u-boot in emulation with:
> > +
> > + qemu-system-riscv64 -M virt -kernel output/images/fw_jump.elf -device loader,file=output/images/u-boot,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
>
> Ditto.
>
> > diff --git a/boot/opensbi/Config.in b/boot/opensbi/Config.in
> > new file mode 100644
> > index 0000000000..65d39aa664
> > --- /dev/null
> > +++ b/boot/opensbi/Config.in
> > @@ -0,0 +1,23 @@
> > +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.
>
> I'm pretty sure "make check-package" would whine here about the lines
> being too long. Could you make sure to run "make check-package" before
> your next submission ?
Yep, I didn't know that was an option.
>
> > +OPENSBI_PLAT = $(call qstrip,$(BR2_TARGET_OPENSBI_PLAT))
> > +ifneq ($(OPENSBI_PLAT),)
> > + OPENSBI_MAKE_ENV += PLATFORM=$(OPENSBI_PLAT)
>
> No indentation here.
Fixed.
Alistair
>
> Thanks!
>
> Thomas
> --
> Thomas Petazzoni, CTO, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Buildroot] [PATCH v2 2/5] configs: qemu_riscv32_virt: Upgrade to 4.20 kernel
2019-03-18 21:02 ` [Buildroot] [PATCH v2 2/5] configs: qemu_riscv32_virt: Upgrade to 4.20 kernel Alistair Francis
2019-03-18 21:59 ` Thomas Petazzoni
@ 2019-03-19 15:20 ` Mark Corbin
2019-03-19 18:02 ` Alistair Francis
1 sibling, 1 reply; 15+ messages in thread
From: Mark Corbin @ 2019-03-19 15:20 UTC (permalink / raw)
To: buildroot
Hello Alistair
On 18/03/2019 21:02, Alistair Francis wrote:
> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
> ---
> configs/qemu_riscv32_virt_defconfig | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/configs/qemu_riscv32_virt_defconfig b/configs/qemu_riscv32_virt_defconfig
> index fb37da6a89..6f9a61b11c 100644
> --- a/configs/qemu_riscv32_virt_defconfig
> +++ b/configs/qemu_riscv32_virt_defconfig
> @@ -10,14 +10,14 @@ BR2_TARGET_GENERIC_GETTY_PORT="ttyS0"
> # Filesystem
> BR2_TARGET_ROOTFS_EXT2=y
>
> -# Linux headers same as kernel, a 4.15 series
> -BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_15=y
> +# Linux headers same as kernel, a 4.20 series
> +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_20=y
>
> # Kernel
> BR2_LINUX_KERNEL=y
> 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="fe92d7905c6ea0ebeabeb725b8040754ede7c220"
> +BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="8fe28cb58bcb235034b64cbbb7550a8a43fd88be"
I wasn't sure that the 4.20 kernel worked for riscv32 under qemu which
is probably why it wasn't bumped from 4.15 in January when the
qemu_riscv64_virt_defconfig kernel version was.
How did you manage to test this? I've tried both qemu 2.12.0 and 3.1.0
and neither version will boot the resulting kernel.
Regards
Mark
--
Mark Corbin
Embecosm Ltd.
https://www.embecosm.com
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Buildroot] [PATCH v2 2/5] configs: qemu_riscv32_virt: Upgrade to 4.20 kernel
2019-03-19 15:20 ` Mark Corbin
@ 2019-03-19 18:02 ` Alistair Francis
2019-03-19 18:14 ` Alistair Francis
2019-03-19 20:05 ` Mark Corbin
0 siblings, 2 replies; 15+ messages in thread
From: Alistair Francis @ 2019-03-19 18:02 UTC (permalink / raw)
To: buildroot
On Tue, Mar 19, 2019 at 8:20 AM Mark Corbin <mark.corbin@embecosm.com> wrote:
>
> Hello Alistair
>
> On 18/03/2019 21:02, Alistair Francis wrote:
> > Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
> > ---
> > configs/qemu_riscv32_virt_defconfig | 6 +++---
> > 1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/configs/qemu_riscv32_virt_defconfig b/configs/qemu_riscv32_virt_defconfig
> > index fb37da6a89..6f9a61b11c 100644
> > --- a/configs/qemu_riscv32_virt_defconfig
> > +++ b/configs/qemu_riscv32_virt_defconfig
> > @@ -10,14 +10,14 @@ BR2_TARGET_GENERIC_GETTY_PORT="ttyS0"
> > # Filesystem
> > BR2_TARGET_ROOTFS_EXT2=y
> >
> > -# Linux headers same as kernel, a 4.15 series
> > -BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_15=y
> > +# Linux headers same as kernel, a 4.20 series
> > +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_20=y
> >
> > # Kernel
> > BR2_LINUX_KERNEL=y
> > 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="fe92d7905c6ea0ebeabeb725b8040754ede7c220"
> > +BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="8fe28cb58bcb235034b64cbbb7550a8a43fd88be"
>
> I wasn't sure that the 4.20 kernel worked for riscv32 under qemu which
> is probably why it wasn't bumped from 4.15 in January when the
> qemu_riscv64_virt_defconfig kernel version was.
>
> How did you manage to test this? I've tried both qemu 2.12.0 and 3.1.0
> and neither version will boot the resulting kernel.
I just tested this again and here are my results. All running on QEMU
3.1.0 and using OpenSBI
With current master + my OpenSBI patches -> I can boot the 4.20
kernel, but it never gets to a login prompt.
With current master + my OpenSBI patches + defconfig update -> I can
boot the 4.20 kernel and I get to a login prompt.
I did some of my original tests with an updated defconfig but I
thought I tested without any changed. I'll send a patch to update the
defconfig.
Alistair
>
> Regards
>
> Mark
>
> --
> Mark Corbin
> Embecosm Ltd.
> https://www.embecosm.com
>
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Buildroot] [PATCH v2 2/5] configs: qemu_riscv32_virt: Upgrade to 4.20 kernel
2019-03-19 18:02 ` Alistair Francis
@ 2019-03-19 18:14 ` Alistair Francis
2019-03-19 20:05 ` Mark Corbin
1 sibling, 0 replies; 15+ messages in thread
From: Alistair Francis @ 2019-03-19 18:14 UTC (permalink / raw)
To: buildroot
On Tue, Mar 19, 2019 at 11:02 AM Alistair Francis <alistair23@gmail.com> wrote:
>
> On Tue, Mar 19, 2019 at 8:20 AM Mark Corbin <mark.corbin@embecosm.com> wrote:
> >
> > Hello Alistair
> >
> > On 18/03/2019 21:02, Alistair Francis wrote:
> > > Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
> > > ---
> > > configs/qemu_riscv32_virt_defconfig | 6 +++---
> > > 1 file changed, 3 insertions(+), 3 deletions(-)
> > >
> > > diff --git a/configs/qemu_riscv32_virt_defconfig b/configs/qemu_riscv32_virt_defconfig
> > > index fb37da6a89..6f9a61b11c 100644
> > > --- a/configs/qemu_riscv32_virt_defconfig
> > > +++ b/configs/qemu_riscv32_virt_defconfig
> > > @@ -10,14 +10,14 @@ BR2_TARGET_GENERIC_GETTY_PORT="ttyS0"
> > > # Filesystem
> > > BR2_TARGET_ROOTFS_EXT2=y
> > >
> > > -# Linux headers same as kernel, a 4.15 series
> > > -BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_15=y
> > > +# Linux headers same as kernel, a 4.20 series
> > > +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_20=y
> > >
> > > # Kernel
> > > BR2_LINUX_KERNEL=y
> > > 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="fe92d7905c6ea0ebeabeb725b8040754ede7c220"
> > > +BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="8fe28cb58bcb235034b64cbbb7550a8a43fd88be"
> >
> > I wasn't sure that the 4.20 kernel worked for riscv32 under qemu which
> > is probably why it wasn't bumped from 4.15 in January when the
> > qemu_riscv64_virt_defconfig kernel version was.
> >
> > How did you manage to test this? I've tried both qemu 2.12.0 and 3.1.0
> > and neither version will boot the resulting kernel.
>
> I just tested this again and here are my results. All running on QEMU
> 3.1.0 and using OpenSBI
>
> With current master + my OpenSBI patches -> I can boot the 4.20
> kernel, but it never gets to a login prompt.
>
> With current master + my OpenSBI patches + defconfig update -> I can
> boot the 4.20 kernel and I get to a login prompt.
>
> I did some of my original tests with an updated defconfig but I
> thought I tested without any changed. I'll send a patch to update the
> defconfig.
I even tested BBL with my v4 series that I'm about to send and that
boots to a login prompt.
So everything should work with the updated config.
Alistair
>
> Alistair
>
> >
> > Regards
> >
> > Mark
> >
> > --
> > Mark Corbin
> > Embecosm Ltd.
> > https://www.embecosm.com
> >
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Buildroot] [PATCH v2 2/5] configs: qemu_riscv32_virt: Upgrade to 4.20 kernel
2019-03-19 18:02 ` Alistair Francis
2019-03-19 18:14 ` Alistair Francis
@ 2019-03-19 20:05 ` Mark Corbin
1 sibling, 0 replies; 15+ messages in thread
From: Mark Corbin @ 2019-03-19 20:05 UTC (permalink / raw)
To: buildroot
Hello Alistair
On 19/03/2019 18:02, Alistair Francis wrote:
> On Tue, Mar 19, 2019 at 8:20 AM Mark Corbin <mark.corbin@embecosm.com> wrote:
>> Hello Alistair
>>
>> On 18/03/2019 21:02, Alistair Francis wrote:
>>> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
>>> ---
>>> configs/qemu_riscv32_virt_defconfig | 6 +++---
>>> 1 file changed, 3 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/configs/qemu_riscv32_virt_defconfig b/configs/qemu_riscv32_virt_defconfig
>>> index fb37da6a89..6f9a61b11c 100644
>>> --- a/configs/qemu_riscv32_virt_defconfig
>>> +++ b/configs/qemu_riscv32_virt_defconfig
>>> @@ -10,14 +10,14 @@ BR2_TARGET_GENERIC_GETTY_PORT="ttyS0"
>>> # Filesystem
>>> BR2_TARGET_ROOTFS_EXT2=y
>>>
>>> -# Linux headers same as kernel, a 4.15 series
>>> -BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_15=y
>>> +# Linux headers same as kernel, a 4.20 series
>>> +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_20=y
>>>
>>> # Kernel
>>> BR2_LINUX_KERNEL=y
>>> 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="fe92d7905c6ea0ebeabeb725b8040754ede7c220"
>>> +BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="8fe28cb58bcb235034b64cbbb7550a8a43fd88be"
>> I wasn't sure that the 4.20 kernel worked for riscv32 under qemu which
>> is probably why it wasn't bumped from 4.15 in January when the
>> qemu_riscv64_virt_defconfig kernel version was.
>>
>> How did you manage to test this? I've tried both qemu 2.12.0 and 3.1.0
>> and neither version will boot the resulting kernel.
> I just tested this again and here are my results. All running on QEMU
> 3.1.0 and using OpenSBI
>
> With current master + my OpenSBI patches -> I can boot the 4.20
> kernel, but it never gets to a login prompt.
This is what happens for me when I build and test from master - no login
prompt. I guess that it's because your qemu_riscv32_virt_defconfig
kernel version update has been checked-in without the necessary opensbi
or config updates.
Regards
Mark
--
Mark Corbin
Embecosm Ltd.
https://www.embecosm.com
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2019-03-19 20:05 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-18 21:02 [Buildroot] [PATCH v2 1/5] package/glibc: Update glibc 32-bit RISC-V version Alistair Francis
2019-03-18 21:02 ` [Buildroot] [PATCH v2 2/5] configs: qemu_riscv32_virt: Upgrade to 4.20 kernel Alistair Francis
2019-03-18 21:59 ` Thomas Petazzoni
2019-03-19 15:20 ` Mark Corbin
2019-03-19 18:02 ` Alistair Francis
2019-03-19 18:14 ` Alistair Francis
2019-03-19 20:05 ` Mark Corbin
2019-03-18 21:02 ` [Buildroot] [PATCH v2 3/5] configs: qemu_riscv64_virt: Fix config layout Alistair Francis
2019-03-18 21:59 ` Thomas Petazzoni
2019-03-18 21:02 ` [Buildroot] [PATCH v2 5/5] boot: riscv: Initial commit of OpenSBI Alistair Francis
2019-03-18 21:26 ` Thomas Petazzoni
2019-03-18 22:10 ` Alistair Francis
2019-03-18 21:02 ` [Buildroot] [PATCH v2 4/5] configs: qemu_riscv*: Build the kernel Image file Alistair Francis
2019-03-18 21:23 ` Thomas Petazzoni
2019-03-18 21:59 ` [Buildroot] [PATCH v2 1/5] package/glibc: Update glibc 32-bit RISC-V version Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox