summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>2017-12-03 21:48:04 (GMT)
committerPeter Korsgaard <peter@korsgaard.com>2017-12-08 11:14:42 (GMT)
commit543dbf2d01325d0352d9b4b2d69996bf072c906e (patch)
treec1854283b1dfb14cf8ca5c429d563d0246f67e01
parentae2a68936fcea83e8eb8f6dc641f3f1b34571af1 (diff)
downloadbuildroot-543dbf2d01325d0352d9b4b2d69996bf072c906e.tar.gz
buildroot-543dbf2d01325d0352d9b4b2d69996bf072c906e.tar.bz2
arm-trusted-firmware: add option to enable/disable building FIP image
Currently, our arm-trusted-firmware unconditionally builds a FIP (Firmware Image Package). While this is often needed on platforms where ATF encapsulates U-Boot, it is not the case on some other platforms where it's U-Boot that encapsulates parts of ATF. In order to prepare the support for the later platforms, we make building the FIP image optional, and update the only defconfig we have that uses ARM Trusted Firmware. Note: we considered adding a "default y" here to preserve backward compatibility, but there really isn't any default that is sane: whether a FIP image needs to be built or not is purely platform specific. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Reviewed-by: Sergey Matyukevich <geomatsi@gmail.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
-rw-r--r--boot/arm-trusted-firmware/Config.in8
-rw-r--r--boot/arm-trusted-firmware/arm-trusted-firmware.mk8
-rw-r--r--configs/arm_juno_defconfig1
3 files changed, 16 insertions, 1 deletions
diff --git a/boot/arm-trusted-firmware/Config.in b/boot/arm-trusted-firmware/Config.in
index 799370c..0560046 100644
--- a/boot/arm-trusted-firmware/Config.in
+++ b/boot/arm-trusted-firmware/Config.in
@@ -56,6 +56,14 @@ config BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM
help
Target plaform to build for.
+config BR2_TARGET_ARM_TRUSTED_FIRMWARE_FIP
+ bool "Build FIP image"
+ help
+ This option enables building the FIP image (Firmware Image
+ Package). This is typically the image format used by
+ platforms were ATF encapsulates the second stage bootloader
+ (such as U-Boot).
+
config BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES
string "Additional ATF build variables"
help
diff --git a/boot/arm-trusted-firmware/arm-trusted-firmware.mk b/boot/arm-trusted-firmware/arm-trusted-firmware.mk
index 7b1cc6e..bdffb1d 100644
--- a/boot/arm-trusted-firmware/arm-trusted-firmware.mk
+++ b/boot/arm-trusted-firmware/arm-trusted-firmware.mk
@@ -39,10 +39,16 @@ ARM_TRUSTED_FIRMWARE_MAKE_OPTS += SCP_BL2=$(BINARIES_DIR)/scp-fw.bin
ARM_TRUSTED_FIRMWARE_DEPENDENCIES += vexpress-firmware
endif
+ARM_TRUSTED_FIRMWARE_MAKE_TARGETS = all
+
+ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_FIP),y)
+ARM_TRUSTED_FIRMWARE_MAKE_TARGETS += fip
+endif
+
define ARM_TRUSTED_FIRMWARE_BUILD_CMDS
$(TARGET_CONFIGURE_OPTS) \
$(MAKE) -C $(@D) $(ARM_TRUSTED_FIRMWARE_MAKE_OPTS) \
- all fip
+ $(ARM_TRUSTED_FIRMWARE_MAKE_TARGETS)
endef
define ARM_TRUSTED_FIRMWARE_INSTALL_IMAGES_CMDS
diff --git a/configs/arm_juno_defconfig b/configs/arm_juno_defconfig
index 811524f..1fb5587 100644
--- a/configs/arm_juno_defconfig
+++ b/configs/arm_juno_defconfig
@@ -14,6 +14,7 @@ BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_GIT=y
BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_URL="https://github.com/ARM-software/arm-trusted-firmware.git"
BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_VERSION="v1.2"
BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="juno"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_FIP=y
BR2_TARGET_UBOOT=y
BR2_TARGET_UBOOT_BOARDNAME="vexpress_aemv8a_juno"
BR2_TARGET_UBOOT_CUSTOM_VERSION=y