summaryrefslogtreecommitdiffstats
path: root/linux
diff options
context:
space:
mode:
Diffstat (limited to 'linux')
-rw-r--r--linux/Config.in9
-rw-r--r--linux/linux.mk23
2 files changed, 16 insertions, 16 deletions
diff --git a/linux/Config.in b/linux/Config.in
index 7b781a422..4ded38bb7 100644
--- a/linux/Config.in
+++ b/linux/Config.in
@@ -70,11 +70,12 @@ config BR2_LINUX_KERNEL_VERSION
#
config BR2_LINUX_KERNEL_PATCH
- string "Custom kernel patch"
+ string "Custom kernel patches"
help
- The location can be an URL, a file path, or a directory. In
- the case of a directory, all files matching linux-*.patch
- will be applied.
+ A space-separated list of patches to apply to the
+ kernel. Each patch can be described as an URL, a local file
+ path, or a directory. In the case of a directory, all files
+ matching linux-*.patch in the directory will be applied.
#
# Configuration selection
diff --git a/linux/linux.mk b/linux/linux.mk
index 639e4cee9..40109acb9 100644
--- a/linux/linux.mk
+++ b/linux/linux.mk
@@ -51,9 +51,8 @@ endif
$(LINUX26_DIR)/.stamp_downloaded:
@$(call MESSAGE,"Downloading kernel")
$(call DOWNLOAD,$(LINUX26_SITE),$(LINUX26_SOURCE))
-ifneq ($(filter ftp://% http://%,$(LINUX26_PATCH)),)
- $(call DOWNLOAD,$(dir $(LINUX26_PATCH)),$(notdir $(LINUX26_PATCH)))
-endif
+ $(foreach patch,$(filter ftp://% http://%,$(LINUX26_PATCH)),\
+ $(call DOWNLOAD,$(dir $(patch)),$(notdir $(patch)))$(sep))
mkdir -p $(@D)
touch $@
@@ -68,15 +67,15 @@ $(LINUX26_DIR)/.stamp_extracted: $(LINUX26_DIR)/.stamp_downloaded
# Patch
$(LINUX26_DIR)/.stamp_patched: $(LINUX26_DIR)/.stamp_extracted
@$(call MESSAGE,"Patching kernel")
-ifneq ($(LINUX26_PATCH),)
-ifneq ($(filter ftp://% http://%,$(LINUX26_PATCH)),)
- toolchain/patch-kernel.sh $(@D) $(DL_DIR) $(notdir $(LINUX26_PATCH))
-else ifeq ($(shell test -d $(LINUX26_PATCH) && echo "dir"),dir)
- toolchain/patch-kernel.sh $(@D) $(LINUX26_PATCH) linux-\*.patch
-else
- toolchain/patch-kernel.sh $(@D) $(dir $(LINUX26_PATCH)) $(notdir $(LINUX26_PATCH))
-endif
-endif
+ for p in $(LINUX26_PATCH) ; do \
+ if echo $$p | grep -q -E "^ftp://|^http://" ; then \
+ toolchain/patch-kernel.sh $(@D) $(DL_DIR) `basename $$p` ; \
+ elif test -d $$p ; then \
+ toolchain/patch-kernel.sh $(@D) $$p linux-\*.patch ; \
+ else \
+ toolchain/patch-kernel.sh $(@D) `dirname $$p` `basename $$p` ; \
+ fi \
+ done
$(Q)touch $@