Pārlūkot izejas kodu

boot/arm-trusted-firmware: add optional host-arm-gnu-a-toolchain dependency

Some ATF configurations, require a pre-built bare metal toolchain to
build some platforms which host cortex-m series core, for instance
rockchip rk3399 has a cortex-m0 core. Without a pre-built bare metal
toolchain, the build fails:

make[3]: arm-none-eabi-gcc: Command not found

To solve this, this commit implements a
BR2_TARGET_ARM_TRUSTED_FIRMWARE_NEEDS_ARM32_TOOLCHAIN
option. Platforms which have such requirement should enable this
config option.

Signed-off-by: Suniel Mahesh <sunil@amarulasolutions.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Suniel Mahesh 5 gadi atpakaļ
vecāks
revīzija
fbed118ed2

+ 8 - 0
boot/arm-trusted-firmware/Config.in

@@ -167,4 +167,12 @@ config BR2_TARGET_ARM_TRUSTED_FIRMWARE_NEEDS_DTC
 	  Select this option if your ATF board configuration
 	  Select this option if your ATF board configuration
 	  requires the Device Tree compiler to be available.
 	  requires the Device Tree compiler to be available.
 
 
+config BR2_TARGET_ARM_TRUSTED_FIRMWARE_NEEDS_ARM32_TOOLCHAIN
+	bool "Needs arm-none-eabi toolchain"
+	depends on BR2_aarch64
+	depends on BR2_HOSTARCH = "x86_64"
+	help
+	  Select this option if your ATF board configuration requires
+	  an ARM32 bare metal toolchain to be available.
+
 endif
 endif

+ 4 - 0
boot/arm-trusted-firmware/arm-trusted-firmware.mk

@@ -33,6 +33,10 @@ ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_NEEDS_DTC),y)
 ARM_TRUSTED_FIRMWARE_DEPENDENCIES += host-dtc
 ARM_TRUSTED_FIRMWARE_DEPENDENCIES += host-dtc
 endif
 endif
 
 
+ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_NEEDS_ARM32_TOOLCHAIN),y)
+ARM_TRUSTED_FIRMWARE_DEPENDENCIES += host-arm-gnu-a-toolchain
+endif
+
 ARM_TRUSTED_FIRMWARE_PLATFORM = $(call qstrip,$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM))
 ARM_TRUSTED_FIRMWARE_PLATFORM = $(call qstrip,$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM))
 
 
 ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_DEBUG),y)
 ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_DEBUG),y)