summaryrefslogtreecommitdiffstats
path: root/recipes-jailhouse/jailhouse/jailhouse-defs.inc
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-jailhouse/jailhouse/jailhouse-defs.inc')
-rw-r--r--recipes-jailhouse/jailhouse/jailhouse-defs.inc21
1 files changed, 0 insertions, 21 deletions
diff --git a/recipes-jailhouse/jailhouse/jailhouse-defs.inc b/recipes-jailhouse/jailhouse/jailhouse-defs.inc
index 8dd30e3..df39d40 100644
--- a/recipes-jailhouse/jailhouse/jailhouse-defs.inc
+++ b/recipes-jailhouse/jailhouse/jailhouse-defs.inc
@@ -2,24 +2,3 @@ JH_DATADIR ?= "${datadir}/jailhouse"
2CELL_DIR ?= "${JH_DATADIR}/cells" 2CELL_DIR ?= "${JH_DATADIR}/cells"
3CELLCONF_DIR ?= "${JH_DATADIR}/configs" 3CELLCONF_DIR ?= "${JH_DATADIR}/configs"
4INMATES_DIR ?= "${JH_DATADIR}/inmates" 4INMATES_DIR ?= "${JH_DATADIR}/inmates"
5
6# Set jailhouse architecture JH_ARCH variable
7#
8# return value must match one of architectures supported by jailhouse
9#
10valid_jh_archs = "x86 arm"
11
12def map_jh_arch(a, d):
13 import re
14
15 valid_jh_archs = d.getVar('valid_jh_archs', True).split()
16
17 if re.match('(i.86|athlon|x86.64)$', a): return 'x86'
18 elif re.match('armeb$', a): return 'arm'
19 elif re.match('aarch64$', a): return 'arm64'
20 elif re.match('aarch64_be$', a): return 'arm64'
21 elif a in valid_jh_archs: return a
22 else:
23 bb.error("cannot map '%s' to a jailhouse supported architecture" % a)
24
25export JH_ARCH = "${@map_jh_arch(d.getVar('TARGET_ARCH', True), d)}"