Patrick Williams | 12fc939 | 2021-08-06 09:16:53 -0500 | [diff] [blame^] | 1 | do_kernel_configme:append() { |
Lei YU | b5a2c26 | 2019-05-15 19:52:10 -0400 | [diff] [blame] | 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 | } |