blob: cc08dc386b2c4688c06f0a10a4897d4114f24cc2 [file] [log] [blame]
Patrick Williams12fc9392021-08-06 09:16:53 -05001do_kernel_configme:append() {
Lei YUb5a2c262019-05-15 19:52:10 -04002 # Remove previous CONFIG_LOCALVERSION
3 sed -i '/CONFIG_LOCALVERSION/d' ${B}/.config
4
5 # Latest version after yocto patched (if any)
6 latestVersion="-$(git rev-parse --verify HEAD)"
7 shortLatestVersion="$(echo ${latestVersion} | cut -c1-8)"
8
9 shortLinuxVersionExt="$(echo ${LINUX_VERSION_EXTENSION} | cut -c1-8)"
10
11 if [ "${latestVersion}" != "${LINUX_VERSION_EXTENSION}" ]; then
12 dirtyString="-dirty"
13 echo "CONFIG_LOCALVERSION="\"${shortLinuxVersionExt}${dirtyString}${shortLatestVersion}\" >> ${B}/.config
14 else
15 echo "CONFIG_LOCALVERSION="\"${shortLinuxVersionExt}\" >> ${B}/.config
16 fi
17}