linux-firmware: bump to version 6d3bc8886517d171068fd1263176b8b5c51df204
[buildroot-gz.git] / boot / arm-trusted-firmware / arm-trusted-firmware.mk
blob5acfab391fbf3cf0f4a7fd470376e4615b92c83f
1 ################################################################################
3 # arm-trusted-firmware
5 ################################################################################
7 ARM_TRUSTED_FIRMWARE_VERSION = $(call qstrip,$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_VERSION))
8 ARM_TRUSTED_FIRMWARE_LICENSE = BSD-3c
9 ARM_TRUSTED_FIRMWARE_LICENSE_FILES = license.md
11 ARM_TRUSTED_FIRMWARE_DEPENDENCIES += uboot
13 ifeq ($(ARM_TRUSTED_FIRMWARE_VERSION),custom)
14 # Handle custom ATF tarballs as specified by the configuration
15 ARM_TRUSTED_FIRMWARE_TARBALL = $(call qstrip,$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_TARBALL_LOCATION))
16 ARM_TRUSTED_FIRMWARE_SITE = $(patsubst %/,%,$(dir $(ARM_TRUSTED_FIRMWARE_TARBALL)))
17 ARM_TRUSTED_FIRMWARE_SOURCE = $(notdir $(ARM_TRUSTED_FIRMWARE_TARBALL))
18 BR_NO_CHECK_HASH_FOR += $(ARM_TRUSTED_FIRMWARE_SOURCE)
19 else ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_GIT),y)
20 ARM_TRUSTED_FIRMWARE_SITE = $(call qstrip,$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_URL))
21 ARM_TRUSTED_FIRMWARE_SITE_METHOD = git
22 else
23 ARM_TRUSTED_FIRMWARE_SITE = $(call github,ARM-software,arm-trusted-firmware,$(ARM_TRUSTED_FIRMWARE_VERSION))
24 endif
26 ARM_TRUSTED_FIRMWARE_INSTALL_IMAGES = YES
28 ARM_TRUSTED_FIRMWARE_PLATFORM = $(call qstrip,$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM))
30 ARM_TRUSTED_FIRMWARE_MAKE_OPTS += \
31 CROSS_COMPILE="$(TARGET_CROSS)" \
32 BL33=$(BINARIES_DIR)/u-boot.bin \
33 $(call qstrip,$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES)) \
34 PLAT=$(ARM_TRUSTED_FIRMWARE_PLATFORM) \
35 all fip
37 ifeq ($(BR2_TARGET_VEXPRESS_FIRMWARE),y)
38 ARM_TRUSTED_FIRMWARE_MAKE_OPTS += SCP_BL2=$(BINARIES_DIR)/scp-fw.bin
39 ARM_TRUSTED_FIRMWARE_DEPENDENCIES += vexpress-firmware
40 endif
42 define ARM_TRUSTED_FIRMWARE_BUILD_CMDS
43 $(TARGET_CONFIGURE_OPTS) \
44 $(MAKE) -C $(@D) $(ARM_TRUSTED_FIRMWARE_MAKE_OPTS) \
45 $(ARM_TRUSTED_FIRMWARE_MAKE_TARGET)
46 endef
48 define ARM_TRUSTED_FIRMWARE_INSTALL_IMAGES_CMDS
49 cp -dpf $(@D)/build/$(ARM_TRUSTED_FIRMWARE_PLATFORM)/release/*.bin $(BINARIES_DIR)/
50 endef
52 # Configuration ckeck
53 ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE)$(BR_BUILDING),yy)
55 ifeq ($(ARM_TRUSTED_FIRMWARE_VERSION),custom)
56 ifeq ($(call qstrip,$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_TARBALL_LOCATION))),)
57 $(error No tarball location specified. Please check BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_TARBALL_LOCATION))
58 endif
59 endif
61 ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_GIT),y)
62 ifeq ($(call qstrip,$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_URL)),)
63 $(error No repository specified. Please check BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_URL)
64 endif
65 endif
67 endif
69 $(eval $(generic-package))