From patchwork Thu Jan 31 19:48:36 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tzu-Jung Lee X-Patchwork-Id: 217250 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137]) by ozlabs.org (Postfix) with ESMTP id A043C2C008E for ; Fri, 1 Feb 2013 06:53:32 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 6FDD5103AE9; Thu, 31 Jan 2013 19:53:19 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id M5G0Bq73-jtc; Thu, 31 Jan 2013 19:53:12 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id B76FF10B995; Thu, 31 Jan 2013 19:47:57 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 377088F74B for ; Thu, 31 Jan 2013 19:48:16 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 15D468BC11 for ; Thu, 31 Jan 2013 19:48:09 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id F-gaxLEY69bF for ; Thu, 31 Jan 2013 19:48:08 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ye0-f177.google.com (mail-ye0-f177.google.com [209.85.213.177]) by whitealder.osuosl.org (Postfix) with ESMTPS id 0FB4B8BB9E for ; Thu, 31 Jan 2013 19:48:07 +0000 (UTC) Received: by mail-ye0-f177.google.com with SMTP id m14so720415yen.36 for ; Thu, 31 Jan 2013 11:48:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer; bh=w9zCz52PkB2mn6PUspfpvjn89gJPWRht8zj2R8H5RMo=; b=eSHvBPrxXvBXyxR0pjn+HTjWgto241pSByPPwblGfNfUE5trDvZuGujzYUOQFWdpa9 7pDeIhKP2KU+3YsqPkeIUwxtAigsa2+Hm0jLtGMUU+IMb1DT0W9YvKG/4n0Ndr917UC4 qiWS0g9dRGn8pXKC51Mj/T4uOfo/Szts1kndWis+rVM369c1VVl4vCMkYA/a0HIrEwlf 7b2LYc3wWuQnCxm4MB7ahW0B+yVjsqAA0wvdb0XMnILqpCf/w1STnaT1YRHXNzOe+/GB BBsj1w90r/TKww+nNBcy6aoS6B70tOnl4JCaUMhL9MtPY4eWpbPgN3bDgbBaTSN/NhjK Rvew== X-Received: by 10.236.69.71 with SMTP id m47mr11822054yhd.30.1359661686802; Thu, 31 Jan 2013 11:48:06 -0800 (PST) Received: from localhost.ambarella.net (gate.ambarella.com. [63.164.14.162]) by mx.google.com with ESMTPS id j1sm9540132yhn.3.2013.01.31.11.48.04 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 31 Jan 2013 11:48:05 -0800 (PST) From: Tzu-Jung Lee To: buildroot@uclibc.org Date: Fri, 1 Feb 2013 03:48:36 +0800 Message-Id: <1359661716-18081-1-git-send-email-roylee17@gmail.com> X-Mailer: git-send-email 1.8.1 Subject: [Buildroot] [PATCH 1/1] kernel: add support for building kernel companied userspace tools X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 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-bounces@busybox.net Change-Id: I66bdceb3cd76bb69b069b5bd8064e59a67374521 Signed-off-by: Tzu-Jung Lee --- linux/Config.in | 3 +++ linux/Config.tools.in | 15 +++++++++++++++ linux/linux-tools.mk | 19 +++++++++++++++++++ linux/linux.mk | 1 + 4 files changed, 38 insertions(+) create mode 100644 linux/Config.tools.in create mode 100644 linux/linux-tools.mk diff --git a/linux/Config.in b/linux/Config.in index 175a999..19ff356 100644 --- a/linux/Config.in +++ b/linux/Config.in @@ -288,6 +288,9 @@ config BR2_LINUX_KERNEL_INSTALL_TARGET # Linux extensions source "linux/Config.ext.in" +# Linux userspace 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..9fd3ac4 --- /dev/null +++ b/linux/Config.tools.in @@ -0,0 +1,15 @@ +#menu BR2_LINUX_KERNEL_TOOLS +menu "Linux Kernel Userspace Tools" + +# Perf +config BR2_LINUX_KERNEL_TOOLS_PERF + bool "Build Performance analysis tools for Linux" + default n + select BR2_PACKAGE_LIBELF + help + Performance counters for Linux are a new kernel-based + subsystem that provide a framework for all things + performance analysis. It covers hardware level (CPU/PMU, + Performance Monitoring Unit) features and software features + (software counters, tracepoints) as well. +endmenu diff --git a/linux/linux-tools.mk b/linux/linux-tools.mk new file mode 100644 index 0000000..6499dd7 --- /dev/null +++ b/linux/linux-tools.mk @@ -0,0 +1,19 @@ +define LINUX_BUILD_KERNEL_TOOLS_PERF + @$(call MESSAGE,"Building Kernel Tools - Perf") + $(TARGET_MAKE_ENV) $(MAKE) $(LINUX_MAKE_FLAGS) -C $(@D)/tools/perf \ + prefix=$(TARGET_DIR)/usr +endef + +define LINUX_INSTALL_KERNEL_TOOLS_PERF + @$(call MESSAGE,"Installing Kernel Tools - Perf") + $(TARGET_MAKE_ENV) $(MAKE) $(LINUX_MAKE_FLAGS) -C $(@D)/tools/perf \ + prefix=$(TARGET_DIR)/usr install +endef + +ifeq ($(BR2_LINUX_KERNEL_TOOLS_PERF),y) +LINUX_BUILD_KERNEL_TOOLS += LINUX_BUILD_KERNEL_TOOLS_PERF +LINUX_INSTALL_KERNEL_TOOLS += LINUX_INSTALL_KERNEL_TOOLS_PERF +endif + +LINUX_POST_BUILD_HOOKS += $(LINUX_BUILD_KERNEL_TOOLS) +LINUX_POST_INSTALL_TARGET_HOOKS += $(LINUX_INSTALL_KERNEL_TOOLS) diff --git a/linux/linux.mk b/linux/linux.mk index 91a9f50..95bf4a5 100644 --- a/linux/linux.mk +++ b/linux/linux.mk @@ -265,6 +265,7 @@ define LINUX_INSTALL_TARGET_CMDS endef include linux/linux-ext-*.mk +include linux/linux-tools.mk $(eval $(generic-package))