From patchwork Sun Jul 12 16:44:03 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Romain Naour X-Patchwork-Id: 494154 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ozlabs.org (Postfix) with ESMTP id 4A08F14018C for ; Mon, 13 Jul 2015 02:53:51 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 93E0E332E8; Sun, 12 Jul 2015 16:53:50 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id iAh-1lEf1Wvu; Sun, 12 Jul 2015 16:53:42 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 3F0D5332F0; Sun, 12 Jul 2015 16:53:41 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 5B9141C226F for ; Sun, 12 Jul 2015 16:53:37 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 5385531B58 for ; Sun, 12 Jul 2015 16:53:37 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id J-OggjPG0ybS for ; Sun, 12 Jul 2015 16:53:35 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from zimbra3.corp.accelance.fr (zimbra3.corp.accelance.fr [213.162.49.233]) by silver.osuosl.org (Postfix) with ESMTP id A602025515 for ; Sun, 12 Jul 2015 16:53:35 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by zimbra3.corp.accelance.fr (Postfix) with ESMTP id 6D27E7ED29; Sun, 12 Jul 2015 18:53:34 +0200 (CEST) X-Virus-Scanned: amavisd-new at zimbra3.corp.accelance.fr Received: from zimbra3.corp.accelance.fr ([127.0.0.1]) by localhost (zimbra3.corp.accelance.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jJOpwdoX+xnH; Sun, 12 Jul 2015 18:53:33 +0200 (CEST) Received: from atlas.home (AToulouse-657-1-1031-128.w92-134.abo.wanadoo.fr [92.134.9.128]) by zimbra3.corp.accelance.fr (Postfix) with ESMTPSA id A82587ED45; Sun, 12 Jul 2015 18:53:33 +0200 (CEST) From: Romain Naour To: buildroot@buildroot.org Date: Sun, 12 Jul 2015 18:44:03 +0200 Message-Id: <1436719444-9722-2-git-send-email-romain.naour@openwide.fr> X-Mailer: git-send-email 2.4.3 In-Reply-To: <1436719444-9722-1-git-send-email-romain.naour@openwide.fr> References: <1436719444-9722-1-git-send-email-romain.naour@openwide.fr> Cc: James Knight Subject: [Buildroot] [PATCH 2/3] linux-tools: add cpupower X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" This patch is based on the patch send by James Knight: http://lists.busybox.net/pipermail/buildroot/2015-May/128754.html Signed-off-by: Romain Naour Cc: James Knight Reviewed-by: "Yann E. MORIN" --- linux/Config.in | 3 +++ linux/Config.tools.in | 11 +++++++++++ linux/linux-tool-cpupower.mk | 41 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 55 insertions(+) create mode 100644 linux/Config.tools.in create mode 100644 linux/linux-tool-cpupower.mk diff --git a/linux/Config.in b/linux/Config.in index 8c86a1a..097cde5 100644 --- a/linux/Config.in +++ b/linux/Config.in @@ -364,6 +364,9 @@ config BR2_LINUX_KERNEL_INSTALL_TARGET # Linux extensions source "linux/Config.ext.in" +# Linux tools +source "linux/Config.tools.in" + endif # BR2_LINUX_KERNEL endmenu diff --git a/linux/Config.tools.in b/linux/Config.tools.in new file mode 100644 index 0000000..008e68c --- /dev/null +++ b/linux/Config.tools.in @@ -0,0 +1,11 @@ +menu "Linux Kernel Tools" + +config BR2_LINUX_KERNEL_TOOL_CPUPOWER + bool "cpupower" + depends on !BR2_bfin # pciutils + select BR2_PACKAGE_PCIUTILS + help + cpupower is a collection of tools to examine and tune power + saving related features of your processor. + +endmenu diff --git a/linux/linux-tool-cpupower.mk b/linux/linux-tool-cpupower.mk new file mode 100644 index 0000000..0938fac --- /dev/null +++ b/linux/linux-tool-cpupower.mk @@ -0,0 +1,41 @@ +################################################################################ +# +# Linux kernel cpupower tool +# +################################################################################ + +LINUX_TOOLS += cpupower + +LINUX_TOOL_CPUPOWER_DEPENDENCIES = pciutils + +define LINUX_TOOL_CPUPOWER_BUILD_CMDS + $(Q)if test ! -f $(LINUX_DIR)/tools/power/cpupower/Makefile ; then \ + echo "Your kernel version is too old and does not have the cpupower tool." ; \ + echo "At least kernel 3.4 must be used." ; \ + exit 1 ; \ + fi + + $(TARGET_MAKE_ENV) $(MAKE) -C $(LINUX_DIR)/tools \ + CROSS=$(TARGET_CROSS) \ + CPUFREQ_BENCH=false \ + DEBUG=false \ + cpupower +endef + +define LINUX_TOOL_CPUPOWER_INSTALL_STAGING_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(LINUX_DIR)/tools \ + CROSS=$(TARGET_CROSS) \ + CPUFREQ_BENCH=false \ + DEBUG=false \ + DESTDIR=$(STAGING_DIR) \ + cpupower_install +endef + +define LINUX_TOOL_CPUPOWER_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(LINUX_DIR)/tools \ + CROSS=$(TARGET_CROSS) \ + CPUFREQ_BENCH=false \ + DEBUG=false \ + DESTDIR=$(TARGET_DIR) \ + cpupower_install +endef