diff options
author | Chanho Park <chanho61.park@samsung.com> | 2014-01-21 10:11:34 +0900 |
---|---|---|
committer | Marek Szyprowski <m.szyprowski@samsung.com> | 2014-05-15 07:27:00 +0200 |
commit | f556cc03b29ae514d57a8c4206b0ae8a16a68efa (patch) | |
tree | f869c876c6fe137db57d55919424eb89e9ea86d7 /packaging | |
parent | 65fe332e689424f41f4f3db4dfdb97e6fc3cf641 (diff) | |
download | linux-3.10-f556cc03b29ae514d57a8c4206b0ae8a16a68efa.tar.gz linux-3.10-f556cc03b29ae514d57a8c4206b0ae8a16a68efa.tar.bz2 linux-3.10-f556cc03b29ae514d57a8c4206b0ae8a16a68efa.zip |
tizen: packaging: support perf build
Change-Id: Idc375608e3bde344347de6ad37c434b5f16aefbc
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Diffstat (limited to 'packaging')
-rw-r--r-- | packaging/linux-kernel.spec | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/packaging/linux-kernel.spec b/packaging/linux-kernel.spec index bc789fed7d9..ce062c8a249 100644 --- a/packaging/linux-kernel.spec +++ b/packaging/linux-kernel.spec @@ -20,6 +20,12 @@ BuildRoot: %{_tmppath}/%{name}-%{PACKAGE_VERSION}-root BuildRequires: linux-glibc-devel BuildRequires: u-boot-tools BuildRequires: bc +# The below is required for building perf +BuildRequires: libelf-devel +BuildRequires: flex +BuildRequires: bison +BuildRequires: libdw-devel +BuildRequires: python-devel Provides: kernel = %{version}-%{release} Provides: kernel-uname-r = %{fullVersion} @@ -50,6 +56,15 @@ Requires: %{name} = %{version}-%{release} %description devel Prebuilt linux kernel for out-of-tree modules. +%package -n perf +Summary: The 'perf' performance counter tool +Group: Development/System +Provides: perf = %{kernel_full_version} + +%description -n perf +This package provides the "perf" tool that can be used to monitor performance +counter events as well as various kernel internal events. + %prep %setup -q @@ -65,6 +80,10 @@ make EXTRAVERSION="-%{build_id}" dtbs %{?_smp_mflags} # 3. Build modules make EXTRAVERSION="-%{build_id}" modules %{?_smp_mflags} +# 3.1 Build perf +make -s -C tools/lib/traceevent ARCH=%{buildarch} %{?_smp_mflags} +make -s -C tools/perf WERROR=0 ARCH=%{buildarch} + # 4. Create tar repo for build directory tar cpsf linux-kernel-build-%{fullVersion}.tar . @@ -90,6 +109,15 @@ make INSTALL_MOD_STRIP=1 INSTALL_MOD_PATH=%{buildroot} modules_install # 4. Install kernel headers make INSTALL_PATH=%{buildroot} INSTALL_MOD_PATH=%{buildroot} INSTALL_HDR_PATH=%{buildroot}/usr headers_install +# 4.1 Install perf +install -d %{buildroot} +make -s -C tools/perf DESTDIR=%{buildroot} install +install -d %{buildroot}/usr/bin +install -d %{buildroot}/usr/libexec +mv %{buildroot}/bin/* %{buildroot}/usr/bin/ +mv %{buildroot}/libexec/* %{buildroot}/usr/libexec/ +rm %{buildroot}/etc/bash_completion.d/perf + # 5. Restore source and build irectory tar -xf linux-kernel-build-%{fullVersion}.tar -C %{buildroot}/usr/src/linux-kernel-build-%{fullVersion} mv %{buildroot}/usr/src/linux-kernel-build-%{fullVersion}/arch/%{buildarch} . @@ -145,3 +173,8 @@ rm -rf %{buildroot} /boot/config* /lib/modules/%{fullVersion}/kernel /lib/modules/%{fullVersion}/modules.* + +%files -n perf +%license COPYING +/usr/bin/perf +/usr/libexec/perf-core |