Selaa lähdekoodia

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>
Thomas Petazzoni 8 vuotta sitten
vanhempi
commit
117fd5dfbc
2 muutettua tiedostoa jossa 10 lisäystä ja 2 poistoa
  1. 1 1
      package/xvisor/Config.in
  2. 9 1
      package/xvisor/xvisor.mk

+ 1 - 1
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

+ 9 - 1
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)