boot/arm-trusted-firmware: Add out-of-source ATF device tree support

Similarly to Uboot, this patch adds the ability to copy in and build
out-of-source device tree sources during an ATF build.

Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
Kory Maincent 2021-07-09 11:49:25 +02:00 committed by Thomas Petazzoni
parent 68933bf195
commit 82f5b3724b
2 changed files with 14 additions and 0 deletions

View File

@ -68,6 +68,15 @@ config BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM
help
Target plaform to build for.
config BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_DTS_PATH
string "Device Tree Source file paths"
help
Space-separated list of paths to device tree source files
that will be copied to fdts/ before starting the build.
To use this device tree source file, the ATF configuration
file must refer to it.
config BR2_TARGET_ARM_TRUSTED_FIRMWARE_FIP
bool "Build FIP image"
help

View File

@ -162,7 +162,12 @@ endif
ARM_TRUSTED_FIRMWARE_MAKE_TARGETS += \
$(call qstrip,$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_TARGETS))
ARM_TRUSTED_FIRMWARE_CUSTOM_DTS_PATH = $(call qstrip,$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_DTS_PATH))
define ARM_TRUSTED_FIRMWARE_BUILD_CMDS
$(if $(ARM_TRUSTED_FIRMWARE_CUSTOM_DTS_PATH),
cp -f $(ARM_TRUSTED_FIRMWARE_CUSTOM_DTS_PATH) $(@D)/fdts/
)
$(ARM_TRUSTED_FIRMWARE_BUILD_FIPTOOL)
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(ARM_TRUSTED_FIRMWARE_MAKE_OPTS) \
$(ARM_TRUSTED_FIRMWARE_MAKE_TARGETS)