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>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
This commit is contained in:
Changqing Li 2025-04-28 15:09:21 +08:00 committed by Armin Kuster
parent b537198418
commit 2ee46eed41
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-sg3-utils = "%"
CHECK_VERSION_PV:pn-netperf = "2.7.%" CHECK_VERSION_PV:pn-netperf = "2.7.%"
CHECK_VERSION_PV:pn-bridge-utils = "1.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 = '(x86_64.*|i.86.*)-linux'
COMPATIBLE_HOST:libc-musl = "null" COMPATIBLE_HOST:libc-musl = "null"
KERNEL_VERSION = "${@get_kernelversion_file("${STAGING_KERNEL_BUILDDIR}")}"
inherit linux-kernel-base
SRC_URI += "\ SRC_URI += "\
file://COPYING \ file://COPYING \
" "
@ -91,3 +94,7 @@ do_compile() {
do_install() { do_install() {
oe_runmake DESTDIR="${D}" install oe_runmake DESTDIR="${D}" install
} }
python do_package:prepend() {
d.setVar('PKGV', d.getVar("KERNEL_VERSION").split("-")[0])
}