public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: "'Isaac True' via isar-users" <isar-users@googlegroups.com>
To: isar-users@googlegroups.com
Cc: Isaac True <itrue@emlix.com>
Subject: [PATCH 2/3] linux-custom: build perf and add it to linux-tools
Date: Wed, 26 Nov 2025 09:59:02 +0100	[thread overview]
Message-ID: <20251126090202.3091051-7-itrue@emlix.com> (raw)
In-Reply-To: <20251126090202.3091051-5-itrue@emlix.com>

Build the perf tool as part of the kernel build process and add it to
the linux-tools package, allowing users to install it to their target
rootfs.

Signed-off-by: Isaac True <itrue@emlix.com>
---
 meta/recipes-kernel/linux/files/debian/isar/build.tmpl   | 1 +
 meta/recipes-kernel/linux/files/debian/isar/install.tmpl | 5 +++++
 meta/recipes-kernel/linux/files/debian/rules.tmpl        | 2 +-
 3 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-kernel/linux/files/debian/isar/build.tmpl b/meta/recipes-kernel/linux/files/debian/isar/build.tmpl
index b4c105c1..e8d692d5 100644
--- a/meta/recipes-kernel/linux/files/debian/isar/build.tmpl
+++ b/meta/recipes-kernel/linux/files/debian/isar/build.tmpl
@@ -23,6 +23,7 @@ do_build() {
 
     if echo "${DEB_BUILD_PROFILES}" | grep -q "kernel"; then # Build kernel scripts and tools
         ${MAKE} O=${KERNEL_BUILD_DIR} ${PARALLEL_MAKE} ${KERNEL_EXTRA_BUILDARGS} KCFLAGS="${KCFLAGS}" KAFLAGS="${KAFLAGS}"
+        ${MAKE} O=${KERNEL_BUILD_DIR} ${PARALLEL_MAKE} ${KERNEL_EXTRA_BUILDARGS} KCFLAGS="${KCFLAGS}" KAFLAGS="${KAFLAGS}" -C tools/perf
     elif echo "${DEB_BUILD_PROFILES}" | grep -q "kbuild"; then # Build kernel scripts and tools
         ${MAKE} O=${KERNEL_BUILD_DIR} ${PARALLEL_MAKE} ${KERNEL_EXTRA_BUILDARGS} KCFLAGS="${KCFLAGS}" KAFLAGS="${KAFLAGS}" scripts
         if grep -q -E "CONFIG_STACK_VALIDATION=y|CONFIG_HAVE_OBJTOOL=y" ${KERNEL_BUILD_DIR}/.config && [ -d "tools/objtool" ]; then
diff --git a/meta/recipes-kernel/linux/files/debian/isar/install.tmpl b/meta/recipes-kernel/linux/files/debian/isar/install.tmpl
index a1b00d39..74678249 100644
--- a/meta/recipes-kernel/linux/files/debian/isar/install.tmpl
+++ b/meta/recipes-kernel/linux/files/debian/isar/install.tmpl
@@ -68,6 +68,7 @@ do_install() {
         install_dtbs
         install_kmods
         install_headers
+        install_tools
     fi
 
     # Stop tracing
@@ -137,6 +138,10 @@ install_dtbs() {
     ${MAKE} O=${O} INSTALL_DTBS_PATH=${deb_img_dir}/usr/lib/linux-image-${krel} dtbs_install
 }
 
+install_tools() {
+    install -Dm0755 ${O}/perf ${deb_tools_dir}/usr/bin/perf
+}
+
 install_kmods() {
     [ -n "${CONFIG_MODULES}" ] || return 0
     ${MAKE} O=${O} modules_install \
diff --git a/meta/recipes-kernel/linux/files/debian/rules.tmpl b/meta/recipes-kernel/linux/files/debian/rules.tmpl
index 598ae93f..a3b25396 100755
--- a/meta/recipes-kernel/linux/files/debian/rules.tmpl
+++ b/meta/recipes-kernel/linux/files/debian/rules.tmpl
@@ -45,4 +45,4 @@ override_dh_strip_nondeterminism:
 	true
 
 override_dh_strip:
-	unset DEB_HOST_GNU_TYPE && dh_strip -Xvmlinu --no-automatic-dbgsym
+	unset DEB_HOST_GNU_TYPE && dh_strip -Xvmlinu -Xperf --no-automatic-dbgsym

-- 
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/20251126090202.3091051-7-itrue%40emlix.com.

  parent reply	other threads:[~2025-11-26  9:05 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-26  8:59 [PATCH 0/3] linux-custom: add linux-tools package and perf 'Isaac True' via isar-users
2025-11-26  8:59 ` [PATCH 1/3] linux-custom: add linux-tools package 'Isaac True' via isar-users
2025-11-26  8:59 ` 'Isaac True' via isar-users [this message]
2025-11-26  9:09   ` [PATCH 2/3] linux-custom: build perf and add it to linux-tools 'Isaac True' via isar-users
2025-11-26  8:59 ` [PATCH 3/3] doc: custom_kernel: add perf and linux-tools 'Isaac True' via isar-users
2025-11-26  9:46 ` [PATCH 0/3] linux-custom: add linux-tools package and perf 'Florian Bezdeka' via isar-users
2025-11-26  9:59   ` 'Isaac True' via isar-users
2025-11-26 10:30     ` 'Florian Bezdeka' via isar-users
2025-11-27  7:17 ` 'Jan Kiszka' via isar-users

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251126090202.3091051-7-itrue@emlix.com \
    --to=isar-users@googlegroups.com \
    --cc=itrue@emlix.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox