This is an efficient tool to reflect the status of processors. Turbostat reports processor topology, frequency, idle power-state statistics, temperature and power on processors.
Signed-off-by: Hongzhi.Song <hongzhi.s...@windriver.com> --- meta-oe/recipes-kernel/turbostat/turbostat.bb | 53 +++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 meta-oe/recipes-kernel/turbostat/turbostat.bb diff --git a/meta-oe/recipes-kernel/turbostat/turbostat.bb b/meta-oe/recipes-kernel/turbostat/turbostat.bb new file mode 100644 index 000000000..f4614b406 --- /dev/null +++ b/meta-oe/recipes-kernel/turbostat/turbostat.bb @@ -0,0 +1,53 @@ +SUMMARY = "Report processor frequency and idle statistics" +DESCRIPTION = "turbostat reports processor topology, frequency, idle \ +power-state statistics, temperature and power on modern X86 processors. \ +Either command is forked and statistics are printed upon its completion, \ +or statistics are printed periodically." + +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" + +inherit kernelsrc +PROVIDES = "virtual/turbostat" + +do_populate_lic[depends] += "virtual/kernel:do_patch" +do_configure[depends] += "virtual/kernel:do_shared_workdir" + +B = "${WORKDIR}/${BPN}-${PV}" + +EXTRA_OEMAKE = '\ + -C ${S}/tools/power/x86/turbostat \ + O=${B} \ + CROSS_COMPILE=${TARGET_PREFIX} \ + ARCH=${ARCH} \ + CC="${CC}" \ + AR="${AR}" \ +' + +EXTRA_OEMAKE += "\ + 'prefix=${prefix}' \ + 'bindir=${bindir}' \ + 'sharedir=${datadir}' \ + 'sysconfdir=${sysconfdir}' \ + 'sharedir=${@os.path.relpath(datadir, prefix)}' \ + 'mandir=${@os.path.relpath(mandir, prefix)}' \ + 'infodir=${@os.path.relpath(infodir, prefix)}' \ +" + +do_compile() { + # Linux kernel build system is expected to do the right thing + unset CFLAGS + oe_runmake turbostat +} + +do_install() { + # Linux kernel build system is expected to do the right thing + unset CFLAGS + oe_runmake DESTDIR=${D} install +} + +python do_package_prepend() { + d.setVar('PKGV', d.getVar("KERNEL_VERSION", True).split("-")[0]) +} + +TARGET_CC_ARCH += "${LDFLAGS}" -- 2.11.0 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core