boot/at91bootstrap3: implement custom tarball download
authorEugen Hristev <eugen.hristev@microchip.com>
Mon, 16 Dec 2019 15:06:34 +0000 (15:06 +0000)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Mon, 23 Dec 2019 22:22:30 +0000 (23:22 +0100)
Implement possibility to download AT91Bootstrap from a custom tarball
URL.

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
boot/at91bootstrap3/Config.in
boot/at91bootstrap3/at91bootstrap3.mk

index c3fc9d35d42ee5921a5c35267b7eda5ae9b54b94..faab7635da8a143b9b1d68af4caf1fe89d8d8d19 100644 (file)
@@ -27,8 +27,15 @@ config BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_GIT
          This option allows Buildroot to get the AT91 Bootstrap 3
          source code from a Git repository.
 
+config BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL
+       bool "Custom tarball"
+
 endchoice
 
+config BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL_LOCATION
+       string "URL of custom AT91Bootstrap tarball"
+       depends on BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL
+
 if BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_GIT
 
 config BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_REPO_URL
@@ -47,6 +54,7 @@ config BR2_TARGET_AT91BOOTSTRAP3_VERSION
        default "v3.9.0" if BR2_TARGET_AT91BOOTSTRAP3_LATEST_VERSION
        default BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_REPO_VERSION \
                if BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_GIT
+       default "custom"        if BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL
 
 config BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_PATCH_DIR
        string "custom patch dir"
index 685be5bbd7f67bbc3720cdab12b58fd229e8d9e9..48c3a918a18d24f6cb3f6772d8998658a3fd1ae1 100644 (file)
@@ -6,7 +6,12 @@
 
 AT91BOOTSTRAP3_VERSION = $(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP3_VERSION))
 
-ifeq ($(BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_GIT),y)
+ifeq ($(BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL),y)
+AT91BOOTSTRAP3_TARBALL = $(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL_LOCATION))
+AT91BOOTSTRAP3_SITE = $(patsubst %/,%,$(dir $(AT91BOOTSTRAP3_TARBALL)))
+AT91BOOTSTRAP3_SOURCE = $(notdir $(AT91BOOTSTRAP3_TARBALL))
+BR_NO_CHECK_HASH_FOR += $(AT91BOOTSTRAP3_SOURCE)
+else ifeq ($(BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_GIT),y)
 AT91BOOTSTRAP3_SITE = $(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_REPO_URL))
 AT91BOOTSTRAP3_SITE_METHOD = git
 BR_NO_CHECK_HASH_FOR += $(AT91BOOTSTRAP3_SOURCE)
@@ -78,6 +83,12 @@ $(error No custom at91bootstrap3 repository version specified. Check your BR2_TA
 endif
 endif
 
+ifeq ($(BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL),y)
+ifeq ($(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL_LOCATION)),)
+$(error No custom AT91Bootstrap3 tarball specified. Check your BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL_LOCATION setting)
+endif # qstrip BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL_LOCATION
+endif # BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL
+
 endif # BR_BUILDING
 
 $(eval $(kconfig-package))