]> rtime.felk.cvut.cz Git - coffee/buildroot.git/commitdiff
xvisor: fix build on AArch64
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Wed, 5 Jul 2017 20:30:55 +0000 (22:30 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Wed, 5 Jul 2017 20:30:55 +0000 (22:30 +0200)
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>
package/xvisor/Config.in
package/xvisor/xvisor.mk

index 1f8fd1ff18f5a25522e8447d7e2a5f7f7a24b477..c9f74290ac7590f3e4815660c70f1f073737ce46 100644 (file)
@@ -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
index 141a0e31e87293e9758117ee22159f6ce585903f..8be4be9df1aa64d5ff4a2000666019bf1d0a4079 100644 (file)
@@ -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)