From 40b1c51500a63adfe09ead9344cafdfd186a55b2 Mon Sep 17 00:00:00 2001 From: Dongjin Kim Date: Sat, 12 Jan 2019 22:22:20 -0500 Subject: [PATCH] Revert "Makefile: lock kernel version without localversion appended" This reverts commit e95ed5b5710829aedfe290181960f4500966c6c2. Change-Id: I3a30f8eebd7f15f22cd363c683d81be374cac976 --- Makefile | 7 +++---- init/version.c | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 070b65f2faa2..b09ba9710185 100644 --- a/Makefile +++ b/Makefile @@ -410,8 +410,7 @@ KBUILD_LDFLAGS_MODULE := -T $(srctree)/scripts/module-common.lds GCC_PLUGINS_CFLAGS := # Read KERNELRELEASE from include/config/kernel.release (if it exists) -KERNELRELEASE = $(shell head -1 include/config/kernel.release 2> /dev/null) -KERNELRELEASE_FULL = $(shell tail -1 include/config/kernel.release 2> /dev/null) +KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null) KERNELVERSION = $(VERSION)$(if $(PATCHLEVEL),.$(PATCHLEVEL)$(if $(SUBLEVEL),.$(SUBLEVEL)))$(EXTRAVERSION) export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION @@ -1090,7 +1089,7 @@ $(vmlinux-dirs): prepare scripts $(Q)$(MAKE) $(build)=$@ define filechk_kernel.release - echo "$(KERNELVERSION)\n$(KERNELVERSION)$$($(CONFIG_SHELL) $(srctree)/scripts/setlocalversion $(srctree))" + echo "$(KERNELVERSION)$$($(CONFIG_SHELL) $(srctree)/scripts/setlocalversion $(srctree))" endef # Store (new) KERNELRELEASE string in include/config/kernel.release @@ -1211,7 +1210,7 @@ define filechk_utsrelease.h echo '"$(KERNELRELEASE)" exceeds $(uts_len) characters' >&2; \ exit 1; \ fi; \ - (echo \#define UTS_RELEASE \"$(KERNELRELEASE)\"; echo \#define UTS_RELEASE_FULL \"$(KERNELRELEASE_FULL)\";) + (echo \#define UTS_RELEASE \"$(KERNELRELEASE)\";) endef define filechk_version.h diff --git a/init/version.c b/init/version.c index 41c4be31e302..fe41a63efed6 100644 --- a/init/version.c +++ b/init/version.c @@ -44,7 +44,7 @@ EXPORT_SYMBOL_GPL(init_uts_ns); /* FIXED STRINGS! Don't touch! */ const char linux_banner[] = - "Linux version " UTS_RELEASE_FULL " (" LINUX_COMPILE_BY "@" + "Linux version " UTS_RELEASE " (" LINUX_COMPILE_BY "@" LINUX_COMPILE_HOST ") (" LINUX_COMPILER ") " UTS_VERSION "\n"; const char linux_proc_banner[] =