blob: 8fa8947e5e783810676f53f983c6695ee409b8bd [file] [log] [blame]
Lei YUb5a2c262019-05-15 19:52:10 -04001do_kernel_configme_append() {
2 # 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}