summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>2017-07-05 22:30:55 +0200
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2017-07-05 22:30:55 +0200
commit117fd5dfbc756c4f2b4aef97fc2b568528c66df7 (patch)
tree401513027670a1433807427a2da43b4c9fd21229
parent1e5659fff89b44ea361a77f4703e446e52a71647 (diff)
downloadbuildroot-117fd5dfbc756c4f2b4aef97fc2b568528c66df7.tar.gz
buildroot-117fd5dfbc756c4f2b4aef97fc2b568528c66df7.zip
xvisor: fix build on AArch64
Xvisor was failing to build on AArch64 with: package/xvisor/xvisor.mk:60: *** No Xvisor defconfig name specified, check your BR2_PACKAGE_XVISOR_DEFCONFIG setting. Stop. The first problem is that the Config.in file had a typo: it was using BR2_AARCH64 instead of BR2_aarch64, and therefore the BR2_PACKAGE_XVISOR_DEFCONFIG variable had no value. Once this is fixed, another problem occurs: the ARCH variable needs to be specified as "arm" for XVisor, for both ARM and AArch64. Therefore, a XVISOR_ARCH variable is introduced, which is calculated according to the Buildroot configuration options. Only x86-64, arm and aarch64 are supported by Xvisor currently, so it remains simple. Fixes: http://autobuild.buildroot.net/results/1719a63ff257f13634a06a14327abfb327984101/ Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-rw-r--r--package/xvisor/Config.in2
-rw-r--r--package/xvisor/xvisor.mk10
2 files changed, 10 insertions, 2 deletions
diff --git a/package/xvisor/Config.in b/package/xvisor/Config.in
index 1f8fd1ff18..c9f74290ac 100644
--- a/package/xvisor/Config.in
+++ b/package/xvisor/Config.in
@@ -35,7 +35,7 @@ config BR2_PACKAGE_XVISOR_DEFCONFIG
default "generic-v5" if BR2_ARM_CPU_ARMV5
default "generic-v6" if BR2_ARM_CPU_ARMV6
default "generic-v7" if BR2_ARM_CPU_ARMV7A
- default "generic-v8" if BR2_AARCH64
+ default "generic-v8" if BR2_aarch64
default "x86_64_generic" if BR2_x86_64
depends on BR2_PACKAGE_XVISOR_USE_DEFCONFIG
help
diff --git a/package/xvisor/xvisor.mk b/package/xvisor/xvisor.mk
index 141a0e31e8..8be4be9df1 100644
--- a/package/xvisor/xvisor.mk
+++ b/package/xvisor/xvisor.mk
@@ -26,8 +26,16 @@ XVISOR_KCONFIG_FILE = $(call qstrip,$(BR2_PACKAGE_XVISOR_CUSTOM_CONFIG_FILE))
endif
XVISOR_KCONFIG_EDITORS = menuconfig
+ifeq ($(BR2_x86_64),y)
+XVISOR_ARCH = x86
+else ifeq ($(BR2_arm)$(BR2_aarch64),y)
+XVISOR_ARCH = arm
+else
+$(error "Architecture not supported by XVisor")
+endif
+
XVISOR_MAKE_ENV = \
- ARCH=$(if $(BR2_x86_64),x86,$(BR2_ARCH)) \
+ ARCH=$(XVISOR_ARCH) \
CROSS_COMPILE=$(TARGET_CROSS)
XVISOR_MAKE_OPTS = $(if $(VERBOSE),VERBOSE=1)
OpenPOWER on IntegriCloud