summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Agner <stefan.agner@toradex.com>2020-01-09 08:53:59 +0000
committerStefan Agner <stefan.agner@toradex.com>2020-01-09 09:44:07 +0000
commit86846009d14572d56aec0299c14a600ccbbcf3b2 (patch)
treedebf97612fd99121a7719e4d9e3a85cf73dc2bb5
parent6f8bfe68fa6262ebec4d818f00e11ede9c7eaf84 (diff)
toradex-kernel-localversion: disable automatic localversion
Actually, LOCALVERSION_AUTO needs to be enabled to make the kernel build system picking up .scmversion. So make sure LOCALVERSION_AUTO is enabled when we generate a .scmversion file and disabled otherwise. Fixes: 1bb212d9311a ("toradex-kernel-localversion: disable automatic localversion") Signed-off-by: Stefan Agner <stefan.agner@toradex.com> (cherry picked from commit e730835d6230f83d86d03daa38ceaf381d1d15fd)
-rw-r--r--classes/toradex-kernel-localversion.bbclass5
1 files changed, 4 insertions, 1 deletions
diff --git a/classes/toradex-kernel-localversion.bbclass b/classes/toradex-kernel-localversion.bbclass
index 80682fd..ce9597c 100644
--- a/classes/toradex-kernel-localversion.bbclass
+++ b/classes/toradex-kernel-localversion.bbclass
@@ -17,11 +17,14 @@ LOCALVERSION ?= "-${TDX_VERSION}"
kernel_do_configure_append() {
sed -i -e /CONFIG_LOCALVERSION/d ${B}/.config
echo "CONFIG_LOCALVERSION=\"${LOCALVERSION}\"" >> ${B}/.config
- echo "# CONFIG_LOCALVERSION_AUTO is not set" >> ${B}/.config
+ sed -i -e /CONFIG_LOCALVERSION_AUTO/d ${B}/.config
if [ "${SCMVERSION}" = "y" ]; then
# Add GIT revision to the local version
head=`git --git-dir=${S}/.git rev-parse --verify --short HEAD 2> /dev/null`
printf "+git.%s" $head > ${S}/.scmversion
+ echo "CONFIG_LOCALVERSION_AUTO=y" >> ${B}/.config
+ else
+ echo "# CONFIG_LOCALVERSION_AUTO is not set" >> ${B}/.config
fi
}