kumquat-buildroot/package/pcm-tools/pcm-tools.mk
Carlos Santos 60eb2cec80 pcm-tools: new package
Processor Counter Monitor (PCM) is an application programming interface
(API) and a set of tools based on the API to monitor performance and
energy metrics of Intel(R) Core(TM), Xeon(R), Atom(TM) and Xeon Phi(TM)
processors.

This package contains a patch on the pmu-query.py script to look for the
pcm-core program at the default path. It's not nice to have a Buildroot
specific patch but let's use one while we look for a solution that is
acceptable upstream.

Signed-off-by: Carlos Santos <casantos@datacom.ind.br>
[Peter: Needs C++, force X86_MSR on in linux]
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2018-12-08 10:44:05 +01:00

36 lines
999 B
Makefile

################################################################################
#
# pcm-tools
#
################################################################################
PCM_TOOLS_VERSION = 201812
PCM_TOOLS_SITE = $(call github,opcm,pcm,$(PCM_TOOLS_VERSION))
PCM_TOOLS_LICENSE = BSD-3-Clause
PCM_TOOLS_LICENSE_FILES = LICENSE
PCM_TOOLS_EXE_FILES = \
pcm-core pcm-iio pcm-lspci pcm-memory pcm-msr pcm-numa \
pcm-pcicfg pcm-pcie pcm-power pcm-sensor pcm-tsx pcm
define PCM_TOOLS_BUILD_CMDS
touch $(@D)/daemon-binaries
$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) \
UNAME=Linux HOST=_LINUX
endef
ifeq ($(BR2_PACKAGE_PCM_TOOLS_PMU_QUERY),y)
define PCM_TOOLS_INSTALL_PMU_QUERY
$(INSTALL) -D -m 755 $(@D)/pmu-query.py $(TARGET_DIR)/usr/bin/pmu-query
endef
endif
define PCM_TOOLS_INSTALL_TARGET_CMDS
$(foreach f,$(PCM_TOOLS_EXE_FILES),\
$(INSTALL) -D -m 755 $(@D)/$(f).x $(TARGET_DIR)/usr/bin/$(f)
)
$(PCM_TOOLS_INSTALL_PMU_QUERY)
endef
$(eval $(generic-package))