boot/uboot: copy ATF bl31 binary to uboot package dir
authorHeiko Thiery <heiko.thiery@gmail.com>
Fri, 10 Sep 2021 14:09:27 +0000 (16:09 +0200)
committerArnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Sat, 11 Sep 2021 20:53:53 +0000 (22:53 +0200)
If the ATF binary is used by U-Boot, the file is expected to be in the
toplevel directory.

Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
boot/uboot/uboot.mk

index 4f3c9b7c3ac757b3d4961244218c853728f553be..1a840d9cc165792d4c701cbb2252b97255baff5e 100644 (file)
@@ -162,8 +162,16 @@ ifeq ($(BR2_TARGET_UBOOT_NEEDS_ATF_BL31),y)
 UBOOT_DEPENDENCIES += arm-trusted-firmware
 ifeq ($(BR2_TARGET_UBOOT_NEEDS_ATF_BL31_ELF),y)
 UBOOT_MAKE_OPTS += BL31=$(BINARIES_DIR)/bl31.elf
+define UBOOT_COPY_ATF_FIRMWARE
+       cp $(BINARIES_DIR)/bl31.elf $(@D)/
+endef
+UBOOT_PRE_BUILD_HOOKS += UBOOT_COPY_ATF_FIRMWARE
 else
 UBOOT_MAKE_OPTS += BL31=$(BINARIES_DIR)/bl31.bin
+define UBOOT_COPY_ATF_FIRMWARE
+       cp $(BINARIES_DIR)/bl31.bin $(@D)/
+endef
+UBOOT_PRE_BUILD_HOOKS += UBOOT_COPY_ATF_FIRMWARE
 endif
 endif