kernel: prevent adding custom string to localversion
authorJosua Mayer <josua.mayer97@gmail.com>
Wed, 17 Aug 2016 14:18:04 +0000 (16:18 +0200)
committerJohn Crispin <john@phrozen.org>
Thu, 18 Aug 2016 07:49:18 +0000 (09:49 +0200)
When the kernel build picks up a localversion file in the source tree,
that string is unconditionally appended to LOCALVERSION and affects the
uname string.
Make sure to delete any such file.

Signed-off-by: Josua Mayer <josua.mayer97@gmail.com>
include/kernel-defaults.mk

index 47befbaab065b5ff2f02e794a94ad02de42a6585..bae8cd0ee3ecac28cdf140d039d8b0061755c7b5 100644 (file)
@@ -111,6 +111,7 @@ define Kernel/SetNoInitramfs
 endef
 
 define Kernel/Configure/Default
+       rm -f $(LINUX_DIR)/localversion
        $(LINUX_CONF_CMD) > $(LINUX_DIR)/.config.target
 # copy CONFIG_KERNEL_* settings over to .config.target
        awk '/^(#[[:space:]]+)?CONFIG_KERNEL/{sub("CONFIG_KERNEL_","CONFIG_");print}' $(TOPDIR)/.config >> $(LINUX_DIR)/.config.target