diff --git a/package/linux-tools/Config.in b/package/linux-tools/Config.in index 732ac65a25..10b6538a59 100644 --- a/package/linux-tools/Config.in +++ b/package/linux-tools/Config.in @@ -76,6 +76,13 @@ comment "perf needs a toolchain w/ dynamic library" if BR2_PACKAGE_LINUX_TOOLS_PERF +config BR2_PACKAGE_LINUX_TOOLS_PERF_SCRIPTS + bool "enable installation of perf scripts" + help + Enable the installation of the perf scripts under + /usr/libexec/perf-core/ which is necessary for running "perf + tests" + config BR2_PACKAGE_LINUX_TOOLS_PERF_TUI bool "enable perf TUI" depends on BR2_USE_MMU # slang diff --git a/package/linux-tools/linux-tool-perf.mk.in b/package/linux-tools/linux-tool-perf.mk.in index d82d45973c..7bba440530 100644 --- a/package/linux-tools/linux-tool-perf.mk.in +++ b/package/linux-tools/linux-tool-perf.mk.in @@ -159,12 +159,18 @@ define PERF_BUILD_CMDS endef # After installation, we remove the Perl and Python scripts from the -# target. +# target unless BR2_PACKAGE_LINUX_TOOLS_PERF_SCRIPTS is enabled +ifeq ($(BR2_PACKAGE_LINUX_TOOLS_PERF_SCRIPTS),) +define PERF_INSTALL_REMOVE_SCRIPTS + $(RM) -rf $(TARGET_DIR)/usr/libexec/perf-core/scripts/ + $(RM) -rf $(TARGET_DIR)/usr/libexec/perf-core/tests/ +endef +endif + define PERF_INSTALL_TARGET_CMDS $(TARGET_MAKE_ENV) $(MAKE1) $(PERF_MAKE_FLAGS) \ -C $(LINUX_DIR)/tools/perf O=$(LINUX_DIR)/tools/perf/ install - $(RM) -rf $(TARGET_DIR)/usr/libexec/perf-core/scripts/ - $(RM) -rf $(TARGET_DIR)/usr/libexec/perf-core/tests/ + $(PERF_INSTALL_REMOVE_SCRIPTS) endef define PERF_LINUX_CONFIG_FIXUPS