* [PATCH] kbuild: save overridden KERNELRELEASE in include/config/kernel.release
@ 2023-01-27 16:19 Masahiro Yamada
0 siblings, 0 replies; only message in thread
From: Masahiro Yamada @ 2023-01-27 16:19 UTC (permalink / raw)
To: linux-kbuild
Cc: linux-kernel, Masahiro Yamada, Nathan Chancellor,
Nick Desaulniers, Nicolas Schier
${KERNELRELEASE} is used as a part of the installation path.
(INSTALL_DTBS_PATH, MODLIB, etc.)
When KERNELRELEASE is overridden from the command line, it should be
saved in include/config/kernel.release, so that it will be consistently
used for the installation steps.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---
This patch will replace the buggy
https://lore.kernel.org/linux-kbuild/20230122141428.115372-6-masahiroy@kernel.org/T/#u
Makefile | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/Makefile b/Makefile
index 203b86e95197..aeea900eff71 100644
--- a/Makefile
+++ b/Makefile
@@ -1258,7 +1258,11 @@ vmlinux: vmlinux.o $(KBUILD_LDS) modpost
# make sure no implicit rule kicks in
$(sort $(KBUILD_LDS) $(KBUILD_VMLINUX_OBJS) $(KBUILD_VMLINUX_LIBS)): . ;
+ifeq ($(origin KERNELRELEASE),file)
filechk_kernel.release = $(srctree)/scripts/setlocalversion $(srctree)
+else
+filechk_kernel.release = echo $(KERNELRELEASE)
+endif
# Store (new) KERNELRELEASE string in include/config/kernel.release
include/config/kernel.release: FORCE
--
2.34.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2023-01-27 16:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-27 16:19 [PATCH] kbuild: save overridden KERNELRELEASE in include/config/kernel.release Masahiro Yamada
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).