Commit 1cb86b6c authored by Masahiro Yamada's avatar Masahiro Yamada

kbuild: save overridden KERNELRELEASE in include/config/kernel.release

${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: default avatarMasahiro Yamada <masahiroy@kernel.org>
parent ec31f868
...@@ -1258,7 +1258,11 @@ vmlinux: vmlinux.o $(KBUILD_LDS) modpost ...@@ -1258,7 +1258,11 @@ vmlinux: vmlinux.o $(KBUILD_LDS) modpost
# make sure no implicit rule kicks in # make sure no implicit rule kicks in
$(sort $(KBUILD_LDS) $(KBUILD_VMLINUX_OBJS) $(KBUILD_VMLINUX_LIBS)): . ; $(sort $(KBUILD_LDS) $(KBUILD_VMLINUX_OBJS) $(KBUILD_VMLINUX_LIBS)): . ;
ifeq ($(origin KERNELRELEASE),file)
filechk_kernel.release = $(srctree)/scripts/setlocalversion $(srctree) filechk_kernel.release = $(srctree)/scripts/setlocalversion $(srctree)
else
filechk_kernel.release = echo $(KERNELRELEASE)
endif
# Store (new) KERNELRELEASE string in include/config/kernel.release # Store (new) KERNELRELEASE string in include/config/kernel.release
include/config/kernel.release: FORCE include/config/kernel.release: FORCE
...@@ -2123,7 +2127,7 @@ checkstack: ...@@ -2123,7 +2127,7 @@ checkstack:
$(PERL) $(srctree)/scripts/checkstack.pl $(CHECKSTACK_ARCH) $(PERL) $(srctree)/scripts/checkstack.pl $(CHECKSTACK_ARCH)
kernelrelease: kernelrelease:
@$(srctree)/scripts/setlocalversion $(srctree) @$(filechk_kernel.release)
kernelversion: kernelversion:
@echo $(KERNELVERSION) @echo $(KERNELVERSION)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment