boot/arm-trusted-firmware: add option to choose custom version
authorMichał Łyszczek <michal.lyszczek@bofc.pl>
Wed, 6 Feb 2019 13:58:58 +0000 (14:58 +0100)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Wed, 6 Feb 2019 15:37:20 +0000 (16:37 +0100)
Allow user to choose specific, stable version from official ATF
repository

Signed-off-by: Michał Łyszczek <michal.lyszczek@bofc.pl>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
boot/arm-trusted-firmware/Config.in
boot/arm-trusted-firmware/arm-trusted-firmware.mk

index 885d93e62f473b579e43ded101b6766a75769ec1..823a3510b5ef6f7693f7ff8b4c95f91c61cae524 100644 (file)
@@ -16,6 +16,11 @@ choice
 config BR2_TARGET_ARM_TRUSTED_FIRMWARE_LATEST_VERSION
        bool "v1.4"
 
+config BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION
+       bool "Custom version"
+       help
+         This option allows to use a specific official versions
+
 config BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_TARBALL
        bool "Custom tarball"
 
@@ -31,12 +36,18 @@ config BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_TARBALL_LOCATION
 
 endif
 
+config BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION_VALUE
+       string "ATF version"
+       depends on BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION
+
 config BR2_TARGET_ARM_TRUSTED_FIRMWARE_VERSION
        string
        default "v1.4"          if BR2_TARGET_ARM_TRUSTED_FIRMWARE_LATEST_VERSION
        default "custom"        if BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_TARBALL
        default BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_VERSION \
                                if BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_GIT
+       default BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION_VALUE \
+                               if BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION
 
 if BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_GIT
 
index 23f493653d9be3bc1a301da1d7c62b40b9f4c76a..8c5e55eb4b3fdc76210be4f00b3da470f15e4934 100644 (file)
@@ -13,15 +13,18 @@ ifeq ($(ARM_TRUSTED_FIRMWARE_VERSION),custom)
 ARM_TRUSTED_FIRMWARE_TARBALL = $(call qstrip,$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_TARBALL_LOCATION))
 ARM_TRUSTED_FIRMWARE_SITE = $(patsubst %/,%,$(dir $(ARM_TRUSTED_FIRMWARE_TARBALL)))
 ARM_TRUSTED_FIRMWARE_SOURCE = $(notdir $(ARM_TRUSTED_FIRMWARE_TARBALL))
-BR_NO_CHECK_HASH_FOR += $(ARM_TRUSTED_FIRMWARE_SOURCE)
 else ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_GIT),y)
 ARM_TRUSTED_FIRMWARE_SITE = $(call qstrip,$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_URL))
 ARM_TRUSTED_FIRMWARE_SITE_METHOD = git
-BR_NO_CHECK_HASH_FOR += $(ARM_TRUSTED_FIRMWARE_SOURCE)
 else
+# Handle stable official ATF versions
 ARM_TRUSTED_FIRMWARE_SITE = $(call github,ARM-software,arm-trusted-firmware,$(ARM_TRUSTED_FIRMWARE_VERSION))
 endif
 
+ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE)$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_LATEST_VERSION),y)
+BR_NO_CHECK_HASH_FOR += $(ARM_TRUSTED_FIRMWARE_SOURCE)
+endif
+
 ARM_TRUSTED_FIRMWARE_INSTALL_IMAGES = YES
 
 ARM_TRUSTED_FIRMWARE_PLATFORM = $(call qstrip,$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM))