diff options
author | Nathan Rossi <nathan.rossi@xilinx.com> | 2015-01-05 17:40:41 +1000 |
---|---|---|
committer | Bruce Ashfield <bruce.ashfield@windriver.com> | 2015-02-20 21:17:04 -0500 |
commit | 2daf821145e2f8633b8f2e1354a95d79f1411b1d (patch) | |
tree | 04e2338484d1f626cb497a04c057035274ac9b20 /recipes-extended/xen/xen-arch.inc | |
parent | 6a145bce3a6c3515d8c8b9582af95aa6ccb7654e (diff) | |
download | meta-virtualization-2daf821145e2f8633b8f2e1354a95d79f1411b1d.tar.gz |
xen: Add Build and Target architecture mapping
* Setup the XEN_TARGET_ARCH and XEN_COMPILE_ARCH based on the running
environments TARGET_ARCH and BUILD_ARCH
Signed-off-by: Nathan Rossi <nathan.rossi@xilinx.com>
Diffstat (limited to 'recipes-extended/xen/xen-arch.inc')
-rw-r--r-- | recipes-extended/xen/xen-arch.inc | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/recipes-extended/xen/xen-arch.inc b/recipes-extended/xen/xen-arch.inc new file mode 100644 index 00000000..bcf9f54b --- /dev/null +++ b/recipes-extended/xen/xen-arch.inc | |||
@@ -0,0 +1,18 @@ | |||
1 | |||
2 | valid_xen_archs = " \ | ||
3 | x86_64 x86_32 \ | ||
4 | arm32 arm64 \ | ||
5 | " | ||
6 | |||
7 | def map_xen_arch(a, d): | ||
8 | import re | ||
9 | valid_archs = d.getVar('valid_xen_archs').split() | ||
10 | |||
11 | if re.match("i.86", a): return "x86_32" | ||
12 | elif re.match("x86.64", a): return "x86_64" | ||
13 | elif re.match("arm.*", a): return "arm32" | ||
14 | elif re.match("aarch64.*", a): return "arm64" | ||
15 | elif a in valid_archs: return a | ||
16 | else: | ||
17 | bb.error("cannot map '%s' to a xen architecture" % a) | ||
18 | |||