boot/at91bootstrap3: download via custom git url
authorAngelo Compagnucci <angelo.compagnucci@gmail.com>
Tue, 2 Jun 2015 08:46:20 +0000 (10:46 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sun, 14 Jun 2015 21:42:48 +0000 (23:42 +0200)
This patch adds the option to download at91bootstrap3 from
a custom git URL. This is a requirement for all that boards
that use a custom at91bootstrap3 version.

Signed-off-by: Angelo Compagnucci <angelo.compagnucci@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
boot/at91bootstrap3/Config.in
boot/at91bootstrap3/at91bootstrap3.mk

index 8ac40ed9632fa93ac60816f5740f689695b9da48..9f2f49bff1c50ddbb2367f565e3091250e5ae95d 100644 (file)
@@ -10,6 +10,40 @@ config BR2_TARGET_AT91BOOTSTRAP3
 
 if BR2_TARGET_AT91BOOTSTRAP3
 
+choice
+
+       prompt "AT91 Bootstrap 3 version"
+
+config BR2_TARGET_AT91BOOTSTRAP3_LATEST_VERSION
+       bool "3.7.2"
+
+config BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_GIT
+       bool "Custom Git repository"
+       help
+         This option allows Buildroot to get the AT91 Bootstrap 3 source
+         code from a Git repository.
+
+endchoice
+
+if BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_GIT
+
+config BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_REPO_URL
+       string "URL of custom repository"
+
+config BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_REPO_VERSION
+       string "Custom repository version"
+       help
+         Revision to use in the typical format used by Git
+         E.G. a sha id, a tag, branch, ..
+
+endif
+
+config BR2_TARGET_AT91BOOTSTRAP3_VERSION
+       string
+       default "v3.7.2" if BR2_TARGET_AT91BOOTSTRAP3_LATEST_VERSION
+       default BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_REPO_VERSION \
+               if BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_GIT
+
 config BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_PATCH_DIR
        string "custom patch dir"
        help
index df3896ea070413bf76ff7c30f12a501dc837b1b4..1c680946341c6b46b9adab6f6412e6e06abd35d0 100644 (file)
@@ -4,8 +4,15 @@
 #
 ################################################################################
 
-AT91BOOTSTRAP3_VERSION = v3.7.2
+AT91BOOTSTRAP3_VERSION = $(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP3_VERSION))
+
+ifeq ($(BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_GIT),y)
+AT91BOOTSTRAP3_SITE = $(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_REPO_URL))
+AT91BOOTSTRAP3_SITE_METHOD = git
+else
 AT91BOOTSTRAP3_SITE = $(call github,linux4sam,at91bootstrap,$(AT91BOOTSTRAP3_VERSION))
+endif
+
 AT91BOOTSTRAP3_LICENSE = Atmel License
 AT91BOOTSTRAP3_LICENSE_FILES = main.c
 
@@ -57,4 +64,14 @@ ifeq ($(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_CONFIG_FILE)),)
 $(error No at91bootstrap3 configuration file specified, check your BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_CONFIG_FILE setting)
 endif
 endif
+
+ifeq ($(BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_GIT),y)
+ifeq ($(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_REPO_URL)),)
+$(error No custom at91bootstrap3 repository URL specified. Check your BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_REPO_URL setting)
+endif
+ifeq ($(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_REPO_VERSION)),)
+$(error No custom at91bootstrap3 repository version specified. Check your BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_REPO_VERSION setting)
+endif
+endif
+
 endif