From: Hiago De Franco <hfranco@baylibre.com>
To: meta-virtualization@lists.yoctoproject.org
Cc: Ronaldo Nunez <rnunez@baylibre.com>,
Hiago De Franco <hfranco@baylibre.com>
Subject: [meta-virtualization][PATCH] xen: add initial riscv64 support
Date: Thu, 26 Nov 2026 10:10:35 -0300 [thread overview]
Message-ID: <20261126131035.73287-1-hfranco@baylibre.com> (raw)
Add riscv64 to the Xen architecture mapping and allow the Xen hypervisor
recipe to build for it.
Xen sets its own -march and -mabi flags for RISC-V, so clear TUNE_CCARGS
for riscv64 in the same way as is already done for aarch64.
The Xen tools do not support riscv64 yet, so skip the xen-tools deploy
dependencies on that architecture.
Signed-off-by: Hiago De Franco <hfranco@baylibre.com>
---
recipes-extended/xen/xen-arch.inc | 1 +
recipes-extended/xen/xen-hypervisor.inc | 22 ++++++++++++++--------
2 files changed, 15 insertions(+), 8 deletions(-)
diff --git a/recipes-extended/xen/xen-arch.inc b/recipes-extended/xen/xen-arch.inc
index fb0093e3..8c505396 100644
--- a/recipes-extended/xen/xen-arch.inc
+++ b/recipes-extended/xen/xen-arch.inc
@@ -2,6 +2,7 @@
valid_xen_archs = " \
x86_64 x86_32 \
arm32 arm64 \
+ riscv64 \
"
def map_xen_arch(a, d):
diff --git a/recipes-extended/xen/xen-hypervisor.inc b/recipes-extended/xen/xen-hypervisor.inc
index f448564d..fe987a08 100644
--- a/recipes-extended/xen/xen-hypervisor.inc
+++ b/recipes-extended/xen/xen-hypervisor.inc
@@ -7,7 +7,7 @@ DESCRIPTION = "The Xen hypervisor"
# to build the different components. eg. 32-bit tools and a 64-bit hypervisor.
# The Xen hypervisor has a narrower compatible platform range than the Xen tools
-COMPATIBLE_HOST = '(x86_64.*).*-linux|aarch64.*-linux'
+COMPATIBLE_HOST = '(x86_64.*).*-linux|aarch64.*-linux|riscv64.*-linux'
inherit deploy python3native cml1
@@ -94,12 +94,17 @@ do_deploy() {
# - add the task before do_build to ensure that deployment has completed when
# the recipe build done stamp is written
addtask deploy after do_compile do_populate_sysroot before do_build
-# To ensure that a deployed hypervisor has matching tools, add a dependency to
-# make sure that the tools have built and been staged:
-do_deploy[depends] += "xen-tools:do_populate_sysroot"
-# Also ensure anything that the tools recipe needs to deploy, such as a
-# XSM policy file, has been deployed first:
-do_deploy[depends] += "xen-tools:do_deploy"
+# To ensure that a deployed hypervisor has matching tools, add dependencies to
+# make sure that the tools have built and been staged, and that anything the
+# tools recipe needs to deploy, such as a XSM policy file, has been deployed
+# first.
+XEN_TOOLS_DEPLOY_DEPENDS = " \
+ xen-tools:do_populate_sysroot \
+ xen-tools:do_deploy \
+ "
+# xen-tools is not yet buildable for riscv64.
+XEN_TOOLS_DEPLOY_DEPENDS:riscv64 = ""
+do_deploy[depends] += "${XEN_TOOLS_DEPLOY_DEPENDS}"
# Enable use of menuconfig directly from bitbake and also within the devshell
do_devshell[depends] += "ncurses-native:do_populate_sysroot"
@@ -113,5 +118,6 @@ CROSS_CURSES_LIB += "-L${STAGING_LIBDIR_NATIVE}"
KCONFIG_CONFIG_ROOTDIR = "${S}/xen"
# Xen is setting all CC flags on its own. Make sure that they are not modified
-# for aarch64, e.g. with architecture-specific optimizations.
+# for aarch64 and riscv64, e.g. with architecture-specific optimizations.
TUNE_CCARGS:aarch64 = ""
+TUNE_CCARGS:riscv64 = ""
--
2.47.3
next reply other threads:[~2026-11-26 13:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-26 13:10 Hiago De Franco [this message]
2026-11-27 16:41 ` [meta-virtualization][PATCH] xen: add initial riscv64 support Ronaldo Nunez
2026-11-30 4:33 ` Bruce Ashfield
2026-11-30 12:25 ` Hiago De Franco
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=20261126131035.73287-1-hfranco@baylibre.com \
--to=hfranco@baylibre.com \
--cc=meta-virtualization@lists.yoctoproject.org \
--cc=rnunez@baylibre.com \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.