All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 2/3] Add Perf tools support
@ 2013-01-03  7:50 Kaiwan Billimoria
  2013-01-03 10:23 ` Thomas Petazzoni
  0 siblings, 1 reply; 3+ messages in thread
From: Kaiwan Billimoria @ 2013-01-03  7:50 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Kaiwan Billimoria <kaiwan.billimoria@gmail.com>
---
 linux/linux.mk |   21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

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))

 LINUX_INSTALL_IMAGES = YES
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-01-03 12:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-03  7:50 [Buildroot] [PATCH 2/3] Add Perf tools support Kaiwan Billimoria
2013-01-03 10:23 ` Thomas Petazzoni
2013-01-03 12:54   ` Kaiwan Billimoria

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.