From patchwork Mon Jan 30 14:46:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Chevallier X-Patchwork-Id: 1734070 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=140.211.166.136; helo=smtp3.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=) Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4P59xp1dCxz1yhq for ; Tue, 31 Jan 2023 01:47:08 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id C791560F95; Mon, 30 Jan 2023 14:47:05 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org C791560F95 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 32bM65eZ8ITb; Mon, 30 Jan 2023 14:47:05 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp3.osuosl.org (Postfix) with ESMTP id 074B160F69; Mon, 30 Jan 2023 14:47:04 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 074B160F69 X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 105D01BF37C for ; Mon, 30 Jan 2023 14:47:03 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id DEDB640A20 for ; Mon, 30 Jan 2023 14:47:02 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org DEDB640A20 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id GUp0XvgWwhTW for ; Mon, 30 Jan 2023 14:47:01 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 0D3BD405A4 Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) by smtp2.osuosl.org (Postfix) with ESMTPS id 0D3BD405A4 for ; Mon, 30 Jan 2023 14:47:00 +0000 (UTC) Received: (Authenticated sender: maxime.chevallier@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 4C14FC0004; Mon, 30 Jan 2023 14:46:58 +0000 (UTC) To: buildroot@buildroot.org Date: Mon, 30 Jan 2023 15:46:52 +0100 Message-Id: <20230130144655.1193660-2-maxime.chevallier@bootlin.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230130144655.1193660-1-maxime.chevallier@bootlin.com> References: <20230130144655.1193660-1-maxime.chevallier@bootlin.com> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1675090018; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=wTcWxsC5HI15IlqtWZk/qLi9BQJ3xbA3Pwi3h3AlFis=; b=fxqJqOgiBtlSYD2MKBwQgOCAlb88THiMVmtPt402z7iPkZeVNd5/ptY4YdM00NbuJ+UxeW vmUgjTj+wf7pD+VFRUuHxE4sBddpbkOoaIVLdnWQG3vw/gKgf9zgsrjVLaE5mgeNrjetoN w09DRfrubXuvgZad/P2FZH1wvQgbKHHPpkMAeczdLF0XTCkpJjNIkMcFhccgUU+SkpVSf8 ZO2gHX0ru6LYNRo3VkmvBm+h5YFGRjx4C2odmYUYKirz8fQ8qwsm1hSSXGCpQvlb5aJHdW TZmOWcr9LJUMsgdPc7mlbVcmkZJo/wWYYvIX1gYMEqLN8/f0SZdYKnsPoA0nGw== X-Mailman-Original-Authentication-Results: smtp2.osuosl.org; dkim=pass (2048-bit key, unprotected) header.d=bootlin.com header.i=@bootlin.com header.a=rsa-sha256 header.s=gm1 header.b=fxqJqOgi Subject: [Buildroot] [PATCH 1/4] package/libtraceevent: new package X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Maxime Chevallier via buildroot From: Maxime Chevallier Reply-To: Maxime Chevallier Cc: Pierre Floury , Giulio Benetti , Thomas Petazzoni , Maxime Chevallier Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" Introduce the libtraceevent library, that used to be bundled with the trace-cmd tool. This library is now used by several tools and libraries such as trace-cmd, libtracefs and rtla. This package tries to install libraries in /usr/local/lib by default, hence the redefinition of the "prefix" variable, so that the library gets installed in "/usr/lib" instead. The same applies to the pkgconfig handling of the proved Makefile, which installs the .pc files in the /usr/local area by default, hence the redefinition of the pkgconfig_dir to either the correct directory within the staging area, or to empty value for the target to avoid installing the .pc in that case. Signed-off-by: Maxime Chevallier --- DEVELOPERS | 3 +++ package/Config.in | 1 + package/libtraceevent/Config.in | 9 +++++++ package/libtraceevent/libtraceevent.mk | 33 ++++++++++++++++++++++++++ 4 files changed, 46 insertions(+) create mode 100644 package/libtraceevent/Config.in create mode 100644 package/libtraceevent/libtraceevent.mk diff --git a/DEVELOPERS b/DEVELOPERS index 706ee80ece..fcf05e0aa0 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -2106,6 +2106,9 @@ F: package/postgresql/ F: package/protozero/ F: package/timescaledb/ +N: Maxime Chevallier +F: package/libtraceevent/ + N: Michael Durrant F: board/arcturus/ F: configs/arcturus_ucp1020_defconfig diff --git a/package/Config.in b/package/Config.in index 83fddf316f..2f0e6dcb18 100644 --- a/package/Config.in +++ b/package/Config.in @@ -117,6 +117,7 @@ menu "Debugging, profiling and benchmark" source "package/kyua/Config.in" source "package/latencytop/Config.in" source "package/libbpf/Config.in" + source "package/libtraceevent/Config.in" source "package/lmbench/Config.in" source "package/lsof/Config.in" source "package/ltp-testsuite/Config.in" diff --git a/package/libtraceevent/Config.in b/package/libtraceevent/Config.in new file mode 100644 index 0000000000..d351e3b4de --- /dev/null +++ b/package/libtraceevent/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_LIBTRACEEVENT + bool "libtraceevent" + help + libtraceevent is a library that interfaces with the ftrace + subsystem in the linux kernel. + It used to be bundled directly in the trace-cmd + tool, but it was eventually extracted so that it can be used + by multiple other tools and libraries, such as libtracefs and + rtla. diff --git a/package/libtraceevent/libtraceevent.mk b/package/libtraceevent/libtraceevent.mk new file mode 100644 index 0000000000..0125023508 --- /dev/null +++ b/package/libtraceevent/libtraceevent.mk @@ -0,0 +1,33 @@ +################################################################################ +# +# libtraceevent +# +################################################################################ + +LIBTRACEEVENT_VERSION = 1.7.1 +LIBTRACEEVENT_SITE = https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/snapshot +LIBTRACEEVENT_INSTALL_STAGING = YES +LIBTRACEEVENT_LICENSE = GPL-2.0, LGPL-2.1 +LIBTRACEEVENT_LICENSE_FILES = LICENSES/GPL-2.0 LICENSES/LGPL-2.1 + +define LIBTRACEEVENT_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) +endef + +define LIBTRACEEVENT_INSTALL_STAGING_CMDS + $(TARGET_MAKE_ENV) $(MAKE1) -C $(@D) $(TARGET_CONFIGURE_OPTS) \ + DESTDIR=$(STAGING_DIR) \ + pkgconfig_dir="/usr/lib/pkgconfig" \ + prefix="/usr" \ + install +endef + +define LIBTRACEEVENT_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE1) -C $(@D) $(TARGET_CONFIGURE_OPTS) \ + DESTDIR=$(TARGET_DIR) \ + pkgconfig_dir="" \ + prefix="/usr" \ + install +endef + +$(eval $(generic-package)) From patchwork Mon Jan 30 14:46:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Chevallier X-Patchwork-Id: 1734071 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=140.211.166.133; helo=smtp2.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=) Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4P59y06dtxz1yhq for ; Tue, 31 Jan 2023 01:47:20 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id E302240A21; Mon, 30 Jan 2023 14:47:18 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org E302240A21 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NheM5w_johUP; Mon, 30 Jan 2023 14:47:18 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp2.osuosl.org (Postfix) with ESMTP id 0AA6040A14; Mon, 30 Jan 2023 14:47:17 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 0AA6040A14 X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 46B161BF947 for ; Mon, 30 Jan 2023 14:47:03 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 1F7F9410A1 for ; Mon, 30 Jan 2023 14:47:03 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 1F7F9410A1 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id yLAF7WzOxmLz for ; Mon, 30 Jan 2023 14:47:01 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 31B4E410A0 Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) by smtp4.osuosl.org (Postfix) with ESMTPS id 31B4E410A0 for ; Mon, 30 Jan 2023 14:47:00 +0000 (UTC) Received: (Authenticated sender: maxime.chevallier@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id EE266C000E; Mon, 30 Jan 2023 14:46:58 +0000 (UTC) To: buildroot@buildroot.org Date: Mon, 30 Jan 2023 15:46:53 +0100 Message-Id: <20230130144655.1193660-3-maxime.chevallier@bootlin.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230130144655.1193660-1-maxime.chevallier@bootlin.com> References: <20230130144655.1193660-1-maxime.chevallier@bootlin.com> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1675090019; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DHKeWJ0bXQzYhLEIZGlbmuDXIGuuTlAoX+RHKUpxYuo=; b=SBJ0duwgtaW0bptZTZkfL7Un1WtgRXpZe6sQ2DmCBgU4VYXXHD2NwjK7qLW11r6sANenmA jFOaEkF593mC/IUwhz8wij9xIKNYS4LsV8vBkdUvabYxtBrsnEKwwIe47jKapM6+0Oy3jF 2oB4MjyiZFBmYA+H2gxft9nztwJC+61YrP+C0JK7EJpGimvqXEXAOKlpEOWAdBlrPR4vsS DJX117y2nCSZ404SHKT08OitjNijzOhgmEthxTjUJNS+MuzOG3f8usr2kKi7qqi1llaJBc MFDnPk5l7afotMP3oetSlOtei2fC6lR/6scentBrTUSrwnAliPAeZcz+V0rRtA== X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dkim=pass (2048-bit key, unprotected) header.d=bootlin.com header.i=@bootlin.com header.a=rsa-sha256 header.s=gm1 header.b=SBJ0duwg Subject: [Buildroot] [PATCH 2/4] package/libtracefs: new package X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Maxime Chevallier via buildroot From: Maxime Chevallier Reply-To: Maxime Chevallier Cc: Pierre Floury , Giulio Benetti , Thomas Petazzoni , Maxime Chevallier Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" Introduce the libtracefs library, that used to be bundled with the trace-cmd tool. This library is now used by several tools and libraries such as trace-cmd and rtla, and is used as an interface to the ftrace kernel subsystem through tracefs. This package tries to install libraries in /usr/local/lib by default, hence the redefinition of the "prefix" variable, so that the library gets installed in "/usr/lib" instead. The same applies to the pkgconfig handling of the proved Makefile, which installs the .pc files in the /usr/local area by default, hence the redefinition of the pkgconfig_dir to either the correct directory within the staging area, or to empty value for the target to avoid installing the .pc in that case. Signed-off-by: Maxime Chevallier --- DEVELOPERS | 1 + package/Config.in | 1 + package/libtracefs/Config.in | 6 ++++++ package/libtracefs/libtracefs.mk | 35 ++++++++++++++++++++++++++++++++ 4 files changed, 43 insertions(+) create mode 100644 package/libtracefs/Config.in create mode 100644 package/libtracefs/libtracefs.mk diff --git a/DEVELOPERS b/DEVELOPERS index fcf05e0aa0..fe7194f817 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -2108,6 +2108,7 @@ F: package/timescaledb/ N: Maxime Chevallier F: package/libtraceevent/ +F: package/libtracefs N: Michael Durrant F: board/arcturus/ diff --git a/package/Config.in b/package/Config.in index 2f0e6dcb18..47e59374e2 100644 --- a/package/Config.in +++ b/package/Config.in @@ -118,6 +118,7 @@ menu "Debugging, profiling and benchmark" source "package/latencytop/Config.in" source "package/libbpf/Config.in" source "package/libtraceevent/Config.in" + source "package/libtracefs/Config.in" source "package/lmbench/Config.in" source "package/lsof/Config.in" source "package/ltp-testsuite/Config.in" diff --git a/package/libtracefs/Config.in b/package/libtracefs/Config.in new file mode 100644 index 0000000000..92ce0986df --- /dev/null +++ b/package/libtracefs/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_LIBTRACEFS + bool "libtracefs" + select BR2_PACKAGE_LIBTRACEEVENT + help + libtracefs is used to easily interface with the ftrace + interface through the tracefs virtual filesystem. diff --git a/package/libtracefs/libtracefs.mk b/package/libtracefs/libtracefs.mk new file mode 100644 index 0000000000..4ee6e38105 --- /dev/null +++ b/package/libtracefs/libtracefs.mk @@ -0,0 +1,35 @@ +################################################################################ +# +# libtracefs +# +################################################################################ + +LIBTRACEFS_VERSION = 1.6.4 +LIBTRACEFS_SITE = https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/snapshot +LIBTRACEFS_INSTALL_STAGING = YES +LIBTRACEFS_LICENSE = GPL-2.0, LGPL-2.1 +LIBTRACEFS_LICENSE_FILES = LICENSES/GPL-2.0 LICENSES/LGPL-2.1 + +LIBTRACEFS_DEPENDENCIES = host-pkgconf libtraceevent + +define LIBTRACEFS_BUILD_CMDS + $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) +endef + +define LIBTRACEFS_INSTALL_STAGING_CMDS + $(TARGET_MAKE_ENV) $(MAKE1) -C $(@D) $(TARGET_CONFIGURE_OPTS) \ + DESTDIR=$(STAGING_DIR) \ + pkgconfig_dir="/usr/lib/pkgconfig" \ + prefix="/usr" \ + install +endef + +define LIBTRACEFS_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE1) -C $(@D) $(TARGET_CONFIGURE_OPTS) \ + DESTDIR=$(TARGET_DIR) \ + pkgconfig_dir="" \ + prefix="/usr" \ + install +endef + +$(eval $(generic-package)) From patchwork Mon Jan 30 14:46:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Chevallier X-Patchwork-Id: 1734108 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=2605:bc80:3010::136; helo=smtp3.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=) Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4P5B9N382Jz23hS for ; Tue, 31 Jan 2023 01:57:12 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 8D56860F9C; Mon, 30 Jan 2023 14:57:10 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 8D56860F9C X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id cVfKTK4bPcaI; Mon, 30 Jan 2023 14:57:09 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp3.osuosl.org (Postfix) with ESMTP id D461960F79; Mon, 30 Jan 2023 14:57:08 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org D461960F79 X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 9DB731BF37C for ; Mon, 30 Jan 2023 14:57:07 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 816FA60F79 for ; Mon, 30 Jan 2023 14:57:07 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 816FA60F79 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9kp3hIiv1KmY for ; Mon, 30 Jan 2023 14:57:06 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 4D9B960AEB Received: from mslow1.mail.gandi.net (mslow1.mail.gandi.net [217.70.178.240]) by smtp3.osuosl.org (Postfix) with ESMTPS id 4D9B960AEB for ; Mon, 30 Jan 2023 14:57:06 +0000 (UTC) Received: from relay6-d.mail.gandi.net (unknown [217.70.183.198]) by mslow1.mail.gandi.net (Postfix) with ESMTP id F1804CCCA6 for ; Mon, 30 Jan 2023 14:47:03 +0000 (UTC) Received: (Authenticated sender: maxime.chevallier@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 898DFC0005; Mon, 30 Jan 2023 14:46:59 +0000 (UTC) To: buildroot@buildroot.org Date: Mon, 30 Jan 2023 15:46:54 +0100 Message-Id: <20230130144655.1193660-4-maxime.chevallier@bootlin.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230130144655.1193660-1-maxime.chevallier@bootlin.com> References: <20230130144655.1193660-1-maxime.chevallier@bootlin.com> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1675090020; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fBRk1Jj1L7DY+nljN2f5BZcHFOuRPvMc5f/XNq+zsWg=; b=UFk+4gGvUBogOdtThiwJkzRtAW0KROQrNTGH6b7wkRcUr3hkFTUIcMmAc3izPKjjLEbmjr vEWCcMeor11gz0s48oExRJp+nKaXC6HbR0ENEOzyZHHd/KgUaQGKgqUDjG7jf+cNonit4A NLBIAA/Bk59U/iHHz7gfSR6bJ8YRyS9+MfmsSTy+J6E+721onXQvd8MpLJacb2pJzTxexK J6RyDlgVesE5BkE9UhAgIkSsNMwByrs1Ov/FE70iUto6iQ85KCYXEYWfWKhQ8nkscreCJG vgSA/RYenKA0UfEX5FekppZe/hIUU9q4HQFJZCtZefTnrVGz7QaCMOEwaUeKHw== X-Mailman-Original-Authentication-Results: smtp3.osuosl.org; dkim=pass (2048-bit key, unprotected) header.d=bootlin.com header.i=@bootlin.com header.a=rsa-sha256 header.s=gm1 header.b=UFk+4gGv Subject: [Buildroot] [PATCH 3/4] package/linux-tools: add rtla X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Maxime Chevallier via buildroot From: Maxime Chevallier Reply-To: Maxime Chevallier Cc: Pierre Floury , Giulio Benetti , Thomas Petazzoni , Maxime Chevallier Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" The RealTime Linux Analysis tool includes a set of commands that relies on the osnoise and timerlat tracers from the ftrace kernel subsystem, allowing to analyze the lantency sources coming from the hardware and the kernel itself. This tool was introduced in v5.17, and relies on libtracefs and libtraceevent, although libtraceevent itself is already a dependency for libtracefs. Signed-off-by: Maxime Chevallier --- DEVELOPERS | 1 + package/linux-tools/Config.in | 10 +++++++ package/linux-tools/linux-tool-rtla.mk.in | 32 +++++++++++++++++++++++ 3 files changed, 43 insertions(+) create mode 100644 package/linux-tools/linux-tool-rtla.mk.in diff --git a/DEVELOPERS b/DEVELOPERS index fe7194f817..8f459c796a 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -2109,6 +2109,7 @@ F: package/timescaledb/ N: Maxime Chevallier F: package/libtraceevent/ F: package/libtracefs +F: package/linux-tools/linux-tool-rtla.mk.in N: Michael Durrant F: board/arcturus/ diff --git a/package/linux-tools/Config.in b/package/linux-tools/Config.in index 8a0b6d5802..186392b816 100644 --- a/package/linux-tools/Config.in +++ b/package/linux-tools/Config.in @@ -102,6 +102,16 @@ config BR2_PACKAGE_LINUX_TOOLS_PERF_NEEDS_HOST_PYTHON3 endif +config BR2_PACKAGE_LINUX_TOOLS_RTLA + bool "rtla" + select BR2_PACKAGE_LINUX_TOOLS + select BR2_PACKAGE_LIBTRACEFS + help + Linux 5.17 and later has 2 new tracers, osnoise and timerlat. + There tracers allow performing latency analysis, for which + the rtla tool provides wrapper commands to visualize and + extrace latency traces and reports. + config BR2_PACKAGE_LINUX_TOOLS_SELFTESTS bool"selftests" depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS # bash diff --git a/package/linux-tools/linux-tool-rtla.mk.in b/package/linux-tools/linux-tool-rtla.mk.in new file mode 100644 index 0000000000..a736e3b785 --- /dev/null +++ b/package/linux-tools/linux-tool-rtla.mk.in @@ -0,0 +1,32 @@ +################################################################################ +# +# rtla +# +################################################################################ + +LINUX_TOOLS += rtla + +RTLA_DEPENDENCIES = host-pkgconf libtracefs +RTLA_MAKE_OPTS = $(LINUX_MAKE_FLAGS) \ + CC=$(TARGET_CC) \ + LDFLAGS="$(TARGET_LDFLAGS)" \ + PKG_CONFIG_PATH=$(STAGING_DIR)/usr/lib/pkgconfig + +define RTLA_BUILD_CMDS + $(Q)if ! grep install $(LINUX_DIR)/tools/tracing/rtla/Makefile >/dev/null 2>&1 ; then \ + echo "Your kernel version is too old and does not implement the rtla tool." ; \ + echo "At least kernel 5.17 must be used." ; \ + exit 1 ; \ + fi + + $(TARGET_MAKE_ENV) \ + $(MAKE) $(RTLA_MAKE_OPTS) \ + -C $(LINUX_DIR)/tools/tracing rtla +endef + +define RTLA_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(LINUX_DIR)/tools/tracing \ + $(RTLA_MAKE_OPTS) \ + DESTDIR=$(TARGET_DIR) \ + rtla_install +endef From patchwork Mon Jan 30 14:46:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Chevallier X-Patchwork-Id: 1734072 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=140.211.166.138; helo=smtp1.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=) Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4P59yG3N4vz1yhq for ; Tue, 31 Jan 2023 01:47:34 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 5825C81C19; Mon, 30 Jan 2023 14:47:32 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 5825C81C19 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jmzOIn_rbMwe; Mon, 30 Jan 2023 14:47:31 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp1.osuosl.org (Postfix) with ESMTP id 7F62B81CA5; Mon, 30 Jan 2023 14:47:30 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 7F62B81CA5 X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id F065C1BF37C for ; Mon, 30 Jan 2023 14:47:03 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id BD72D81BB0 for ; Mon, 30 Jan 2023 14:47:03 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org BD72D81BB0 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0aJn9ui5XaAB for ; Mon, 30 Jan 2023 14:47:03 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 7C98E81B7B Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) by smtp1.osuosl.org (Postfix) with ESMTPS id 7C98E81B7B for ; Mon, 30 Jan 2023 14:47:02 +0000 (UTC) Received: (Authenticated sender: maxime.chevallier@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 3DF82C0015; Mon, 30 Jan 2023 14:47:00 +0000 (UTC) To: buildroot@buildroot.org Date: Mon, 30 Jan 2023 15:46:55 +0100 Message-Id: <20230130144655.1193660-5-maxime.chevallier@bootlin.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230130144655.1193660-1-maxime.chevallier@bootlin.com> References: <20230130144655.1193660-1-maxime.chevallier@bootlin.com> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1675090020; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=pqNEponXjR902Z6qWotM4xwAKbIjGQ9dctvyFJ05eA8=; b=c+g20LVT+Yyy8FD3Q00v0rSjonySWj/a9mwygQMxzXG+k81PK/U5ucTIF+mN2VZGxStY0d jQX94Q62h0xGhy5IuHGrWcoV5M2x84Yz+XqjV3tDeohtlrG7xzRab8ojr0av13EkHz82sy J5O8NiIgqQskkIR3/1jNLnh1M/JEITstZJpqNeDsteDEpMpLjvUKRH4NBPZgNilHZ/EQyO halWvcy7XCy0XHm7cwZkdZ4jbU2rv+hhE8mLO/VnI1LF+Jznh/ohBRILYzsoYTL+zSPKgy EzjdU60i3/bjgsDg/Sgtb+olaWGOJNjsNyvPMGKONMV+zSYwcOOIMIa2EXLwXg== X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dkim=pass (2048-bit key, unprotected) header.d=bootlin.com header.i=@bootlin.com header.a=rsa-sha256 header.s=gm1 header.b=c+g20LVT Subject: [Buildroot] [PATCH 4/4] package/trace-cmd: bump to 3.1.5 X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Maxime Chevallier via buildroot From: Maxime Chevallier Reply-To: Maxime Chevallier Cc: Pierre Floury , Giulio Benetti , Thomas Petazzoni , Maxime Chevallier Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" trace-cmd's dependencies 'libtracefs' and 'libtraceevent' were split into dedicated projects, maintained outside of trace-cmd. This release, on top of bumping the version, adds this new dependencies. Signed-off-by: Maxime Chevallier --- package/trace-cmd/Config.in | 2 ++ package/trace-cmd/trace-cmd.hash | 2 +- package/trace-cmd/trace-cmd.mk | 6 ++++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/package/trace-cmd/Config.in b/package/trace-cmd/Config.in index 2d0accd7ae..00b9ebbd9a 100644 --- a/package/trace-cmd/Config.in +++ b/package/trace-cmd/Config.in @@ -4,6 +4,8 @@ config BR2_PACKAGE_TRACE_CMD depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL depends on BR2_USE_MMU # fork() depends on !BR2_STATIC_LIBS # dlopen() + select BR2_PACKAGE_LIBTRACEEVENT + select BR2_PACKAGE_LIBTRACEFS help Command line reader for ftrace. diff --git a/package/trace-cmd/trace-cmd.hash b/package/trace-cmd/trace-cmd.hash index 4d39e4d5ea..c0c20dc317 100644 --- a/package/trace-cmd/trace-cmd.hash +++ b/package/trace-cmd/trace-cmd.hash @@ -1,5 +1,5 @@ # Locally computed -sha256 a74d9ade2633b88d0ad199360d51996427e23f4835594133e456cd6e3bd3a651 trace-cmd-v2.9.7.tar.gz +sha256 9af1ea00e312d03639470e126fa9c786789f03c16df93a57c0bc90eeffbc7d50 trace-cmd-v3.1.5.tar.gz sha256 b1d04b850c1c7471b0f0896f6c6f0fcfc9f07e2dd183a5f5826af269fe9e88fb COPYING sha256 70f297763149e72306919c924e164f83041d5e512868d4c8c1826c171b3e49f9 COPYING.LIB sha256 f6b78c087c3ebdf0f3c13415070dd480a3f35d8fc76f3d02180a407c1c812f79 LICENSES/GPL-2.0 diff --git a/package/trace-cmd/trace-cmd.mk b/package/trace-cmd/trace-cmd.mk index 52bb99036c..049ec12925 100644 --- a/package/trace-cmd/trace-cmd.mk +++ b/package/trace-cmd/trace-cmd.mk @@ -4,14 +4,14 @@ # ################################################################################ -TRACE_CMD_VERSION = 2.9.7 +TRACE_CMD_VERSION = 3.1.5 TRACE_CMD_SOURCE = trace-cmd-v$(TRACE_CMD_VERSION).tar.gz TRACE_CMD_SITE = \ https://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git/snapshot TRACE_CMD_LICENSE = GPL-2.0, LGPL-2.1 TRACE_CMD_LICENSE_FILES = COPYING COPYING.LIB LICENSES/GPL-2.0 LICENSES/LGPL-2.1 -TRACE_CMD_DEPENDENCIES = host-pkgconf +TRACE_CMD_DEPENDENCIES = host-pkgconf libtracefs libtraceevent TRACE_CMD_MAKE_OPTS = prefix=/usr etcdir=/etc ifeq ($(BR2_PACKAGE_AUDIT),y) @@ -34,6 +34,8 @@ ifeq ($(BR2_sparc64),y) TRACE_CMD_CFLAGS += -fPIC endif +TRACE_CMD_CFLAGS += $($(HOST_DIR)/bin/pkg-config --cflags libtracefs) + # trace-cmd use CPPFLAGS to add some extra flags. # But like for CFLAGS, $(TARGET_CPPFLAGS) contains _LARGEFILE64_SOURCE # that causes build problems.