blob: 844d47dd5359e998a9478a094839cab9f0b4540d [file] [log] [blame]
Patrick Williamsd849ec72016-08-17 14:59:38 -05001
2valid_xen_archs = " \
3 x86_64 x86_32 \
4 arm32 arm64 \
5 "
6
7def map_xen_arch(a, d):
8 import re
9 valid_archs = d.getVar('valid_xen_archs', True).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 return "INVALID"
18