summaryrefslogtreecommitdiffstats
path: root/recipes-extended/xvisor/xvisor-configs.inc
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-extended/xvisor/xvisor-configs.inc')
-rw-r--r--recipes-extended/xvisor/xvisor-configs.inc25
1 files changed, 25 insertions, 0 deletions
diff --git a/recipes-extended/xvisor/xvisor-configs.inc b/recipes-extended/xvisor/xvisor-configs.inc
new file mode 100644
index 00000000..099128dd
--- /dev/null
+++ b/recipes-extended/xvisor/xvisor-configs.inc
@@ -0,0 +1,25 @@
1def get_oemake_config(d):
2 plat = d.getVar('XVISOR_PLAT')
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
12 return ""
13
14def map_xvisor_arch(a, d):
15 import re
16
17 if re.match('(i.86|x86.64)$', a): return 'x86'
18 elif re.match('armeb$', a): return 'arm'
19 elif re.match('aarch64$', a): return 'arm'
20 elif re.match('aarch64_be$', a): return 'arm'
21 elif re.match('aarch64_ilp32$', a): return 'arm'
22 elif re.match('aarch64_be_ilp32$', a): return 'arm'
23 elif re.match('riscv(32|64|)(eb|)$', a): return 'riscv'
24 else:
25 bb.error("cannot map '%s' to a Xvisor architecture" % a)