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