summaryrefslogtreecommitdiff
path: root/classes/toradex-kernel-localversion.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'classes/toradex-kernel-localversion.bbclass')
-rw-r--r--classes/toradex-kernel-localversion.bbclass10
1 files changed, 5 insertions, 5 deletions
diff --git a/classes/toradex-kernel-localversion.bbclass b/classes/toradex-kernel-localversion.bbclass
index f23ee58..e2ec3a0 100644
--- a/classes/toradex-kernel-localversion.bbclass
+++ b/classes/toradex-kernel-localversion.bbclass
@@ -10,15 +10,15 @@
# Copyright 2014, 2015 (C) O.S. Systems Software LTDA.
# Copyright 2019 (C) Toradex AG
+inherit toradex-kernel-config
+
TDX_VERSION ??= "0"
SCMVERSION ??= "y"
LOCALVERSION ?= "-${TDX_VERSION}"
kernel_do_configure_append() {
- sed -i -e /CONFIG_LOCALVERSION/d ${B}/.config
- echo "CONFIG_LOCALVERSION=\"${LOCALVERSION}\"" >> ${B}/.config
+ kernel_configure_variable LOCALVERSION "\"${LOCALVERSION}\""
- sed -i -e /CONFIG_LOCALVERSION_AUTO/d ${B}/.config
if [ "${SCMVERSION}" = "y" ]; then
# Add GIT revision to the local version
# SRCREV_machine is used in kernel recipes using kernel-yocto.bbclass,
@@ -40,8 +40,8 @@ kernel_do_configure_append() {
head=`git --git-dir=${S}/.git rev-parse --verify --short HEAD 2> /dev/null`
fi
printf "+git.%s" $head > ${S}/.scmversion
- echo "CONFIG_LOCALVERSION_AUTO=y" >> ${B}/.config
+ kernel_configure_variable LOCALVERSION_AUTO y
else
- echo "# CONFIG_LOCALVERSION_AUTO is not set" >> ${B}/.config
+ kernel_configure_variable LOCALVERSION_AUTO n
fi
}