aboutsummaryrefslogtreecommitdiffstats
path: root/include/kernel-defaults.mk
diff options
context:
space:
mode:
authorFlorian Fainelli <f.fainelli@gmail.com>2017-05-11 14:33:42 -0700
committerJohn Crispin <john@phrozen.org>2017-05-25 09:22:43 +0200
commitb6746a6ffb738d541b64eb4107e688d36ff86417 (patch)
tree8bdc0a3f9fe63072410ac2a38a5d0c37c2ef71bf /include/kernel-defaults.mk
parentd0a6340717b1103354ba9ca3552b321a909874b4 (diff)
downloadupstream-b6746a6ffb738d541b64eb4107e688d36ff86417.tar.gz
upstream-b6746a6ffb738d541b64eb4107e688d36ff86417.tar.bz2
upstream-b6746a6ffb738d541b64eb4107e688d36ff86417.zip
include: Do not alter KERNELRELEASE for external/git kernels
In case we use external and/or git cloned kernels, let the kernel determine the appropriate KERNELRELEASE. We cannot used LINUX_UNAME_VERSION because that one gets determined at a later time, when the kernel is already built proper. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Diffstat (limited to 'include/kernel-defaults.mk')
-rw-r--r--include/kernel-defaults.mk7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/kernel-defaults.mk b/include/kernel-defaults.mk
index b201865657..bca1f1eeee 100644
--- a/include/kernel-defaults.mk
+++ b/include/kernel-defaults.mk
@@ -24,9 +24,14 @@ KERNEL_MAKEOPTS := -C $(LINUX_DIR) \
CONFIG_SHELL="$(BASH)" \
$(if $(findstring c,$(OPENWRT_VERBOSE)),V=1,V='') \
$(if $(PKG_BUILD_ID),LDFLAGS_MODULE=--build-id=0x$(PKG_BUILD_ID)) \
- KERNELRELEASE=$(LINUX_VERSION) \
cmd_syscalls=
+
+ifeq ($(call qstrip,$(CONFIG_EXTERNAL_KERNEL_TREE))$(call qstrip,$(CONFIG_KERNEL_GIT_CLONE_URI)),)
+ KERNEL_MAKEOPTS += \
+ KERNELRELEASE=$(LINUX_VERSION)
+endif
+
ifdef CONFIG_STRIP_KERNEL_EXPORTS
KERNEL_MAKEOPTS += \
EXTRA_LDSFLAGS="-I$(KERNEL_BUILD_DIR) -include symtab.h"