diff mbox series

[XEN,v1,4/4] automation: add RISC-V 64 cross-build tests for Xen

Message ID c16097445ce25700b3464d3813c7cbc69d998dd7.1671789736.git.oleksii.kurochko@gmail.com (mailing list archive)
State Superseded
Headers show
Series Add minimal RISC-V Xen build and build testing | expand

Commit Message

Oleksii Dec. 23, 2022, 11:16 a.m. UTC
Add build jobs to cross-compile Xen-only for RISC-V 64.

Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
---
 automation/gitlab-ci/build.yaml | 43 +++++++++++++++++++++++++++++++++
 automation/scripts/build        |  4 +--
 2 files changed, 45 insertions(+), 2 deletions(-)

Comments

Alistair Francis Dec. 28, 2022, 4:55 a.m. UTC | #1
On Fri, Dec 23, 2022 at 9:17 PM Oleksii Kurochko
<oleksii.kurochko@gmail.com> wrote:
>
> Add build jobs to cross-compile Xen-only for RISC-V 64.
>
> Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>

Acked-by: Alistair Francis <alistair.francis@wdc.com>

Alistair

> ---
>  automation/gitlab-ci/build.yaml | 43 +++++++++++++++++++++++++++++++++
>  automation/scripts/build        |  4 +--
>  2 files changed, 45 insertions(+), 2 deletions(-)
>
> diff --git a/automation/gitlab-ci/build.yaml b/automation/gitlab-ci/build.yaml
> index 93d9ff69a9..d97b2aa788 100644
> --- a/automation/gitlab-ci/build.yaml
> +++ b/automation/gitlab-ci/build.yaml
> @@ -172,6 +172,33 @@
>    variables:
>      <<: *gcc
>
> +.riscv64-cross-build-tmpl:
> +  <<: *build
> +  variables:
> +    XEN_TARGET_ARCH: riscv64
> +  tags:
> +    - x86_64
> +
> +.riscv64-cross-build:
> +  extends: .riscv64-cross-build-tmpl
> +  variables:
> +    debug: n
> +
> +.riscv64-cross-build-debug:
> +  extends: .riscv64-cross-build-tmpl
> +  variables:
> +    debug: y
> +
> +.gcc-riscv64-cross-build:
> +  extends: .riscv64-cross-build
> +  variables:
> +    <<: *gcc
> +
> +.gcc-riscv64-cross-build-debug:
> +  extends: .riscv64-cross-build-debug
> +  variables:
> +    <<: *gcc
> +
>  # Jobs below this line
>
>  archlinux-gcc:
> @@ -615,6 +642,19 @@ alpine-3.12-gcc-debug-arm64-boot-cpupools:
>      EXTRA_XEN_CONFIG: |
>        CONFIG_BOOT_TIME_CPUPOOLS=y
>
> +# RISC-V 64 cross-build
> +riscv64-cross-gcc:
> +  extends: .gcc-riscv64-cross-build
> +  variables:
> +    CONTAINER: archlinux:riscv64
> +    KBUILD_DEFCONFIG: tiny64_defconfig
> +
> +riscv64-cross-gcc-debug:
> +  extends: .gcc-riscv64-cross-build-debug
> +  variables:
> +    CONTAINER: archlinux:riscv64
> +    KBUILD_DEFCONFIG: tiny64_defconfig
> +
>  ## Test artifacts common
>
>  .test-jobs-artifact-common:
> @@ -690,3 +730,6 @@ kernel-5.10.74-export:
>        - binaries/bzImage
>    tags:
>      - x86_64
> +
> +# # RISC-V 64 test artificats
> +# # TODO: add RISC-V 64 test artitifacts
> diff --git a/automation/scripts/build b/automation/scripts/build
> index 026f480e76..d0632a2bd5 100755
> --- a/automation/scripts/build
> +++ b/automation/scripts/build
> @@ -34,8 +34,8 @@ fi
>  # to exit early -- bash is invoked with -e.
>  cp xen/.config xen-config
>
> -# arm32 only cross-compiles the hypervisor
> -if [[ "${XEN_TARGET_ARCH}" = "arm32" ]]; then
> +# arm32 & riscv64 only cross-compiles the hypervisor
> +if [[ "${XEN_TARGET_ARCH}" = "arm32" ]] || [[ "${XEN_TARGET_ARCH}" = "riscv64" ]]; then
>      hypervisor_only="y"
>  fi
>
> --
> 2.38.1
>
>
diff mbox series

Patch

diff --git a/automation/gitlab-ci/build.yaml b/automation/gitlab-ci/build.yaml
index 93d9ff69a9..d97b2aa788 100644
--- a/automation/gitlab-ci/build.yaml
+++ b/automation/gitlab-ci/build.yaml
@@ -172,6 +172,33 @@ 
   variables:
     <<: *gcc
 
+.riscv64-cross-build-tmpl:
+  <<: *build
+  variables:
+    XEN_TARGET_ARCH: riscv64
+  tags:
+    - x86_64
+
+.riscv64-cross-build:
+  extends: .riscv64-cross-build-tmpl
+  variables:
+    debug: n
+
+.riscv64-cross-build-debug:
+  extends: .riscv64-cross-build-tmpl
+  variables:
+    debug: y
+
+.gcc-riscv64-cross-build:
+  extends: .riscv64-cross-build
+  variables:
+    <<: *gcc
+
+.gcc-riscv64-cross-build-debug:
+  extends: .riscv64-cross-build-debug
+  variables:
+    <<: *gcc
+
 # Jobs below this line
 
 archlinux-gcc:
@@ -615,6 +642,19 @@  alpine-3.12-gcc-debug-arm64-boot-cpupools:
     EXTRA_XEN_CONFIG: |
       CONFIG_BOOT_TIME_CPUPOOLS=y
 
+# RISC-V 64 cross-build
+riscv64-cross-gcc:
+  extends: .gcc-riscv64-cross-build
+  variables:
+    CONTAINER: archlinux:riscv64
+    KBUILD_DEFCONFIG: tiny64_defconfig
+
+riscv64-cross-gcc-debug:
+  extends: .gcc-riscv64-cross-build-debug
+  variables:
+    CONTAINER: archlinux:riscv64
+    KBUILD_DEFCONFIG: tiny64_defconfig
+
 ## Test artifacts common
 
 .test-jobs-artifact-common:
@@ -690,3 +730,6 @@  kernel-5.10.74-export:
       - binaries/bzImage
   tags:
     - x86_64
+
+# # RISC-V 64 test artificats
+# # TODO: add RISC-V 64 test artitifacts
diff --git a/automation/scripts/build b/automation/scripts/build
index 026f480e76..d0632a2bd5 100755
--- a/automation/scripts/build
+++ b/automation/scripts/build
@@ -34,8 +34,8 @@  fi
 # to exit early -- bash is invoked with -e.
 cp xen/.config xen-config
 
-# arm32 only cross-compiles the hypervisor
-if [[ "${XEN_TARGET_ARCH}" = "arm32" ]]; then
+# arm32 & riscv64 only cross-compiles the hypervisor
+if [[ "${XEN_TARGET_ARCH}" = "arm32" ]] || [[ "${XEN_TARGET_ARCH}" = "riscv64" ]]; then
     hypervisor_only="y"
 fi