Message ID | 20230130144655.1193660-3-maxime.chevallier@bootlin.com |
---|---|
State | Changes Requested |
Headers | show |
Series | introduce the rtla package and its dependencies | expand |
Maxime, All, On 2023-01-30 15:46 +0100, Maxime Chevallier via buildroot spake thusly: > 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 <maxime.chevallier@bootlin.com> > --- > DEVELOPERS | 1 + > package/Config.in | 1 + > package/libtracefs/Config.in | 6 ++++++ > package/libtracefs/libtracefs.mk | 35 ++++++++++++++++++++++++++++++++ Missing hash file. Otherwise, I have the same comments and questions as for libtraceevent. Regards, Yann E. MORIN.
diff --git a/DEVELOPERS b/DEVELOPERS index fcf05e0aa0..fe7194f817 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -2108,6 +2108,7 @@ F: package/timescaledb/ N: Maxime Chevallier <maxime.chevallier@bootlin.com> F: package/libtraceevent/ +F: package/libtracefs N: Michael Durrant <mdurrant@arcturusnetworks.com> 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))
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 <maxime.chevallier@bootlin.com> --- 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