xen: add initial riscv64 support
PATCH 1/1 xen: add initial riscv64 support
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 <[email protected]>
--- recipes-extended/xen/xen-arch.inc | 1 + recipes-extended/xen/xen-hypervisor.inc | 22 ++++++++++++++-------- 2 files changed, 15 insertions(+), 8 deletions(-)
recipes-extended/xen/xen-arch.inc +1 -0
@@ -2,6 +2,7 @@ valid_xen_archs = " \ x86_64 x86_32 \ arm32 arm64 \ + riscv64 \ " def map_xen_arch(a, d):
recipes-extended/xen/xen-hypervisor.inc +14 -8
@@ -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 = ""
Signature · 1 line
2.47.3