package/linux-tools/perf: bear the kernel options munging
authorYann E. MORIN <yann.morin.1998@free.fr>
Fri, 1 May 2020 16:22:16 +0000 (18:22 +0200)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Sun, 31 May 2020 21:08:44 +0000 (23:08 +0200)
perf by itself is not a standalone package; instead, it is part of a
bigger package, linux-tools.

Even though perf is the only one to need kernel .config fixups, we still
do it in a generic way, as it blends nicely in the existing variables,
which all use a loop over all the tools.

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
linux/linux.mk
package/linux-tools/linux-tool-perf.mk.in
package/linux-tools/linux-tools.mk

index 69bbad99e1ed296c887c2655601ac7ae02354dd2..60dc343efa80bc4d38907a1a6e34c62df3ff2cf5 100644 (file)
@@ -355,8 +355,6 @@ define LINUX_KCONFIG_FIXUP_CMDS
                $(call KCONFIG_ENABLE_OPT,CONFIG_INOTIFY_USER))
        $(if $(BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV),
                $(call KCONFIG_ENABLE_OPT,CONFIG_NET))
-       $(if $(BR2_PACKAGE_LINUX_TOOLS_PERF),
-               $(call KCONFIG_ENABLE_OPT,CONFIG_PERF_EVENTS))
        $(if $(BR2_LINUX_KERNEL_APPENDED_DTB),
                $(call KCONFIG_ENABLE_OPT,CONFIG_ARM_APPENDED_DTB))
        $(if $(LINUX_KERNEL_CUSTOM_LOGO_PATH),
index 7106b622cb200412918f151f37758bcc184ab8b8..53b7c5b9cd8028b535c90adac81fc41e6abe8ec4 100644 (file)
@@ -158,3 +158,7 @@ define PERF_INSTALL_TARGET_CMDS
        $(RM) -rf $(TARGET_DIR)/usr/libexec/perf-core/scripts/
        $(RM) -rf $(TARGET_DIR)/usr/libexec/perf-core/tests/
 endef
+
+define PERF_LINUX_CONFIG_FIXUPS
+       $(call KCONFIG_ENABLE_OPT,CONFIG_PERF_EVENTS)
+endef
index 65d9e850e0f5df94e61de28433a144128577c1bd..81b1fbc17605d6f003558d113143b64b5af6714d 100644 (file)
@@ -42,6 +42,13 @@ LINUX_TOOLS_POST_INSTALL_TARGET_HOOKS += $(foreach tool,$(LINUX_TOOLS),\
        $(if $(BR2_PACKAGE_LINUX_TOOLS_$(call UPPERCASE,$(tool))),\
                $(call UPPERCASE,$(tool))_INSTALL_TARGET_CMDS))
 
+define LINUX_TOOLS_LINUX_CONFIG_FIXUPS
+       $(foreach tool,$(LINUX_TOOLS),\
+               $(if $(BR2_PACKAGE_LINUX_TOOLS_$(call UPPERCASE,$(tool))),\
+                       $($(call UPPERCASE,$(tool))_LINUX_CONFIG_FIXUPS))
+       )
+endef
+
 define LINUX_TOOLS_INSTALL_INIT_SYSTEMD
        $(foreach tool,$(LINUX_TOOLS),\
                $(if $(BR2_PACKAGE_LINUX_TOOLS_$(call UPPERCASE,$(tool))),\