summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiago De Franco <hiago.franco@toradex.com>2025-09-10 15:56:35 -0300
committerHiago De Franco <hiago.franco@toradex.com>2025-09-15 10:39:30 -0300
commit8bd92e9117b76290073c7448e8da987bdcd089c6 (patch)
tree6c6af11875f8d558d97f5eaab9ef8fb7539e9888
parentc884e6b86563a011f43959c23eda075828f7d75d (diff)
linux-toradex-upstream: set CVE_VERSION to LINUX_VERSIONscarthgap-7.x.y
By default, CVE_VERSION = $PV, which corresponds to the recipe version (e.g. 6.6, 6.12, 6.12-rt59, ...). To properly track CVEs, we need the full kernel version including the patch level (e.g. 6.6.103, 6.12.44, ...). Set CVE_VERSION to LINUX_VERSION in linux-toradex-upstream so that all tecipes inheriting from it use the correct version string. With that, add a small function to remove any "-rt" suffix from the CVE_VERSION, keeping it only as "MAJOR.MINOR.PATCH". Related-to: ELB-6606 Signed-off-by: Hiago De Franco <hiago.franco@toradex.com>
-rw-r--r--recipes-kernel/linux/linux-toradex-upstream.inc8
1 files changed, 8 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-toradex-upstream.inc b/recipes-kernel/linux/linux-toradex-upstream.inc
index 477ffcb..525c356 100644
--- a/recipes-kernel/linux/linux-toradex-upstream.inc
+++ b/recipes-kernel/linux/linux-toradex-upstream.inc
@@ -19,6 +19,14 @@ DEPENDS += "${@bb.utils.contains('PACKAGECONFIG', 'dt-validation', '', 'python3-
PV = "${LINUX_VERSION}+git${SRCPV}"
+def get_linux_base_version(d):
+ linux_version = d.getVar('LINUX_VERSION')
+ if '-rt' in linux_version:
+ return linux_version.split('-rt')[0]
+ return linux_version
+
+CVE_VERSION = "${@get_linux_base_version(d)}"
+
SRC_URI = " \
${LINUX_REPO};protocol=https;branch=${KBRANCH};name=machine \
${KCONFIG_REPO};protocol=https;type=kmeta;name=meta-toradex-bsp;branch=main;destsuffix=${KMETA} \