boot/arm-trusted-firmware: add optional host-arm-gnu-a-toolchain dependency
authorSuniel Mahesh <sunil@amarulasolutions.com>
Sat, 28 Mar 2020 05:04:30 +0000 (10:34 +0530)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Sun, 29 Mar 2020 13:08:23 +0000 (15:08 +0200)
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>
boot/arm-trusted-firmware/Config.in
boot/arm-trusted-firmware/arm-trusted-firmware.mk

index 737dc587e5fb49670ada8e9954f87a31e8a00a50..b1ca5d7ea1ac9e169e84b160639ca94f499ac938 100644 (file)
@@ -167,4 +167,12 @@ config BR2_TARGET_ARM_TRUSTED_FIRMWARE_NEEDS_DTC
          Select this option if your ATF board configuration
          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
index 27f63a87fed3bafd5c76810fc450a57e10379747..2e8a7c1a23f472a38d33b6ad48a24c3c94723f53 100644 (file)
@@ -33,6 +33,10 @@ ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_NEEDS_DTC),y)
 ARM_TRUSTED_FIRMWARE_DEPENDENCIES += host-dtc
 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))
 
 ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_DEBUG),y)