[PATCH 0/3] linux-custom: add linux-tools package and perf

4 views
Skip to first unread message

Isaac True

unread,
Nov 26, 2025, 4:04:42 AM (9 days ago) Nov 26
to isar-...@googlegroups.com, Isaac True
Modify the linux-custom recipe to additionally generate a linux-tools
package, build the perf binary, and add this binary to the new package.
This is useful for profiling application and kernel performance on
targets.

Isaac True (3):
linux-custom: add linux-tools package
linux-custom: build perf and add it to linux-tools
doc: custom_kernel: add perf and linux-tools

doc/custom_kernel.md | 8 ++++----
meta/recipes-kernel/linux/files/debian/control.tmpl | 10 ++++++++++
meta/recipes-kernel/linux/files/debian/isar/build.tmpl | 1 +
.../recipes-kernel/linux/files/debian/isar/common.tmpl | 2 ++
.../linux/files/debian/isar/install.tmpl | 5 +++++
meta/recipes-kernel/linux/files/debian/rules.tmpl | 2 +-
meta/recipes-kernel/linux/linux-custom.inc | 1 +
7 files changed, 24 insertions(+), 5 deletions(-)

Isaac True

unread,
Nov 26, 2025, 4:04:50 AM (9 days ago) Nov 26
to isar-...@googlegroups.com, Isaac True
Add an additional package to the linux-custom recipe which can be used
to deliver tools built from the kernel sources, such as perf.

Signed-off-by: Isaac True <it...@emlix.com>
---
meta/recipes-kernel/linux/files/debian/control.tmpl | 10 ++++++++++
.../recipes-kernel/linux/files/debian/isar/common.tmpl | 2 ++
meta/recipes-kernel/linux/linux-custom.inc | 1 +
3 files changed, 13 insertions(+)

diff --git a/meta/recipes-kernel/linux/files/debian/control.tmpl b/meta/recipes-kernel/linux/files/debian/control.tmpl
index ee87cf92..1c253530 100644
--- a/meta/recipes-kernel/linux/files/debian/control.tmpl
+++ b/meta/recipes-kernel/linux/files/debian/control.tmpl
@@ -69,3 +69,13 @@ Conflicts: linux-kbuild-${KERNEL_NAME_PROVIDED}
Description: ${KERNEL_NAME_PROVIDED} Linux kbuild scripts and tools for @KR@
This package provides kernel kbuild scripts and tools for @KR@
This is useful for people who need to build external modules
+
+Package: linux-tools-${KERNEL_NAME_PROVIDED}
+Build-Profiles: <kernel>
+Architecture: any
+Multi-Arch: foreign
+Depends: ${perl:Depends}, ${shlib:Depends}
+Description: ${KERNEL_NAME_PROVIDED} Linux tools for @KR@
+ This package provides kernel tools for @KR@.
+ .
+ This is useful for people who want to run things like perf.
diff --git a/meta/recipes-kernel/linux/files/debian/isar/common.tmpl b/meta/recipes-kernel/linux/files/debian/isar/common.tmpl
index f9cc2f02..a104784a 100644
--- a/meta/recipes-kernel/linux/files/debian/isar/common.tmpl
+++ b/meta/recipes-kernel/linux/files/debian/isar/common.tmpl
@@ -12,6 +12,7 @@ KERNEL_PKG_LIBC_HEADERS=linux-libc-dev
KERNEL_PKG_LIBC_HEADERS_CROSS=linux-libc-dev-${DISTRO_ARCH}-cross
KERNEL_PKG_KERN_KBUILD=linux-kbuild-${KERNEL_NAME_PROVIDED}
KERNEL_PKG_KERN_KBUILD_CROSS=${KERNEL_PKG_KERN_KBUILD}-${DISTRO_ARCH}-cross
+KERNEL_PKG_TOOLS=linux-tools-${KERNEL_NAME_PROVIDED}

# Force creating debian package with valid host arch for -native build
# Use a cross build to comply with arch specific kernel defconfigs
@@ -38,6 +39,7 @@ deb_libc_hdr_dir=${deb_top_dir}/${KERNEL_PKG_LIBC_HEADERS}
deb_libc_hdr_cross_dir=${deb_top_dir}/${KERNEL_PKG_LIBC_HEADERS_CROSS}
deb_kern_kbuild_dir=${deb_top_dir}/${KERNEL_PKG_KERN_KBUILD}
deb_kern_kbuild_cross_dir=${deb_top_dir}/${KERNEL_PKG_KERN_KBUILD_CROSS}
+deb_tools_dir=${deb_top_dir}/${KERNEL_PKG_TOOLS}

# Array of packages to be generated
declare -A kern_pkgs
diff --git a/meta/recipes-kernel/linux/linux-custom.inc b/meta/recipes-kernel/linux/linux-custom.inc
index 391bd6fa..cd0a6f6a 100644
--- a/meta/recipes-kernel/linux/linux-custom.inc
+++ b/meta/recipes-kernel/linux/linux-custom.inc
@@ -160,6 +160,7 @@ RECIPE_PROVIDES = " \
linux-libc-dev-${DISTRO_ARCH}-cross \
linux-image-${KERNEL_NAME_PROVIDED}-dbg \
linux-kbuild-${KERNEL_NAME_PROVIDED} \
+ linux-tools-${KERNEL_NAME_PROVIDED} \
${BPN}-pseudo-native \
"
# When cross-profile is active:

Isaac True

unread,
Nov 26, 2025, 4:04:54 AM (9 days ago) Nov 26
to isar-...@googlegroups.com, Isaac True
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 <it...@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

Isaac True

unread,
Nov 26, 2025, 4:04:59 AM (9 days ago) Nov 26
to isar-...@googlegroups.com, Isaac True
Remove the "Package perf" from the future ideas list and add it to the
"Features" list, along with the new linux-tools package.

Signed-off-by: Isaac True <it...@emlix.com>
---
doc/custom_kernel.md | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/doc/custom_kernel.md b/doc/custom_kernel.md
index ce5f1bf7..d28ea801 100644
--- a/doc/custom_kernel.md
+++ b/doc/custom_kernel.md
@@ -68,15 +68,15 @@ The linux-custom recipe provides support for:

14. Support `devshell` (kernel configuration shall be applied)

+ 15. Produce a `linux-tools` package which includes `perf`
+
## Future

In the future, the recipe may be extended to:

- 1. Package perf
+ 1. Support inclusion/build of dts files listed in `SRC_URI`

- 2. Support inclusion/build of dts files listed in `SRC_URI`
-
- 3. Be compatible with Ubuntu
+ 2. Be compatible with Ubuntu

## Examples

Isaac True

unread,
Nov 26, 2025, 4:09:35 AM (9 days ago) Nov 26
to isar-...@googlegroups.com
Regarding this line:

> + unset DEB_HOST_GNU_TYPE && dh_strip -Xvmlinu -Xperf --no-automatic-dbgsym

`-Xperf` is needed when cross-compiling otherwise `dh_strip` complains
about not understanding the binary type. I assume that this is due to
unsetting `DEB_HOST_GNU_TYPE` before calling `dh_strip`, but I wasn't
sure what the reason behind that is, so I just added it to the exclusion
list. If this should be handled different please let me know and I'll
make a v2.

--
Isaac True
emlix GmbH, https://www.emlix.com
Fon +49 228 94 77 96 94
Bachstraße 6, 53115 Bonn, Germany
Sitz der Gesellschaft: Göttingen, Amtsgericht Göttingen HR B 3160
Geschäftsfuehrung: Heike Jordan, Dr. Uwe Kracke
Ust-IdNr.: DE 205 198 055

emlix - smart embedded open source

Florian Bezdeka

unread,
Nov 26, 2025, 4:46:40 AM (9 days ago) Nov 26
to Isaac True, isar-...@googlegroups.com
Hi Isaac,

On Wed, 2025-11-26 at 09:59 +0100, 'Isaac True' via isar-users wrote:
> Modify the linux-custom recipe to additionally generate a linux-tools
> package, build the perf binary, and add this binary to the new package.
> This is useful for profiling application and kernel performance on
> targets.
>
> Isaac True (3):
> linux-custom: add linux-tools package
> linux-custom: build perf and add it to linux-tools
> doc: custom_kernel: add perf and linux-tools

Patch ordering:
Patch 1 already adds the new package to PROVIDES while building the
package comes later with patch 2. That looks inconsistent.

I would vote for merging patch 1 and 2.

How long does it take to build that additional package? That additional
(and maybe unneeded) packet is being build unconditionally, right? As
kernel builds are normally compute intense that might matter for some
users.

Should we better hide that new "feature" / packet behind a feature flag
/ recipe variable?

Best regards,
Florian

Isaac True

unread,
Nov 26, 2025, 4:59:23 AM (9 days ago) Nov 26
to Florian Bezdeka, isar-...@googlegroups.com
Hi,

> Patch ordering:
> Patch 1 already adds the new package to PROVIDES while building the
> package comes later with patch 2. That looks inconsistent.
>
> I would vote for merging patch 1 and 2.

Sure, that makes sense. I can do that.

> How long does it take to build that additional package? That additional
> (and maybe unneeded) packet is being build unconditionally, right? As
> kernel builds are normally compute intense that might matter for some
> users.
>
> Should we better hide that new "feature" / packet behind a feature flag
> / recipe variable?

On my relatively slow laptop it adds about 30s of build time. Relatively
minor in the context of a kernel build, but could still be worth hiding
it behind a feature flag for people that don't want it.

Thanks for the feedback, I'll work on a v2.

--
Isaac True
emlix GmbH
Headquarters: Berliner Str. 12, 37073 Göttingen, Germany
Phone +49 (0)551 30664-0, e-mail in...@emlix.com
District Court of Göttingen, Registry Number HR B 3160
Managing Directors: Heike Jordan, Dr. Uwe Kracke
VAT ID No. DE 205 198 055
Office Berlin: Panoramastr. 1, 10178 Berlin, Germany
Office Bonn: Bachstr. 6, 53115 Bonn, Germany
Office München: Am Knie 16, 81241 München, Germany
http://www.emlix.com

emlix - your embedded Linux partner

Florian Bezdeka

unread,
Nov 26, 2025, 5:30:33 AM (9 days ago) Nov 26
to Isaac True, isar-...@googlegroups.com
On Wed, 2025-11-26 at 10:59 +0100, Isaac True wrote:
> Hi,
>
> > Patch ordering:
> > Patch 1 already adds the new package to PROVIDES while building the
> > package comes later with patch 2. That looks inconsistent.
> >
> > I would vote for merging patch 1 and 2.
>
> Sure, that makes sense. I can do that.
>
> > How long does it take to build that additional package? That additional
> > (and maybe unneeded) packet is being build unconditionally, right? As
> > kernel builds are normally compute intense that might matter for some
> > users.
> >
> > Should we better hide that new "feature" / packet behind a feature flag
> > / recipe variable?
>
> On my relatively slow laptop it adds about 30s of build time. Relatively
> minor in the context of a kernel build, but could still be worth hiding
> it behind a feature flag for people that don't want it.

The way to model that would be a build profile (DEB_BUILD_PROFILES) as
it seems. I'm still not sure if that is really necessary. As that could
be done quite easily (as it seems) we can also postpone that and wait if
it becomes necessary.

Isaac True

unread,
Nov 26, 2025, 8:06:43 AM (9 days ago) Nov 26
to isar-...@googlegroups.com, Isaac True
Modify the linux-custom recipe to additionally generate a linux-tools
package, build the perf binary, and add this binary to the new package.
This is useful for profiling application and kernel performance on
targets.

Changes since v1:

- Make generation of the linux-tools package configurable. If the
`KERNEL_BUILD_TOOLS` variable is set to `"1"`, perf will be built
and the package will be generated.

Isaac True (2):
linux-custom: add linux-tools package and build perf
doc: custom_kernel: add perf and linux-tools

doc/custom_kernel.md | 9 +++++----
meta/recipes-kernel/linux/files/debian/control.tmpl | 10 ++++++++++
meta/recipes-kernel/linux/files/debian/isar/build.tmpl | 3 +++
.../recipes-kernel/linux/files/debian/isar/common.tmpl | 2 ++
.../linux/files/debian/isar/install.tmpl | 7 +++++++
meta/recipes-kernel/linux/files/debian/rules.tmpl | 2 +-
meta/recipes-kernel/linux/linux-custom.inc | 10 ++++++++++
7 files changed, 38 insertions(+), 5 deletions(-)

Isaac True

unread,
Nov 26, 2025, 8:06:49 AM (9 days ago) Nov 26
to isar-...@googlegroups.com, Isaac True
Add an additional package to the linux-custom recipe which can be used
to deliver tools built from the kernel sources.

Additionally, 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 <it...@emlix.com>
---
meta/recipes-kernel/linux/files/debian/control.tmpl | 10 ++++++++++
meta/recipes-kernel/linux/files/debian/isar/build.tmpl | 3 +++
.../recipes-kernel/linux/files/debian/isar/common.tmpl | 2 ++
.../linux/files/debian/isar/install.tmpl | 7 +++++++
meta/recipes-kernel/linux/files/debian/rules.tmpl | 2 +-
meta/recipes-kernel/linux/linux-custom.inc | 10 ++++++++++
6 files changed, 33 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-kernel/linux/files/debian/control.tmpl b/meta/recipes-kernel/linux/files/debian/control.tmpl
index ee87cf92..edb3960a 100644
--- a/meta/recipes-kernel/linux/files/debian/control.tmpl
+++ b/meta/recipes-kernel/linux/files/debian/control.tmpl
@@ -69,3 +69,13 @@ Conflicts: linux-kbuild-${KERNEL_NAME_PROVIDED}
Description: ${KERNEL_NAME_PROVIDED} Linux kbuild scripts and tools for @KR@
This package provides kernel kbuild scripts and tools for @KR@
This is useful for people who need to build external modules
+
+Package: linux-tools-${KERNEL_NAME_PROVIDED}
+Build-Profiles: <pkg.${BPN}.kernel pkg.${BPN}.tools>
+Architecture: any
+Multi-Arch: foreign
+Depends: ${misc:Depends}, ${shlib:Depends}
+Description: ${KERNEL_NAME_PROVIDED} Linux tools for @KR@
+ This package provides kernel tools for @KR@.
+ .
+ This is useful for people who want to run things like perf.
diff --git a/meta/recipes-kernel/linux/files/debian/isar/build.tmpl b/meta/recipes-kernel/linux/files/debian/isar/build.tmpl
index b4c105c1..72edfa42 100644
--- a/meta/recipes-kernel/linux/files/debian/isar/build.tmpl
+++ b/meta/recipes-kernel/linux/files/debian/isar/build.tmpl
@@ -23,6 +23,9 @@ 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}"
+ if echo "${DEB_BUILD_PROFILES}" | grep -q "tools"; then # Build kernel tools
+ ${MAKE} O=${KERNEL_BUILD_DIR} ${PARALLEL_MAKE} ${KERNEL_EXTRA_BUILDARGS} KCFLAGS="${KCFLAGS}" KAFLAGS="${KAFLAGS}" -C tools/perf
+ fi
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/common.tmpl b/meta/recipes-kernel/linux/files/debian/isar/common.tmpl
index f9cc2f02..a104784a 100644
--- a/meta/recipes-kernel/linux/files/debian/isar/common.tmpl
+++ b/meta/recipes-kernel/linux/files/debian/isar/common.tmpl
@@ -12,6 +12,7 @@ KERNEL_PKG_LIBC_HEADERS=linux-libc-dev
KERNEL_PKG_LIBC_HEADERS_CROSS=linux-libc-dev-${DISTRO_ARCH}-cross
KERNEL_PKG_KERN_KBUILD=linux-kbuild-${KERNEL_NAME_PROVIDED}
KERNEL_PKG_KERN_KBUILD_CROSS=${KERNEL_PKG_KERN_KBUILD}-${DISTRO_ARCH}-cross
+KERNEL_PKG_TOOLS=linux-tools-${KERNEL_NAME_PROVIDED}

# Force creating debian package with valid host arch for -native build
# Use a cross build to comply with arch specific kernel defconfigs
@@ -38,6 +39,7 @@ deb_libc_hdr_dir=${deb_top_dir}/${KERNEL_PKG_LIBC_HEADERS}
deb_libc_hdr_cross_dir=${deb_top_dir}/${KERNEL_PKG_LIBC_HEADERS_CROSS}
deb_kern_kbuild_dir=${deb_top_dir}/${KERNEL_PKG_KERN_KBUILD}
deb_kern_kbuild_cross_dir=${deb_top_dir}/${KERNEL_PKG_KERN_KBUILD_CROSS}
+deb_tools_dir=${deb_top_dir}/${KERNEL_PKG_TOOLS}

# Array of packages to be generated
declare -A kern_pkgs
diff --git a/meta/recipes-kernel/linux/files/debian/isar/install.tmpl b/meta/recipes-kernel/linux/files/debian/isar/install.tmpl
index 6fa94508..76d238a0 100644
--- a/meta/recipes-kernel/linux/files/debian/isar/install.tmpl
+++ b/meta/recipes-kernel/linux/files/debian/isar/install.tmpl
@@ -68,6 +68,9 @@ do_install() {
install_dtbs
install_kmods
install_headers
+ if echo "${DEB_BUILD_PROFILES}" | grep -q "tools"; then
+ install_tools
+ fi
fi

# Stop tracing
@@ -137,6 +140,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
diff --git a/meta/recipes-kernel/linux/linux-custom.inc b/meta/recipes-kernel/linux/linux-custom.inc
index ccbea976..df862ef3 100644
--- a/meta/recipes-kernel/linux/linux-custom.inc
+++ b/meta/recipes-kernel/linux/linux-custom.inc
@@ -169,6 +169,14 @@ RECIPE_PROVIDES:append:libcdev = " \
linux-libc-dev-${DISTRO_ARCH}-cross \
"

+# Set to "1" to enable the tools build profile and build the linux-tools package
+KERNEL_BUILD_TOOLS ??= "0"
+
+# Provide the linux-tools package if the tools build profile has been enabled
+RECIPE_PROVIDES:append = " \
+ ${@ bb.utils.contains('DEB_BUILD_PROFILES', 'pkg.{}.tools'.format(d.getVar('BPN')), 'linux-tools-{}'.format(d.getVar('KERNEL_NAME_PROVIDED')), '', d)} \
+"
+
# When cross-profile is active:
# kbuild package is provided by -native or -kbuildtarget variant. Also headers
# provisioning moves over to ensure those variants are pulled, although the
@@ -231,6 +239,8 @@ def get_additional_build_profiles(d):
profiles += ' pkg.{}.nolibcdev'.format(d.getVar('BPN'))
elif bb.utils.to_boolean(d.getVar('KERNEL_LIBC_DEV_ARCH_ALL')):
profiles += ' pkg.{}.libcdev-arch-all'.format(d.getVar('BPN'))
+ if bb.utils.to_boolean(d.getVar('KERNEL_BUILD_TOOLS')):
+ profiles += ' pkg.{}.tools'.format(d.getVar('BPN'))
return profiles

KERNEL_LIBC_DEV_ARCH = "${@ bb.utils.contains('DEB_BUILD_PROFILES', 'pkg.{}.libcdev-arch-all'.format(d.getVar('BPN')), 'all\nMulti-Arch: foreign', 'any', d) }"

Isaac True

unread,
Nov 26, 2025, 8:06:54 AM (9 days ago) Nov 26
to isar-...@googlegroups.com, Isaac True
Remove the "Package perf" from the future ideas list and add it to the
"Features" list, along with the new linux-tools package.

Signed-off-by: Isaac True <it...@emlix.com>
---
doc/custom_kernel.md | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/doc/custom_kernel.md b/doc/custom_kernel.md
index ce5f1bf7..75ee12f3 100644
--- a/doc/custom_kernel.md
+++ b/doc/custom_kernel.md
@@ -68,15 +68,16 @@ The linux-custom recipe provides support for:

14. Support `devshell` (kernel configuration shall be applied)

+ 15. Produce a `linux-tools` package which includes `perf` if instructed to
+ (`KERNEL_BUILD_TOOLS` equals to `"1"`)

Jan Kiszka

unread,
Nov 27, 2025, 2:17:36 AM (8 days ago) Nov 27
to Isaac True, isar-...@googlegroups.com
On 26.11.25 09:59, 'Isaac True' via isar-users wrote:
> Modify the linux-custom recipe to additionally generate a linux-tools
> package, build the perf binary, and add this binary to the new package.
> This is useful for profiling application and kernel performance on
> targets.
>
> Isaac True (3):
> linux-custom: add linux-tools package
> linux-custom: build perf and add it to linux-tools
> doc: custom_kernel: add perf and linux-tools
>

Please make them opt-in build profiles. Normally, you neither need nor
want these deviations from the official Debian packages, even more if
your custom kernel should be older than what Debian delivers.

Jan

--
Siemens AG, Foundational Technologies
Linux Expert Center

Jan Kiszka

unread,
Nov 27, 2025, 2:22:12 AM (8 days ago) Nov 27
to Isaac True, isar-...@googlegroups.com
Ok, now we have a build profile, that's good. But you are diverting from
how upstream Debian packages the tools - why? Just like linux-libc-dev,
linux-perf etc. should be modelled to be replacements of the original
packages. Also reuse upstream descriptions then.
Reply all
Reply to author
Forward
0 new messages