summaryrefslogtreecommitdiff
path: root/boot
diff options
context:
space:
mode:
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>2012-02-02 23:29:26 +0100
committerPeter Korsgaard <jacmet@sunsite.dk>2012-02-02 23:42:34 +0100
commit502465e435610b54b247b44cf61e7f0ba3d05a22 (patch)
tree58c0508db88960dd811cac12e77ad53f37490c18 /boot
parent1b1fcb638e0c7506f6b5b50df3142539424f050e (diff)
at91bootstrap: allow specification of a custom patch directory
Fixes bug #4664. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'boot')
-rw-r--r--boot/at91bootstrap/Config.in9
-rw-r--r--boot/at91bootstrap/at91bootstrap.mk9
2 files changed, 18 insertions, 0 deletions
diff --git a/boot/at91bootstrap/Config.in b/boot/at91bootstrap/Config.in
index b232b3b78..9cbaf81ee 100644
--- a/boot/at91bootstrap/Config.in
+++ b/boot/at91bootstrap/Config.in
@@ -10,6 +10,15 @@ config BR2_TARGET_AT91BOOTSTRAP
if BR2_TARGET_AT91BOOTSTRAP
+config BR2_TARGET_AT91BOOTSTRAP_CUSTOM_PATCH_DIR
+ string "custom patch dir"
+ help
+ If your board requires custom patches, add the path to the
+ directory containing the patches here. The patches must be
+ named at91bootstrap-<version>-<something>.patch.
+
+ Most users may leave this empty
+
config BR2_TARGET_AT91BOOTSTRAP_BOARD
string "Bootstrap board"
default ""
diff --git a/boot/at91bootstrap/at91bootstrap.mk b/boot/at91bootstrap/at91bootstrap.mk
index a7a856c6e..5592d3737 100644
--- a/boot/at91bootstrap/at91bootstrap.mk
+++ b/boot/at91bootstrap/at91bootstrap.mk
@@ -21,6 +21,15 @@ define AT91BOOTSTRAP_EXTRACT_CMDS
rmdir $(BUILD_DIR)/Bootstrap-v$(AT91BOOTSTRAP_VERSION)
endef
+ifneq ($(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP_CUSTOM_PATCH_DIR)),)
+define AT91BOOTSTRAP_APPLY_CUSTOM_PATCHES
+ support/scripts/apply-patches.sh $(@D) $(BR2_TARGET_AT91BOOTSTRAP_CUSTOM_PATCH_DIR) \
+ at91bootstrap-$(AT91BOOTSTRAP_VERSION)-\*.patch
+endef
+
+AT91BOOTSTRAP_POST_PATCH_HOOKS += AT91BOOTSTRAP_APPLY_CUSTOM_PATCHES
+endif
+
define AT91BOOTSTRAP_BUILD_CMDS
$(MAKE) CROSS_COMPILE=$(TARGET_CROSS) -C $(@D)/$(AT91BOOTSTRAP_MAKE_SUBDIR)
endef