kernel: add support for building kernel companied userspace tools
PATCH 1/1 kernel: add support for building kernel companied userspace tools
Change-Id I66bdceb3cd76bb69b069b5bd8064e59a67374521
Signed-off-by Tzu-Jung Lee <[email protected]>
--- 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
linux/Config.in +3 -0
@@ -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
linux/Config.tools.in new file +15 -0
@@ -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
linux/linux-tools.mk new file +19 -0
@@ -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)
linux/linux.mk +1 -0
@@ -265,6 +265,7 @@ define LINUX_INSTALL_TARGET_CMDS endef include linux/linux-ext-*.mk +include linux/linux-tools.mk $(eval $(generic-package))
Signature · 1 line
1.8.1
PATCH 1/1 kernel: add support for building kernel companied userspace tools
Dear Tzu-Jung Lee,
linux/Config.tools.in line 14
Quoted 10 lines · Tzu-Jung Lee
linux/Config.tools.in new file +10
-0+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.
Thanks, but we already have a perf package. See package/perf/ in the current Git version of Buildroot (it isn't part of the latest stable 2012.11 release, but it will be part of 2013.02).
See http://git.buildroot.net/buildroot/tree/package/perf.
If it somehow doesn't work for you, do not hesitate to report issues, we'll try to fix them.
Thanks!
Thomas
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com