[LAYER] Fix PREFERRED_VERSION variable for kernel
Fix for this workaround commit: https://git.seco.com/edgehog/infrastructure/gitlab-ci/-/commit/a9bf1441d15f1cba43cde92895d5f4ceaa7df563?merge_request_iid=49
Now it should successfully run the scripts/get_kernel_version.sh
in CI/CD
$ BOARD=seco-genio700-e58
$ PREFERRED_KERNEL=$(bitbake virtual/kernel -e | grep ^PREFERRED_PROVIDER_virtual/kernel | awk -F'=' '{print $2}' | sed 's/\"//g' | head -1) && echo $PREFERRED_KERNEL
linux-seco-mtk
$ KERNEL_VERSION=$(bitbake virtual/kernel -e | grep ^PREFERRED_VERSION_${PREFERRED_KERNEL} | awk -F'=' '{print $2}' | sed 's/\"//g' | head -1) && echo $KERNEL_VERSION
5.15%
$ kernel_version="$(echo ${KERNEL_VERSION%\%} | sed 's/\./-/g')" && echo $kernel_version
5-15
Edited by Oleksii Kutuzov