summaryrefslogtreecommitdiffstats
path: root/recipes-extended/xen/xen-arch.inc
blob: bcf9f54b1acdc2b02dcabac910922be17f31bf06 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
valid_xen_archs = " \
        x86_64 x86_32 \
        arm32 arm64 \
        "

def map_xen_arch(a, d):
    import re
    valid_archs = d.getVar('valid_xen_archs').split()

    if   re.match("i.86", a):        return "x86_32"
    elif re.match("x86.64", a):      return "x86_64"
    elif re.match("arm.*", a):       return "arm32"
    elif re.match("aarch64.*", a):   return "arm64"
    elif a in valid_archs:           return a
    else:
        bb.error("cannot map '%s' to a xen architecture" % a)