From 86846009d14572d56aec0299c14a600ccbbcf3b2 Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Thu, 9 Jan 2020 08:53:59 +0000 Subject: 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 (cherry picked from commit e730835d6230f83d86d03daa38ceaf381d1d15fd) --- classes/toradex-kernel-localversion.bbclass | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 } -- cgit v1.2.3