From: Sylwester Nawrocki Date: Tue, 2 Feb 2021 18:16:12 +0000 (+0100) Subject: Add perf package build X-Git-Tag: submit/tizen/20210204.012538~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4ec7cc3e85ec61360059af79ef5947c65ad5b889;p=platform%2Fkernel%2Flinux-amlogic.git Add perf package build Add build of the perf performance monitoring tool package. Based on spec from the platform/kernel/linux-rpi3 kernel tree. Change-Id: Iedee81ac5f81f63c40ed6a379f2fca3f793c4d8b Signed-off-by: Sylwester Nawrocki --- diff --git a/packaging/linux-amlogic.spec b/packaging/linux-amlogic.spec index fb61b40e8cb1..2aef3dc3ad19 100644 --- a/packaging/linux-amlogic.spec +++ b/packaging/linux-amlogic.spec @@ -34,6 +34,12 @@ BuildRequires: module-init-tools BuildRequires: bison BuildRequires: flex BuildRequires: libopenssl1.1-devel +BuildRequires: libunwind-devel +BuildRequires: libdw-devel +BuildRequires: libelf-devel +BuildRequires: elfutils +BuildRequires: xz-devel +BuildRequires: binutils-devel %description The Linux Kernel, the operating system core itself @@ -115,6 +121,15 @@ Provides: linux-kernel-devel-amlogic-kvim = %{version}-%{CHIPSET}-kvim %description -n linux-kernel-devel-amlogic-kvim This package provides kernel map and etc information. %endif + +%package -n linux-kernel-perf +Summary: The perf performance counter tool +Group: System/Kernel +Provides: perf = %{fullVersion} + +%description -n linux-kernel-perf +This package provides the "perf" tool that can be used to monitor performance +counter events as well as various kernel internal events. ## 0. End of Packages lists %prep @@ -212,6 +227,14 @@ mv %{_builddir}/uapi-headers/usr %{buildroot} mv %{_builddir}/boot/* %{buildroot}/boot mv %{_builddir}/lib %{buildroot} %endif + +# 2-3. Install perf +install -d %{buildroot}/usr +make -s -C tools/perf EXTRA_CFLAGS="-fPIE -rdynamic" DESTDIR=%{buildroot}/usr install NO_LIBPERL=1 +rm -rf %{buildroot}/usr/etc +rm -rf %{buildroot}/usr/lib/debug +rm -rf %{buildroot}/usr/lib/perf +rm -rf %{buildroot}/usr/share ## 2. End of install steps %clean @@ -252,4 +275,10 @@ rm -rf %{_builddir}/lib %files -n linux-kernel-devel-amlogic-kvim /boot/%{TARGET_VIMS}/kernel/* %endif + +%files -n linux-kernel-perf +%license COPYING +/usr/bin/* +/usr/libexec/* +/usr/lib/traceevent/* ## 3. End of rpm pack