From patchwork Thu Jan 3 07:50:39 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kaiwan N Billimoria X-Patchwork-Id: 209191 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ozlabs.org (Postfix) with ESMTP id B7BE22C008D for ; Thu, 3 Jan 2013 18:51:05 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 91BA3A0104; Thu, 3 Jan 2013 07:51:05 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id sUNidubhNhZx; Thu, 3 Jan 2013 07:51:03 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 73376A00F9; Thu, 3 Jan 2013 07:51:03 +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 19CC78F74B for ; Thu, 3 Jan 2013 07:51:08 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 0FA858B07A for ; Thu, 3 Jan 2013 07:51:01 +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 7cTIi3AYyflz for ; Thu, 3 Jan 2013 07:51:00 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ie0-f181.google.com (mail-ie0-f181.google.com [209.85.223.181]) by whitealder.osuosl.org (Postfix) with ESMTPS id A9E908B079 for ; Thu, 3 Jan 2013 07:51:00 +0000 (UTC) Received: by mail-ie0-f181.google.com with SMTP id 16so17937018iea.12 for ; Wed, 02 Jan 2013 23:51:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=88hWCiG9mXRd53Mbrul+bhbGMrl/fmfuTwp+3sws3SE=; b=LCpbABACRdkGP8ZTZfJ/HxoZzIzmEkwfrrFH9PR5t4+RhG9kOr3QX7xmuJfmyylSm0 tazcBDe1lFrFVlKVQmKEkDUqJFJZsjXtLx9kh6/JrB399kYJkBUj8YhOCxx5zTzTpEj2 yLrxbUNlcwgH/l4OsCkGJdHZo/MJ63A4ATPkP4maqB9VO1KReywqN7J/6B/EGJff6nVV w5BcIVIXw6QNNDg5ORUP+MOInefvH1i903quYveKtMEgDoAmxmEdimMvW+cV9fO9JJHw U6js58t2lyBlBRA5i+BtS73VDcJuSZ1FIp1vJVcjS9am3Bw1RmNlOCkaU3If5czBzxr+ btzg== Received: by 10.50.178.10 with SMTP id cu10mr37781448igc.75.1357199459889; Wed, 02 Jan 2013 23:50:59 -0800 (PST) MIME-Version: 1.0 Received: by 10.64.138.33 with HTTP; Wed, 2 Jan 2013 23:50:39 -0800 (PST) From: Kaiwan Billimoria Date: Thu, 3 Jan 2013 13:20:39 +0530 Message-ID: To: buildroot@busybox.net Subject: [Buildroot] [PATCH 2/3] Add Perf tools support 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: , Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net Signed-off-by: Kaiwan Billimoria --- linux/linux.mk | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) LINUX_INSTALL_IMAGES = YES diff --git a/linux/linux.mk b/linux/linux.mk index e852f62..056a745 100644 --- a/linux/linux.mk +++ b/linux/linux.mk @@ -31,6 +31,27 @@ LINUX_SITE := $(LINUX_SITE)testing/ endif # -rc endif +#--- Perf: validate: perf minimally requires kernel ver >= 2.6.31 +ifeq ($(BR2_LINUX_KERNEL_USERMODE_TOOLS_PERF), y) + ifeq ($(findstring x2.6.,x$(LINUX_VERSION)),x2.6.) + LINUXVER_SPCS = $(subst ., ,$(LINUX_VERSION)) + REL = $(word 3, $(LINUXVER_SPCS)) + res = $(shell [ ${REL} -lt 31 ] && echo n || echo y ) + ifeq ($(res), n) + $(error Perf minimally requires a kernel ver >= 2.6.31 ! Aborting...) + endif + endif + # FIXME: Where should we place the perf kernel patch? Online? + # Temporarily, at least, it's under linux/ + BR2_LINUX_KERNEL_PATCH += "$(HOST_DIR)/../../linux/perf.patch" + +all: + $(info Building Perf...) + $(TARGET_MAKE_ENV) $(MAKE) ARCH=$(ARCH) CROSS_COMPILE=$(TARGET_CROSS) NO_LIBELF=1 -C $(LINUX_DIR)/tools/perf + # Perf: Copy the perf binary executable to the target rootfs + cp -f $(LINUX_DIR)/tools/perf/perf $(TARGET_DIR)/usr/sbin +endif + LINUX_PATCHES = $(call qstrip,$(BR2_LINUX_KERNEL_PATCH))