summaryrefslogtreecommitdiffstats
path: root/meta-agl-devel/meta-agl-jailhouse/recipes-extended/jailhouse/jailhouse-arch.inc
diff options
context:
space:
mode:
authortakeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp>2020-11-02 11:07:33 +0900
committertakeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp>2020-11-02 11:07:33 +0900
commit1c7d6584a7811b7785ae5c1e378f14b5ba0971cf (patch)
treecd70a267a5ef105ba32f200aa088e281fbd85747 /meta-agl-devel/meta-agl-jailhouse/recipes-extended/jailhouse/jailhouse-arch.inc
parent4204309872da5cb401cbb2729d9e2d4869a87f42 (diff)
recipes
Diffstat (limited to 'meta-agl-devel/meta-agl-jailhouse/recipes-extended/jailhouse/jailhouse-arch.inc')
-rw-r--r--meta-agl-devel/meta-agl-jailhouse/recipes-extended/jailhouse/jailhouse-arch.inc22
1 files changed, 22 insertions, 0 deletions
diff --git a/meta-agl-devel/meta-agl-jailhouse/recipes-extended/jailhouse/jailhouse-arch.inc b/meta-agl-devel/meta-agl-jailhouse/recipes-extended/jailhouse/jailhouse-arch.inc
new file mode 100644
index 00000000..498b25ed
--- /dev/null
+++ b/meta-agl-devel/meta-agl-jailhouse/recipes-extended/jailhouse/jailhouse-arch.inc
@@ -0,0 +1,22 @@
+# Set jailhouse architecture JH_ARCH variable
+#
+# return value must match one of architectures supported by jailhouse
+#
+valid_jh_archs = "x86 arm"
+
+def map_jh_arch(a, d):
+ import re
+
+ valid_jh_archs = d.getVar('valid_jh_archs', True).split()
+
+ if re.match('(i.86|athlon|x86.64)$', a): return 'x86'
+ elif re.match('armeb$', a): return 'arm'
+ elif re.match('aarch64$', a): return 'arm64'
+ elif re.match('aarch64_be$', a): return 'arm64'
+ elif a in valid_jh_archs: return a
+ else:
+ bb.error("cannot map '%s' to a jailhouse supported architecture" % a)
+
+export JH_ARCH = "${@map_jh_arch(d.getVar('TARGET_ARCH', True), d)}"
+
+COMPATIBLE_HOST = "(i.86|x86_64|arm|aarch64).*-linux"