From 3d27b83998275d59648d5c2541a56c83b604e9a2 Mon Sep 17 00:00:00 2001 From: Alistair Francis Date: Thu, 13 Aug 2020 15:08:13 -0700 Subject: xvisor: Add support for building AArch64 Add support for building for AArch64, also remove the requirement to specify a platform. Signed-off-by: Alistair Francis Signed-off-by: Bruce Ashfield --- recipes-extended/xvisor/xvisor-configs.inc | 22 +++++++++++----------- recipes-extended/xvisor/xvisor_git.bb | 9 +++++++-- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/recipes-extended/xvisor/xvisor-configs.inc b/recipes-extended/xvisor/xvisor-configs.inc index 099128dd..f53bba25 100644 --- a/recipes-extended/xvisor/xvisor-configs.inc +++ b/recipes-extended/xvisor/xvisor-configs.inc @@ -1,15 +1,15 @@ -def get_oemake_config(d): - plat = d.getVar('XVISOR_PLAT') - - if plat is None: - return "" - - if 'riscv/virt32' in plat: - return "generic-32b-defconfig" - if 'riscv/virt64' in plat: - return "generic-64b-defconfig" +def get_oemake_config(a, d): + import re - return "" + if re.match('armeb$', a): return 'generic-v7-defconfig' + elif re.match('aarch64$', a): return 'generic-v8-defconfig' + elif re.match('aarch64_be$', a): return 'generic-v8-defconfig' + elif re.match('aarch64_ilp32$', a): return 'generic-v8-defconfig' + elif re.match('aarch64_be_ilp32$', a): return 'generic-v8-defconfig' + elif re.match('riscv32(eb|)$', a): return 'generic-32b-defconfig' + elif re.match('riscv64(eb|)$', a): return 'generic-64b-defconfig' + else: + bb.error("cannot map '%s' to a Xvisor defconfig" % a) def map_xvisor_arch(a, d): import re diff --git a/recipes-extended/xvisor/xvisor_git.bb b/recipes-extended/xvisor/xvisor_git.bb index 45a7baf5..64b0f226 100644 --- a/recipes-extended/xvisor/xvisor_git.bb +++ b/recipes-extended/xvisor/xvisor_git.bb @@ -18,7 +18,7 @@ S = "${WORKDIR}/git" EXTRA_OEMAKE += "ARCH=\"${@map_xvisor_arch(d.getVar('TARGET_ARCH'), d)}\" I=${D}" -CONFIG = "${@get_oemake_config(d)}" +CONFIG = "${@get_oemake_config(d.getVar('TARGET_ARCH'), d)}" do_configure() { oe_runmake ${CONFIG} @@ -35,11 +35,16 @@ do_install_append() { do_deploy () { install -d ${DEPLOY_DIR_IMAGE} install -m 755 ${D}/vmm.* ${DEPLOY_DIR_IMAGE}/ + + if [[ -f "${D}/*.dtb" ]]; then + install -m 755 ${D}/*.dtb ${DEPLOY_DIR_IMAGE}/ + fi } addtask deploy after do_install FILES_${PN} += "/vmm.*" +FILES_${PN} += "/*.dtb" -COMPATIBLE_HOST = "(riscv64|riscv32).*" +COMPATIBLE_HOST = "(aarch64|riscv64|riscv32).*" INHIBIT_PACKAGE_STRIP = "1" -- cgit v1.2.3-54-g00ecf