[PATCH 1/4] travis: Remove qemu-riscv64 testing

As of today there is no pre-built UEFI GRUB image for RISC-V 32/64 available on the internet, and with travis-ci we don't build GRUB images like we do for azure and gitlab.
Remove qemu-riscv64 testing temporarily.
Signed-off-by: Bin Meng bmeng.cn@gmail.com ---
.travis.yml | 7 ------- 1 file changed, 7 deletions(-)
diff --git a/.travis.yml b/.travis.yml index c59bd77..55b94cf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -481,13 +481,6 @@ matrix: QEMU_TARGET="ppc-softmmu" BUILDMAN="^qemu-ppce500$" TOOLCHAIN="powerpc" - - name: "test/py qemu-riscv64" - env: - - TEST_PY_BD="qemu-riscv64" - TEST_PY_TEST_SPEC="not sleep" - QEMU_TARGET="riscv64-softmmu" - BUILDMAN="^qemu-riscv64$" - TOOLCHAIN="riscv" - name: "test/py qemu-x86" env: - TEST_PY_BD="qemu-x86"

This adds the qemu-riscv32_defconfig test configuration.
Signed-off-by: Bin Meng bmeng.cn@gmail.com ---
.azure-pipelines.yml | 5 +++++ .gitlab-ci.yml | 9 +++++++++ 2 files changed, 14 insertions(+)
diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml index f66d58a..99a93cc 100644 --- a/.azure-pipelines.yml +++ b/.azure-pipelines.yml @@ -215,6 +215,10 @@ jobs: TEST_PY_BD: "qemu-ppce500" TEST_PY_TEST_SPEC: "not sleep" BUILDMAN: "^qemu-ppce500$" + qemu_riscv32: + TEST_PY_BD: "qemu-riscv32" + TEST_PY_TEST_SPEC: "not sleep" + BUILDMAN: "^qemu-riscv32$" qemu_riscv64: TEST_PY_BD: "qemu-riscv64" TEST_PY_TEST_SPEC: "not sleep" @@ -263,6 +267,7 @@ jobs: grub-mkimage --prefix="" -o ~/grub_x86.efi -O i386-efi normal echo lsefimmap lsefi lsefisystab efinet tftp minicmd grub-mkimage --prefix="" -o ~/grub_x64.efi -O x86_64-efi normal echo lsefimmap lsefi lsefisystab efinet tftp minicmd cp /opt/grub/grubriscv64.efi ~/grub_riscv64.efi + cp /opt/grub/grubriscv32.efi ~/grub_riscv32.efi cp /opt/grub/grubaa64.efi ~/grub_arm64.efi cp /opt/grub/grubarm.efi ~/grub_arm.efi # the below corresponds to .gitlab-ci.yml "script" diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 55943bb..39437ce 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -21,6 +21,7 @@ stages: - grub-mkimage --prefix="" -o ~/grub_x86.efi -O i386-efi normal echo lsefimmap lsefi lsefisystab efinet tftp minicmd - grub-mkimage --prefix="" -o ~/grub_x64.efi -O x86_64-efi normal echo lsefimmap lsefi lsefisystab efinet tftp minicmd - cp /opt/grub/grubriscv64.efi ~/grub_riscv64.efi + - cp /opt/grub/grubriscv32.efi ~/grub_riscv32.efi - cp /opt/grub/grubaa64.efi ~/grub_arm64.efi - cp /opt/grub/grubarm.efi ~/grub_arm.efi
@@ -296,6 +297,14 @@ qemu-ppce500 test.py: BUILDMAN: "^qemu-ppce500$" <<: *buildman_and_testpy_dfn
+qemu-riscv32 test.py: + tags: [ 'all' ] + variables: + TEST_PY_BD: "qemu-riscv32" + TEST_PY_TEST_SPEC: "not sleep" + BUILDMAN: "^qemu-riscv32$" + <<: *buildman_and_testpy_dfn + qemu-riscv64 test.py: tags: [ 'all' ] variables:

On some RISC-V targets the low memory is protected that prevents S-mode U-Boot from access.
Signed-off-by: Bin Meng bmeng.cn@gmail.com ---
test/py/u_boot_utils.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/test/py/u_boot_utils.py b/test/py/u_boot_utils.py index bf2a0fc..939d82e 100644 --- a/test/py/u_boot_utils.py +++ b/test/py/u_boot_utils.py @@ -237,10 +237,11 @@ def find_ram_base(u_boot_console): raise Exception('Failed to find RAM bank start in `bdinfo`')
# We don't want ram_base to be zero as some functions test if the given - # address is NULL (0). Let's add 2MiB then (size of an ARM LPAE/v8 section). + # address is NULL (0). Besides, on some RISC-V targets the low memory + # is protected that prevents S-mode U-Boot from access. + # Let's add 2MiB then (size of an ARM LPAE/v8 section).
- if ram_base == 0: - ram_base += 1024 * 1024 * 2 + ram_base += 1024 * 1024 * 2
return ram_base

This adds QEMU RISC-V 32/64 SPL testing. Unlike QEMU RISC-V 32/64, we test SPL running in M-mode and U-Boot proper running in S-mode, with a 4-core SMP configuration.
Signed-off-by: Bin Meng bmeng.cn@gmail.com ---
.azure-pipelines.yml | 16 ++++++++++++++++ .gitlab-ci.yml | 24 ++++++++++++++++++++++++ 2 files changed, 40 insertions(+)
diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml index 99a93cc..55a2d75 100644 --- a/.azure-pipelines.yml +++ b/.azure-pipelines.yml @@ -223,6 +223,14 @@ jobs: TEST_PY_BD: "qemu-riscv64" TEST_PY_TEST_SPEC: "not sleep" BUILDMAN: "^qemu-riscv64$" + qemu_riscv32_spl: + TEST_PY_BD: "qemu-riscv32_spl" + TEST_PY_TEST_SPEC: "not sleep" + BUILDMAN: "^qemu-riscv32_spl$" + qemu_riscv64_spl: + TEST_PY_BD: "qemu-riscv64_spl" + TEST_PY_TEST_SPEC: "not sleep" + BUILDMAN: "^qemu-riscv64_spl$" qemu_x86: TEST_PY_BD: "qemu-x86" TEST_PY_TEST_SPEC: "not sleep" @@ -270,6 +278,14 @@ jobs: cp /opt/grub/grubriscv32.efi ~/grub_riscv32.efi cp /opt/grub/grubaa64.efi ~/grub_arm64.efi cp /opt/grub/grubarm.efi ~/grub_arm.efi + if [[ "${TEST_PY_BD}" == "qemu-riscv32_spl" ]]; then + wget -O - https://github.com/riscv/opensbi/releases/download/v0.6/opensbi-0.6-rv32-bin... | tar -C /tmp -xJ + export OPENSBI=/tmp/opensbi-0.6-rv32-bin/platform/qemu/virt/firmware/fw_dynamic.bin + fi + if [[ "${TEST_PY_BD}" == "qemu-riscv64_spl" ]]; then + wget -O - https://github.com/riscv/opensbi/releases/download/v0.6/opensbi-0.6-rv64-bin... | tar -C /tmp -xJ + export OPENSBI=/tmp/opensbi-0.6-rv64-bin/platform/qemu/virt/firmware/fw_dynamic.bin + fi # the below corresponds to .gitlab-ci.yml "script" cd ${WORK_DIR} if [[ "${BUILDMAN}" != "" ]]; then diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 39437ce..a393a10 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -24,6 +24,14 @@ stages: - cp /opt/grub/grubriscv32.efi ~/grub_riscv32.efi - cp /opt/grub/grubaa64.efi ~/grub_arm64.efi - cp /opt/grub/grubarm.efi ~/grub_arm.efi + - if [[ "${TEST_PY_BD}" == "qemu-riscv32_spl" ]]; then + wget -O - https://github.com/riscv/opensbi/releases/download/v0.6/opensbi-0.6-rv32-bin... | tar -C /tmp -xJ + export OPENSBI=/tmp/opensbi-0.6-rv32-bin/platform/qemu/virt/firmware/fw_dynamic.bin + fi + - if [[ "${TEST_PY_BD}" == "qemu-riscv64_spl" ]]; then + wget -O - https://github.com/riscv/opensbi/releases/download/v0.6/opensbi-0.6-rv64-bin... | tar -C /tmp -xJ + export OPENSBI=/tmp/opensbi-0.6-rv64-bin/platform/qemu/virt/firmware/fw_dynamic.bin + fi
after_script: - rm -rf /tmp/uboot-test-hooks /tmp/venv @@ -313,6 +321,22 @@ qemu-riscv64 test.py: BUILDMAN: "^qemu-riscv64$" <<: *buildman_and_testpy_dfn
+qemu-riscv32_spl test.py: + tags: [ 'all' ] + variables: + TEST_PY_BD: "qemu-riscv32_spl" + TEST_PY_TEST_SPEC: "not sleep" + BUILDMAN: "^qemu-riscv32_spl$" + <<: *buildman_and_testpy_dfn + +qemu-riscv64_spl test.py: + tags: [ 'all' ] + variables: + TEST_PY_BD: "qemu-riscv64_spl" + TEST_PY_TEST_SPEC: "not sleep" + BUILDMAN: "^qemu-riscv64_spl$" + <<: *buildman_and_testpy_dfn + qemu-x86 test.py: tags: [ 'all' ] variables:

On Thu, Mar 26, 2020 at 09:05:21AM -0700, Bin Meng wrote:
As of today there is no pre-built UEFI GRUB image for RISC-V 32/64 available on the internet, and with travis-ci we don't build GRUB images like we do for azure and gitlab.
Remove qemu-riscv64 testing temporarily.
Signed-off-by: Bin Meng bmeng.cn@gmail.com
.travis.yml | 7 ------- 1 file changed, 7 deletions(-)
diff --git a/.travis.yml b/.travis.yml index c59bd77..55b94cf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -481,13 +481,6 @@ matrix: QEMU_TARGET="ppc-softmmu" BUILDMAN="^qemu-ppce500$" TOOLCHAIN="powerpc"
- name: "test/py qemu-riscv64"
env:
- TEST_PY_BD="qemu-riscv64"
TEST_PY_TEST_SPEC="not sleep"
QEMU_TARGET="riscv64-softmmu"
BUILDMAN="^qemu-riscv64$"
TOOLCHAIN="riscv"
- name: "test/py qemu-x86" env:
- TEST_PY_BD="qemu-x86"
But why are we removing this? We run all of the rest of the test suites and I don't think this one test adds noticeably to the overall Travis time. Thanks!

Hi Tom,
On Fri, Mar 27, 2020 at 12:10 AM Tom Rini trini@konsulko.com wrote:
On Thu, Mar 26, 2020 at 09:05:21AM -0700, Bin Meng wrote:
As of today there is no pre-built UEFI GRUB image for RISC-V 32/64 available on the internet, and with travis-ci we don't build GRUB images like we do for azure and gitlab.
Remove qemu-riscv64 testing temporarily.
Signed-off-by: Bin Meng bmeng.cn@gmail.com
.travis.yml | 7 ------- 1 file changed, 7 deletions(-)
diff --git a/.travis.yml b/.travis.yml index c59bd77..55b94cf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -481,13 +481,6 @@ matrix: QEMU_TARGET="ppc-softmmu" BUILDMAN="^qemu-ppce500$" TOOLCHAIN="powerpc"
- name: "test/py qemu-riscv64"
env:
- TEST_PY_BD="qemu-riscv64"
TEST_PY_TEST_SPEC="not sleep"
QEMU_TARGET="riscv64-softmmu"
BUILDMAN="^qemu-riscv64$"
TOOLCHAIN="riscv"
- name: "test/py qemu-x86" env:
- TEST_PY_BD="qemu-x86"
But why are we removing this? We run all of the rest of the test suites and I don't think this one test adds noticeably to the overall Travis time. Thanks!
The reason was mentioned in the commit message.
As of today there is no pre-built UEFI GRUB image for RISC-V 32/64 available on the internet, and with travis-ci we don't build GRUB images like we do for azure and gitlab.
Do you want to build GRUB image in travis, like what's done in the docker image used for azure/gitlab?
Regards, Bin

On Fri, Mar 27, 2020 at 09:51:03AM +0800, Bin Meng wrote:
Hi Tom,
On Fri, Mar 27, 2020 at 12:10 AM Tom Rini trini@konsulko.com wrote:
On Thu, Mar 26, 2020 at 09:05:21AM -0700, Bin Meng wrote:
As of today there is no pre-built UEFI GRUB image for RISC-V 32/64 available on the internet, and with travis-ci we don't build GRUB images like we do for azure and gitlab.
Remove qemu-riscv64 testing temporarily.
Signed-off-by: Bin Meng bmeng.cn@gmail.com
.travis.yml | 7 ------- 1 file changed, 7 deletions(-)
diff --git a/.travis.yml b/.travis.yml index c59bd77..55b94cf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -481,13 +481,6 @@ matrix: QEMU_TARGET="ppc-softmmu" BUILDMAN="^qemu-ppce500$" TOOLCHAIN="powerpc"
- name: "test/py qemu-riscv64"
env:
- TEST_PY_BD="qemu-riscv64"
TEST_PY_TEST_SPEC="not sleep"
QEMU_TARGET="riscv64-softmmu"
BUILDMAN="^qemu-riscv64$"
TOOLCHAIN="riscv"
- name: "test/py qemu-x86" env:
- TEST_PY_BD="qemu-x86"
But why are we removing this? We run all of the rest of the test suites and I don't think this one test adds noticeably to the overall Travis time. Thanks!
The reason was mentioned in the commit message.
As of today there is no pre-built UEFI GRUB image for RISC-V 32/64 available on the internet, and with travis-ci we don't build GRUB images like we do for azure and gitlab.
Do you want to build GRUB image in travis, like what's done in the docker image used for azure/gitlab?
But this isn't just for testing GRUB via UEFI, it runs our test/py suite too. And that's worth doing, right?

Hi Tom,
On Fri, Mar 27, 2020 at 10:01 AM Tom Rini trini@konsulko.com wrote:
On Fri, Mar 27, 2020 at 09:51:03AM +0800, Bin Meng wrote:
Hi Tom,
On Fri, Mar 27, 2020 at 12:10 AM Tom Rini trini@konsulko.com wrote:
On Thu, Mar 26, 2020 at 09:05:21AM -0700, Bin Meng wrote:
As of today there is no pre-built UEFI GRUB image for RISC-V 32/64 available on the internet, and with travis-ci we don't build GRUB images like we do for azure and gitlab.
Remove qemu-riscv64 testing temporarily.
Signed-off-by: Bin Meng bmeng.cn@gmail.com
.travis.yml | 7 ------- 1 file changed, 7 deletions(-)
diff --git a/.travis.yml b/.travis.yml index c59bd77..55b94cf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -481,13 +481,6 @@ matrix: QEMU_TARGET="ppc-softmmu" BUILDMAN="^qemu-ppce500$" TOOLCHAIN="powerpc"
- name: "test/py qemu-riscv64"
env:
- TEST_PY_BD="qemu-riscv64"
TEST_PY_TEST_SPEC="not sleep"
QEMU_TARGET="riscv64-softmmu"
BUILDMAN="^qemu-riscv64$"
TOOLCHAIN="riscv"
- name: "test/py qemu-x86" env:
- TEST_PY_BD="qemu-x86"
But why are we removing this? We run all of the rest of the test suites and I don't think this one test adds noticeably to the overall Travis time. Thanks!
The reason was mentioned in the commit message.
As of today there is no pre-built UEFI GRUB image for RISC-V 32/64 available on the internet, and with travis-ci we don't build GRUB images like we do for azure and gitlab.
Do you want to build GRUB image in travis, like what's done in the docker image used for azure/gitlab?
But this isn't just for testing GRUB via UEFI, it runs our test/py suite too. And that's worth doing, right?
Yes, and this testing is covered in azure/gitlab. The issue is that whether we need build GRUB in travis. If yes, I can update the travis scripts to sync with azure/gitlab.
Regards, Bin

On Fri, Mar 27, 2020 at 10:19:05AM +0800, Bin Meng wrote:
Hi Tom,
On Fri, Mar 27, 2020 at 10:01 AM Tom Rini trini@konsulko.com wrote:
On Fri, Mar 27, 2020 at 09:51:03AM +0800, Bin Meng wrote:
Hi Tom,
On Fri, Mar 27, 2020 at 12:10 AM Tom Rini trini@konsulko.com wrote:
On Thu, Mar 26, 2020 at 09:05:21AM -0700, Bin Meng wrote:
As of today there is no pre-built UEFI GRUB image for RISC-V 32/64 available on the internet, and with travis-ci we don't build GRUB images like we do for azure and gitlab.
Remove qemu-riscv64 testing temporarily.
Signed-off-by: Bin Meng bmeng.cn@gmail.com
.travis.yml | 7 ------- 1 file changed, 7 deletions(-)
diff --git a/.travis.yml b/.travis.yml index c59bd77..55b94cf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -481,13 +481,6 @@ matrix: QEMU_TARGET="ppc-softmmu" BUILDMAN="^qemu-ppce500$" TOOLCHAIN="powerpc"
- name: "test/py qemu-riscv64"
env:
- TEST_PY_BD="qemu-riscv64"
TEST_PY_TEST_SPEC="not sleep"
QEMU_TARGET="riscv64-softmmu"
BUILDMAN="^qemu-riscv64$"
TOOLCHAIN="riscv"
- name: "test/py qemu-x86" env:
- TEST_PY_BD="qemu-x86"
But why are we removing this? We run all of the rest of the test suites and I don't think this one test adds noticeably to the overall Travis time. Thanks!
The reason was mentioned in the commit message.
As of today there is no pre-built UEFI GRUB image for RISC-V 32/64 available on the internet, and with travis-ci we don't build GRUB images like we do for azure and gitlab.
Do you want to build GRUB image in travis, like what's done in the docker image used for azure/gitlab?
But this isn't just for testing GRUB via UEFI, it runs our test/py suite too. And that's worth doing, right?
Yes, and this testing is covered in azure/gitlab. The issue is that whether we need build GRUB in travis. If yes, I can update the travis scripts to sync with azure/gitlab.
So you're trying to keep them all consistent in terms of what's covered. I'm not sure that's viable and we have other cases where I believe some tests aren't run in Travis but only gitlab such as the filesystem tests.

On Thu, Mar 26, 2020 at 6:06 PM Bin Meng bmeng.cn@gmail.com wrote:
As of today there is no pre-built UEFI GRUB image for RISC-V 32/64 available on the internet, and with travis-ci we don't build GRUB images like we do for azure and gitlab.
There are RPM packages for GRUB in OpenSUSE and Fedora.
https://build.opensuse.org/package/binaries/openSUSE:Factory:RISCV/grub2/sta... http://fedora.riscv.rocks/koji/buildinfo?buildID=133151
I have not tried them on QEMU or Unleashed yet.
We should be able to boot with GRUB2 and EFI stubs to the kernel soonish.
Remove qemu-riscv64 testing temporarily.
Signed-off-by: Bin Meng bmeng.cn@gmail.com
.travis.yml | 7 ------- 1 file changed, 7 deletions(-)
diff --git a/.travis.yml b/.travis.yml index c59bd77..55b94cf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -481,13 +481,6 @@ matrix: QEMU_TARGET="ppc-softmmu" BUILDMAN="^qemu-ppce500$" TOOLCHAIN="powerpc"
- name: "test/py qemu-riscv64"
env:
- TEST_PY_BD="qemu-riscv64"
TEST_PY_TEST_SPEC="not sleep"
QEMU_TARGET="riscv64-softmmu"
BUILDMAN="^qemu-riscv64$"
TOOLCHAIN="riscv"
- name: "test/py qemu-x86" env:
- TEST_PY_BD="qemu-x86"
-- 2.7.4

On Fri, Mar 27, 2020 at 1:20 PM David Abdurachmanov david.abdurachmanov@gmail.com wrote:
On Thu, Mar 26, 2020 at 6:06 PM Bin Meng bmeng.cn@gmail.com wrote:
As of today there is no pre-built UEFI GRUB image for RISC-V 32/64 available on the internet, and with travis-ci we don't build GRUB images like we do for azure and gitlab.
There are RPM packages for GRUB in OpenSUSE and Fedora.
https://build.opensuse.org/package/binaries/openSUSE:Factory:RISCV/grub2/sta... http://fedora.riscv.rocks/koji/buildinfo?buildID=133151
I've looked at this alternatives before, it turns out there are only riscv64 images. Do you know any riscv32 prebuilt images?
I have not tried them on QEMU or Unleashed yet.
We should be able to boot with GRUB2 and EFI stubs to the kernel soonish.
Regards, Bin

On Fri, Mar 27, 2020 at 7:31 AM Bin Meng bmeng.cn@gmail.com wrote:
On Fri, Mar 27, 2020 at 1:20 PM David Abdurachmanov david.abdurachmanov@gmail.com wrote:
On Thu, Mar 26, 2020 at 6:06 PM Bin Meng bmeng.cn@gmail.com wrote:
As of today there is no pre-built UEFI GRUB image for RISC-V 32/64 available on the internet, and with travis-ci we don't build GRUB images like we do for azure and gitlab.
There are RPM packages for GRUB in OpenSUSE and Fedora.
https://build.opensuse.org/package/binaries/openSUSE:Factory:RISCV/grub2/sta... http://fedora.riscv.rocks/koji/buildinfo?buildID=133151
I've looked at this alternatives before, it turns out there are only riscv64 images. Do you know any riscv32 prebuilt images?
I am not aware of any distribution supporting RV32 (or plans to do it). Furthermore RV32 Linux ABI is not frozen yet. OE definitely has RV32 Linux support, but it doesn't incl. RV32 GRUB2 for booting.
Simply put, I don't think there are RV32 GRUB2 binaries somewhere online.
I have not tried them on QEMU or Unleashed yet.
We should be able to boot with GRUB2 and EFI stubs to the kernel soonish.
Regards, Bin
participants (3)
-
Bin Meng
-
David Abdurachmanov
-
Tom Rini