aboutsummaryrefslogtreecommitdiff
path: root/boot/uboot/uboot.mk
diff options
context:
space:
mode:
authorGravatar Jagan Teki <jagannadh.teki@gmail.com>2017-12-03 22:48:07 +0100
committerGravatar Peter Korsgaard <peter@korsgaard.com>2017-12-08 13:37:49 +0100
commit2c4809e6088660dc71de9de8cee0bba312aafbe4 (patch)
tree8ae62f54097551a4be8665a76987988fe26d7c88 /boot/uboot/uboot.mk
parent968445911362642d4e353a4c5cdb8bc6fdaf6b92 (diff)
downloadbuildroot-2c4809e6088660dc71de9de8cee0bba312aafbe4.tar.gz
buildroot-2c4809e6088660dc71de9de8cee0bba312aafbe4.tar.bz2
uboot: add support for bundling ATF BL31 into U-Boot
Some ARM64 platforms (such as Allwinner A64/H5) have a boot process where U-Boot encapsulates the BL31 part of the ARM trusted firmware. For such platforms, we need to build ATF before U-Boot, and pass a BL31 variable pointing to ATF bl31.bin to the U-Boot build process. This commit introduces a BR2_TARGET_UBOOT_NEEDS_ATF_BL31 variable to achieve this. Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> [Thomas: - Rename option to BR2_TARGET_UBOOT_NEEDS_ATF_BL31 - Drop changes to arm-trusted-firmware.mk, they are taken care of by previous commits. - Improve Config.in help text - Add missing dependency on arm-trusted-firmware when BR2_TARGET_UBOOT_NEEDS_ATF_BL31 is enabled. - Use bl31.bin from $(BINARIES_DIR) instead of taking it from ATF's build dir.] [Peter: depend on toplevel atf option and select bl31 option. Ensure it cannot be enabled together with ARM_TRUSTED_FIRMWARE_UBOOT_AS_BL33 as that would cause circular dependencies] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Tested-by: Jagan Teki <jagan@amarulasolutions.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Diffstat (limited to 'boot/uboot/uboot.mk')
-rw-r--r--boot/uboot/uboot.mk5
1 files changed, 5 insertions, 0 deletions
diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk
index a1fac7dcae..39175999ec 100644
--- a/boot/uboot/uboot.mk
+++ b/boot/uboot/uboot.mk
@@ -134,6 +134,11 @@ UBOOT_MAKE_OPTS += \
HOSTCC="$(HOSTCC) $(HOST_CFLAGS)" \
HOSTLDFLAGS="$(HOST_LDFLAGS)"
+ifeq ($(BR2_TARGET_UBOOT_NEEDS_ATF_BL31),y)
+UBOOT_DEPENDENCIES += arm-trusted-firmware
+UBOOT_MAKE_OPTS += BL31=$(BINARIES_DIR)/bl31.bin
+endif
+
ifeq ($(BR2_TARGET_UBOOT_NEEDS_DTC),y)
UBOOT_DEPENDENCIES += host-dtc
endif