]> code.ossystems Code Review - openembedded-core.git/commitdiff
kernel-yocto: Only override CONFIG_LOCALVERSION if LINUX_VERSION_EXTENSION is set
authorPaul Barker <pbarker@konsulko.com>
Thu, 6 Feb 2020 17:35:49 +0000 (12:35 -0500)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 8 Feb 2020 13:19:56 +0000 (13:19 +0000)
CONFIG_LOCALVERSION may already be set in a defconfig or config fragment
and this should not be unconditionally overridden.

Signed-off-by: Paul Barker <pbarker@konsulko.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/kernel-yocto.bbclass

index 9a4d2864eb89a3f27ed302238aafaea83c92088b..e8a9b1f18ed80e8088f18559773416dc5f018f8e 100644 (file)
@@ -359,8 +359,10 @@ do_kernel_configme() {
                bbfatal_log "Could not configure ${KMACHINE}-${LINUX_KERNEL_TYPE}"
        fi
 
-       echo "# Global settings from linux recipe" >> ${B}/.config
-       echo "CONFIG_LOCALVERSION="\"${LINUX_VERSION_EXTENSION}\" >> ${B}/.config
+       if [ ! -z "${LINUX_VERSION_EXTENSION}" ]; then
+               echo "# Global settings from linux recipe" >> ${B}/.config
+               echo "CONFIG_LOCALVERSION="\"${LINUX_VERSION_EXTENSION}\" >> ${B}/.config
+       fi
 }
 
 addtask kernel_configme before do_configure after do_patch