FROMLIST: setlocalversion: use ${objtree}/include/config/auto.conf

setlocalversion reads include/config/auto.conf, which is located below
$(objtree) with commit 214c0eea43 ("kbuild: add $(objtree)/ prefix to
some in-kernel build artifacts").

To be consistent, the setlocalversion script should use
${objtree}/include/config/auto.conf as well.

Signed-off-by: HONG Yifan <elsk@google.com>
Link: https://lore.kernel.org/lkml/20250318005900.2256921-1-elsk@google.com/
Bug: 402239869
Change-Id: Iffd89cad27100eacd48341b3812fbdbf800c6be4
This commit is contained in:
HONG Yifan authored and William McVicker committed 2025-03-19 13:53:26 -07:00
1 parent b6e737ec61
commit 929a5c6bce
1 file changed
+3 -3
+3 -3
View File
@@ -186,16 +186,16 @@ if ${no_local}; then
exit 0
fi
if ! test -e include/config/auto.conf; then
if ! test -e ${objtree}/include/config/auto.conf; then
echo "Error: kernelrelease not valid - run 'make prepare' to update it" >&2
exit 1
fi
# version string from CONFIG_LOCALVERSION
config_localversion=$(sed -n 's/^CONFIG_LOCALVERSION=\(.*\)$/\1/p' include/config/auto.conf)
config_localversion=$(sed -n 's/^CONFIG_LOCALVERSION=\(.*\)$/\1/p' ${objtree}/include/config/auto.conf)
# scm version string if not at the kernel version tag or at the file_localversion
if grep -q "^CONFIG_LOCALVERSION_AUTO=y$" include/config/auto.conf; then
if grep -q "^CONFIG_LOCALVERSION_AUTO=y$" ${objtree}/include/config/auto.conf; then
# full scm version string
scm_version="$(scm_version)"
elif [ "${LOCALVERSION+set}" != "set" ]; then