turbostat: make turbostat's version align with kernel version

* Current PV 3.4 is the kernel version when the recipe is newly added,
set PKGV to KERNEL_VERSION to make it always align with kernel version
* turbostat has its runtime version, set CHECK_VERSION_PV to this version to mute
the version mismatch warning
[snip of turbostat.c]
void print_version()
{
    fprintf(outf, "turbostat version 2024.07.26 - Len Brown <lenb@kernel.org>\n");
}
[snip]

Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Changqing Li
2025-04-14 16:27:17 +08:00
committed by Khem Raj
parent 7ca0d9b6d4
commit d6c334c526
2 changed files with 8 additions and 0 deletions

View File

@@ -22,3 +22,4 @@ CHECK_VERSION_PV:pn-luajit = "${PV}.%"
CHECK_VERSION_PV:pn-sg3-utils = "%"
CHECK_VERSION_PV:pn-netperf = "2.7.%"
CHECK_VERSION_PV:pn-bridge-utils = "1.7%"
CHECK_VERSION_PV:pn-turbostat = "2024.07.26"

View File

@@ -16,6 +16,9 @@ LIC_FILES_CHKSUM = "file://${UNPACKDIR}/COPYING;md5=bbea815ee2795b2f4230826c0c6b
COMPATIBLE_HOST = '(x86_64.*|i.86.*)-linux'
COMPATIBLE_HOST:libc-musl = "null"
KERNEL_VERSION = "${@get_kernelversion_file("${STAGING_KERNEL_BUILDDIR}")}"
inherit linux-kernel-base
SRC_URI += "\
file://COPYING \
"
@@ -91,3 +94,7 @@ do_compile() {
do_install() {
oe_runmake DESTDIR="${D}" install
}
python do_package:prepend() {
d.setVar('PKGV', d.getVar("KERNEL_VERSION").split("-")[0])
}