diff --git a/boot/arm-trusted-firmware/Config.in b/boot/arm-trusted-firmware/Config.in index b1fc03e10b..c6c138420f 100644 --- a/boot/arm-trusted-firmware/Config.in +++ b/boot/arm-trusted-firmware/Config.in @@ -68,6 +68,12 @@ config BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM help Target plaform to build for. +config BR2_TARGET_ARM_TRUSTED_FIRMWARE_TARGET_BOARD + string "ATF target board" + help + Target board to build for. In many cases, this can be left + empty. + config BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_DTS_PATH string "Device Tree Source file paths" help diff --git a/boot/arm-trusted-firmware/arm-trusted-firmware.mk b/boot/arm-trusted-firmware/arm-trusted-firmware.mk index 998de4b814..30ecb187ae 100644 --- a/boot/arm-trusted-firmware/arm-trusted-firmware.mk +++ b/boot/arm-trusted-firmware/arm-trusted-firmware.mk @@ -41,18 +41,29 @@ endif ARM_TRUSTED_FIRMWARE_PLATFORM = $(call qstrip,$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM)) +ARM_TRUSTED_FIRMWARE_TARGET_BOARD = $(call qstrip,$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_TARGET_BOARD)) + ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_DEBUG),y) ARM_TRUSTED_FIRMWARE_MAKE_OPTS += DEBUG=1 +ifneq ($(ARM_TRUSTED_FIRMWARE_TARGET_BOARD),) +ARM_TRUSTED_FIRMWARE_IMG_DIR = $(@D)/build/$(ARM_TRUSTED_FIRMWARE_PLATFORM)/$(ARM_TRUSTED_FIRMWARE_TARGET_BOARD)/debug +else ARM_TRUSTED_FIRMWARE_IMG_DIR = $(@D)/build/$(ARM_TRUSTED_FIRMWARE_PLATFORM)/debug +endif +else +ifneq ($(ARM_TRUSTED_FIRMWARE_TARGET_BOARD),) +ARM_TRUSTED_FIRMWARE_IMG_DIR = $(@D)/build/$(ARM_TRUSTED_FIRMWARE_PLATFORM)/$(ARM_TRUSTED_FIRMWARE_TARGET_BOARD)/release else ARM_TRUSTED_FIRMWARE_IMG_DIR = $(@D)/build/$(ARM_TRUSTED_FIRMWARE_PLATFORM)/release endif +endif ARM_TRUSTED_FIRMWARE_MAKE_OPTS += \ CROSS_COMPILE="$(TARGET_CROSS)" \ $(if $(BR2_PIC_PIE),CFLAGS="-fno-PIE") \ $(call qstrip,$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES)) \ - PLAT=$(ARM_TRUSTED_FIRMWARE_PLATFORM) + PLAT=$(ARM_TRUSTED_FIRMWARE_PLATFORM) \ + TARGET_BOARD=$(ARM_TRUSTED_FIRMWARE_TARGET_BOARD) ARM_TRUSTED_FIRMWARE_MAKE_ENV += \ $(TARGET_MAKE_ENV) \