diff options
-rw-r--r-- | recipes-extended/xvisor/xvisor-configs.inc | 22 | ||||
-rw-r--r-- | 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 @@ | |||
1 | def get_oemake_config(d): | 1 | def get_oemake_config(a, d): |
2 | plat = d.getVar('XVISOR_PLAT') | 2 | import re |
3 | |||
4 | if plat is None: | ||
5 | return "" | ||
6 | |||
7 | if 'riscv/virt32' in plat: | ||
8 | return "generic-32b-defconfig" | ||
9 | if 'riscv/virt64' in plat: | ||
10 | return "generic-64b-defconfig" | ||
11 | 3 | ||
12 | return "" | 4 | if re.match('armeb$', a): return 'generic-v7-defconfig' |
5 | elif re.match('aarch64$', a): return 'generic-v8-defconfig' | ||
6 | elif re.match('aarch64_be$', a): return 'generic-v8-defconfig' | ||
7 | elif re.match('aarch64_ilp32$', a): return 'generic-v8-defconfig' | ||
8 | elif re.match('aarch64_be_ilp32$', a): return 'generic-v8-defconfig' | ||
9 | elif re.match('riscv32(eb|)$', a): return 'generic-32b-defconfig' | ||
10 | elif re.match('riscv64(eb|)$', a): return 'generic-64b-defconfig' | ||
11 | else: | ||
12 | bb.error("cannot map '%s' to a Xvisor defconfig" % a) | ||
13 | 13 | ||
14 | def map_xvisor_arch(a, d): | 14 | def map_xvisor_arch(a, d): |
15 | import re | 15 | 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" | |||
18 | 18 | ||
19 | EXTRA_OEMAKE += "ARCH=\"${@map_xvisor_arch(d.getVar('TARGET_ARCH'), d)}\" I=${D}" | 19 | EXTRA_OEMAKE += "ARCH=\"${@map_xvisor_arch(d.getVar('TARGET_ARCH'), d)}\" I=${D}" |
20 | 20 | ||
21 | CONFIG = "${@get_oemake_config(d)}" | 21 | CONFIG = "${@get_oemake_config(d.getVar('TARGET_ARCH'), d)}" |
22 | 22 | ||
23 | do_configure() { | 23 | do_configure() { |
24 | oe_runmake ${CONFIG} | 24 | oe_runmake ${CONFIG} |
@@ -35,11 +35,16 @@ do_install_append() { | |||
35 | do_deploy () { | 35 | do_deploy () { |
36 | install -d ${DEPLOY_DIR_IMAGE} | 36 | install -d ${DEPLOY_DIR_IMAGE} |
37 | install -m 755 ${D}/vmm.* ${DEPLOY_DIR_IMAGE}/ | 37 | install -m 755 ${D}/vmm.* ${DEPLOY_DIR_IMAGE}/ |
38 | |||
39 | if [[ -f "${D}/*.dtb" ]]; then | ||
40 | install -m 755 ${D}/*.dtb ${DEPLOY_DIR_IMAGE}/ | ||
41 | fi | ||
38 | } | 42 | } |
39 | 43 | ||
40 | addtask deploy after do_install | 44 | addtask deploy after do_install |
41 | 45 | ||
42 | FILES_${PN} += "/vmm.*" | 46 | FILES_${PN} += "/vmm.*" |
47 | FILES_${PN} += "/*.dtb" | ||
43 | 48 | ||
44 | COMPATIBLE_HOST = "(riscv64|riscv32).*" | 49 | COMPATIBLE_HOST = "(aarch64|riscv64|riscv32).*" |
45 | INHIBIT_PACKAGE_STRIP = "1" | 50 | INHIBIT_PACKAGE_STRIP = "1" |