diff options
author | Viacheslav Hletenko <v.gletenko@vyos.io> | 2025-05-15 20:59:55 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-05-15 20:59:55 +0300 |
commit | fcbd8d6cb4a005a10e5e23cd66f9303f85d89ae5 (patch) | |
tree | 460e6cf68fe564d81629655015b17fa0082133a0 /scripts/package-build/linux-kernel/patches/kernel/build-linux-perf-package.patch | |
parent | 1cf889b0585daafee03149a128937f3bfa20665f (diff) | |
parent | ffcf9b46ae15ae82472f6172ece36823e38d8c09 (diff) | |
download | vyos-build-fcbd8d6cb4a005a10e5e23cd66f9303f85d89ae5.tar.gz vyos-build-fcbd8d6cb4a005a10e5e23cd66f9303f85d89ae5.zip |
Merge pull request #961 from c-po/kernel-perf-T7253
Kernel: T7253: build linux-perf-$version package
Diffstat (limited to 'scripts/package-build/linux-kernel/patches/kernel/build-linux-perf-package.patch')
-rw-r--r-- | scripts/package-build/linux-kernel/patches/kernel/build-linux-perf-package.patch | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/scripts/package-build/linux-kernel/patches/kernel/build-linux-perf-package.patch b/scripts/package-build/linux-kernel/patches/kernel/build-linux-perf-package.patch new file mode 100644 index 00000000..082ad589 --- /dev/null +++ b/scripts/package-build/linux-kernel/patches/kernel/build-linux-perf-package.patch @@ -0,0 +1,62 @@ +diff --git c/scripts/package/builddeb i/scripts/package/builddeb +index d7dd0d04c70c..6f4a9a7c2c62 100755 +--- c/scripts/package/builddeb ++++ i/scripts/package/builddeb +@@ -182,6 +182,16 @@ install_libc_headers () { + mv $pdir/usr/include/asm $pdir/usr/include/$host_arch/ + } + ++install_perf () { ++ pdir=$1 ++ ++ rm -rf $pdir ++ ++ $MAKE -C tools/ perf_install prefix=$pdir/usr ++ mv tools/perf/$pdir/usr $srctree/$pdir ++ ++} ++ + rm -f debian/files + + packages_enabled=$(dh_listpackages) +@@ -199,6 +209,8 @@ do + install_libc_headers debian/linux-libc-dev;; + linux-headers-*) + install_kernel_headers debian/linux-headers ${package#linux-headers-};; ++ linux-perf-*) ++ install_perf debian/linux-perf ${package};; + esac + done + +@@ -213,6 +225,8 @@ do + create_package ${package} debian/linux-libc-dev;; + linux-headers-*) + create_package ${package} debian/linux-headers;; ++ linux-perf-*) ++ create_package ${package} debian/linux-perf;; + esac + done + +diff --git c/scripts/package/mkdebian i/scripts/package/mkdebian +index 5044224cf671..21f98ae50be0 100755 +--- c/scripts/package/mkdebian ++++ i/scripts/package/mkdebian +@@ -238,6 +238,18 @@ Description: Linux support headers for userspace development + Multi-Arch: same + EOF + ++cat <<EOF >> debian/control ++ ++Package: linux-perf-$version ++Section: devel ++Architecture: $debarch ++Depends: \${shlibs:Depends} ++Description: Performance analysis tools for Linux $version ++ This package contains the 'perf' performance analysis tools for Linux ++ kernel version $version . ++Multi-Arch: same ++EOF ++ + if is_enabled CONFIG_MODULES; then + cat <<EOF >> debian/control + |