xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Connor Davis <connojdavis@gmail.com>
To: xen-devel@lists.xenproject.org
Cc: Connor Davis <connojdavis@gmail.com>, Doug Goldstein <cardoe@cardoe.com>
Subject: [PATCH v2 5/5] automation: add container for riscv64 builds
Date: Thu, 13 May 2021 22:17:12 -0600	[thread overview]
Message-ID: <3fc237b4350832e63be4943d4fd1b029fea8d486.1620965208.git.connojdavis@gmail.com> (raw)
In-Reply-To: <cover.1620965208.git.connojdavis@gmail.com>

Add a container for cross-compiling xen to riscv64.
This just includes the cross-compiler and necessary packages for
building xen itself (packages for tools, stubdoms, etc., can be
added later).

To build xen in the container run the following:

$ make XEN_TARGET_ARCH=riscv64 SUBSYSTEMS=xen

Signed-off-by: Connor Davis <connojdavis@gmail.com>
---
 automation/build/archlinux/riscv64.dockerfile | 33 +++++++++++++++++++
 automation/scripts/containerize               |  1 +
 2 files changed, 34 insertions(+)
 create mode 100644 automation/build/archlinux/riscv64.dockerfile

diff --git a/automation/build/archlinux/riscv64.dockerfile b/automation/build/archlinux/riscv64.dockerfile
new file mode 100644
index 0000000000..505b623c01
--- /dev/null
+++ b/automation/build/archlinux/riscv64.dockerfile
@@ -0,0 +1,33 @@
+FROM archlinux
+LABEL maintainer.name="The Xen Project" \
+      maintainer.email="xen-devel@lists.xenproject.org"
+
+# Packages needed for the build
+RUN pacman --noconfirm --needed -Syu \
+    base-devel \
+    gcc \
+    git
+
+# Packages needed for QEMU
+RUN pacman --noconfirm --needed -Syu \
+    pixman \
+    python \
+    sh
+
+# There is a regression in GDB that causes an assertion error
+# when setting breakpoints, use this commit until it is fixed!
+RUN git clone --recursive -j$(nproc) --progress https://github.com/riscv/riscv-gnu-toolchain && \
+    cd riscv-gnu-toolchain/riscv-gdb && \
+    git checkout 1dd588507782591478882a891f64945af9e2b86c && \
+    cd  .. && \
+    ./configure --prefix=/opt/riscv && \
+    make linux -j$(nproc) && \
+    rm -R /riscv-gnu-toolchain
+
+# Add compiler path
+ENV PATH=/opt/riscv/bin/:${PATH}
+ENV CROSS_COMPILE=riscv64-unknown-linux-gnu-
+
+RUN useradd --create-home user
+USER user
+WORKDIR /build
diff --git a/automation/scripts/containerize b/automation/scripts/containerize
index b7c81559fb..59edf0ba40 100755
--- a/automation/scripts/containerize
+++ b/automation/scripts/containerize
@@ -26,6 +26,7 @@ BASE="registry.gitlab.com/xen-project/xen"
 case "_${CONTAINER}" in
     _alpine) CONTAINER="${BASE}/alpine:3.12" ;;
     _archlinux|_arch) CONTAINER="${BASE}/archlinux:current" ;;
+    _riscv64) CONTAINER="${BASE}/archlinux:riscv64" ;;
     _centos7) CONTAINER="${BASE}/centos:7" ;;
     _centos72) CONTAINER="${BASE}/centos:7.2" ;;
     _fedora) CONTAINER="${BASE}/fedora:29";;
-- 
2.31.1



  parent reply	other threads:[~2021-05-14  4:18 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-14  4:17 [PATCH v2 0/5] Minimal build for RISCV Connor Davis
2021-05-14  4:17 ` [PATCH v2 1/5] xen/char: Default HAS_NS16550 to y only for X86 and ARM Connor Davis
2021-05-14  5:34   ` Elliott Mitchell
2021-05-14 14:13     ` Connor Davis
2021-05-14  4:17 ` [PATCH v2 2/5] xen/common: Guard iommu symbols with CONFIG_HAS_PASSTHROUGH Connor Davis
2021-05-14  4:17 ` [PATCH v2 3/5] xen: Fix build when !CONFIG_GRANT_TABLE Connor Davis
2021-05-14  4:17 ` [PATCH v2 4/5] xen: Add files needed for minimal riscv build Connor Davis
2021-05-14  9:46   ` Julien Grall
2021-05-14 13:57     ` Connor Davis
2021-05-14  4:17 ` Connor Davis [this message]
2021-05-14  4:43 ` [PATCH v2 0/5] Minimal build for RISCV Alistair Francis
2021-05-14 14:02   ` Connor Davis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3fc237b4350832e63be4943d4fd1b029fea8d486.1620965208.git.connojdavis@gmail.com \
    --to=connojdavis@gmail.com \
    --cc=cardoe@cardoe.com \
    --cc=xen-devel@lists.xenproject.org \
    --subject='Re: [PATCH v2 5/5] automation: add container for riscv64 builds' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).