mirror of
git://git.yoctoproject.org/meta-virtualization.git
synced 2025-07-19 20:59:41 +02:00
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>
This commit is contained in:
parent
6a145bce3a
commit
2daf821145
18
recipes-extended/xen/xen-arch.inc
Normal file
18
recipes-extended/xen/xen-arch.inc
Normal file
|
@ -0,0 +1,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)
|
||||||
|
|
|
@ -10,6 +10,8 @@ COMPATIBLE_HOST = '(x86_64.*).*-linux'
|
||||||
|
|
||||||
inherit autotools-brokensep gettext setuptools update-rc.d
|
inherit autotools-brokensep gettext setuptools update-rc.d
|
||||||
|
|
||||||
|
require xen-arch.inc
|
||||||
|
|
||||||
PACKAGECONFIG ??= " \
|
PACKAGECONFIG ??= " \
|
||||||
sdl \
|
sdl \
|
||||||
"
|
"
|
||||||
|
@ -618,9 +620,9 @@ export HOST_SYS
|
||||||
export STAGING_INCDIR
|
export STAGING_INCDIR
|
||||||
export STAGING_LIBDIR
|
export STAGING_LIBDIR
|
||||||
|
|
||||||
# specify xen hypervisor to target x86_64 (x86_32 not supported)
|
# specify xen hypervisor to build/target
|
||||||
export XEN_TARGET_ARCH="x86_64"
|
export XEN_TARGET_ARCH = "${@map_xen_arch(d.getVar('TARGET_ARCH', True), d)}"
|
||||||
export XEN_COMPILE_ARCH="x86_64"
|
export XEN_COMPILE_ARCH = "${@map_xen_arch(d.getVar('BUILD_ARCH', True), d)}"
|
||||||
|
|
||||||
# hardcoded as Linux, as the only compatible hosts are Linux.
|
# hardcoded as Linux, as the only compatible hosts are Linux.
|
||||||
export XEN_OS = "Linux"
|
export XEN_OS = "Linux"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user