Skip to contentSkip to conversation

travis: Remove qemu-riscv64 testing

PATCH New Bin Meng 3 participants 12 messages Mar 26, 2020 – Mar 27, 2020

lore
Share & tools
lore

Bin Meng

author
#0 lore raw

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.

---

 .travis.yml | 7 -------
 1 file changed, 7 deletions(-)
.travis.yml +0 -7
index c59bd77..55b94cf 100644
@@ -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"
Signature · 1 line
2.7.4
author
#1 lore raw

PATCH 2/4 azure/gitlab: Add qemu-riscv32 testing

This adds the qemu-riscv32_defconfig test configuration.

---

 .azure-pipelines.yml | 5 +++++
 .gitlab-ci.yml       | 9 +++++++++
 2 files changed, 14 insertions(+)
.azure-pipelines.yml +5 -0
index f66d58a..99a93cc 100644
@@ -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"
.gitlab-ci.yml +9 -0
index 55943bb..39437ce 100644
@@ -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:
Signature · 1 line
2.7.4
author
#2 lore raw

PATCH 3/4 test/py: Update u_boot_utils.find_ram_base to bypass the low 2MiB memory

In reply to Bin Meng

On some RISC-V targets the low memory is protected that prevents S-mode U-Boot from access.

---

 test/py/u_boot_utils.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
test/py/u_boot_utils.py +4 -3
index bf2a0fc..939d82e 100644
@@ -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
 
Signature · 1 line
2.7.4
author
#3 lore raw

PATCH 4/4 azure/gitlab: Add RISC-V SPL testing

In reply to Bin Meng

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.

---

 .azure-pipelines.yml | 16 ++++++++++++++++
 .gitlab-ci.yml       | 24 ++++++++++++++++++++++++
 2 files changed, 40 insertions(+)
.azure-pipelines.yml +16 -0
index 99a93cc..55a2d75 100644
@@ -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.xz | 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.xz | 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
.gitlab-ci.yml +24 -0
index 39437ce..a393a10 100644
@@ -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.xz | 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.xz | 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:
Signature · 1 line
2.7.4
#4 lore raw

PATCH 1/4 travis: Remove qemu-riscv64 testing

In reply to Bin Meng
Quoted 20 lines · Bin Meng

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.

---

 .travis.yml | 7 -------
 1 file changed, 7 deletions(-)
.travis.yml +0 -0
index c59bd77..55b94cf 100644
@@ -481,13 +481,6 @@ matrix:
           QEMU_TARGET="ppc-softmmu"
           BUILDMAN="^qemu-ppce500$"
           TOOLCHAIN="powerpc"

.travis.yml matrix: · line 486

Quoted 10 lines
.travis.yml +0 -7
-    - 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!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200326/8278ee9f/attachment.sig>
author
#5 lore raw

PATCH 1/4 travis: Remove qemu-riscv64 testing

Hi Tom,

Quoted 29 lines · Tom Rini
Quoted 26 lines · Bin Meng

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.

---

 .travis.yml | 7 -------
 1 file changed, 7 deletions(-)
.travis.yml +0 -6
index c59bd77..55b94cf 100644
@@ -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$"
Quoted 8 lines

.travis.yml matrix: · line 486

Quoted 4 lines
.travis.yml +0 -1
-          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

#6 lore raw

PATCH 1/4 travis: Remove qemu-riscv64 testing

Quoted 41 lines · Bin Meng

Hi Tom,

Quoted 29 lines · Tom Rini
Quoted 26 lines · Bin Meng

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.

---

 .travis.yml | 7 -------
 1 file changed, 7 deletions(-)
.travis.yml +0 -6
index c59bd77..55b94cf 100644
@@ -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$"
Quoted 8 lines

.travis.yml matrix: · line 486

Quoted 4 lines
.travis.yml +0 -1
-          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!

Quoted 8 lines

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?

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200326/1c1f352f/attachment.sig>
author
#7 lore raw

PATCH 1/4 travis: Remove qemu-riscv64 testing

Hi Tom,

Quoted 49 lines · Tom Rini
Quoted 47 lines · Bin Meng

Hi Tom,

Quoted 29 lines · Tom Rini
Quoted 26 lines · Bin Meng

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.

---

 .travis.yml | 7 -------
 1 file changed, 7 deletions(-)
.travis.yml +0 -6
index c59bd77..55b94cf 100644
@@ -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$"
Quoted 8 lines

.travis.yml matrix: · line 486

Quoted 4 lines
.travis.yml +0 -1
-          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.

Quoted 5 lines
Quoted 2 lines

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

#8 lore raw

PATCH 1/4 travis: Remove qemu-riscv64 testing

Quoted 55 lines · Bin Meng

Hi Tom,

Quoted 52 lines · Tom Rini
Quoted 49 lines · Bin Meng

Hi Tom,

Quoted 29 lines · Tom Rini
Quoted 26 lines · Bin Meng

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.

---

 .travis.yml | 7 -------
 1 file changed, 7 deletions(-)
.travis.yml +0 -6
index c59bd77..55b94cf 100644
@@ -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$"
Quoted 8 lines

.travis.yml matrix: · line 486

Quoted 4 lines
.travis.yml +0 -1
-          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?

Quoted 6 lines
Quoted 2 lines

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.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200326/8a59de1a/attachment.sig>
#9 lore raw

PATCH 1/4 travis: Remove qemu-riscv64 testing

In reply to Bin Meng
Quoted 4 lines · Bin Meng

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/standard
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.

Quoted 30 lines

Remove qemu-riscv64 testing temporarily.

---

 .travis.yml | 7 -------
 1 file changed, 7 deletions(-)
.travis.yml +0 -8
index c59bd77..55b94cf 100644
@@ -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

author
#10 lore raw

PATCH 1/4 travis: Remove qemu-riscv64 testing

Quoted 12 lines · David Abdurachmanov
Quoted 4 lines · Bin Meng

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/standard
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?

Quoted 3 lines

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

#11 lore raw

PATCH 1/4 travis: Remove qemu-riscv64 testing

Quoted 10 lines · Bin Meng
Quoted 7 lines · David Abdurachmanov
Quoted 4 lines · Bin Meng

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.

Quoted 8 lines
Quoted 5 lines

There are RPM packages for GRUB in OpenSUSE and Fedora.

https://build.opensuse.org/package/binaries/openSUSE:Factory:RISCV/grub2/standard
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.

Quoted 7 lines
Quoted 4 lines

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