From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Wed, 26 Nov 2025 14:06:55 +0100 X-Sieve: CMU Sieve 2.4 Received: from mail-ed1-f59.google.com (mail-ed1-f59.google.com [209.85.208.59]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 5AQD6sp2012362 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 26 Nov 2025 14:06:54 +0100 Received: by mail-ed1-f59.google.com with SMTP id 4fb4d7f45d1cf-6450f3e7e71sf6064188a12.3 for ; Wed, 26 Nov 2025 05:06:54 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1764162409; cv=pass; d=google.com; s=arc-20240605; b=JOzh1c/ae75EwvoP20lo8MpVN6V6BgzmzECnjHShSMjz4lMcvXr4VK5Y2KqQpgU2gY KjznhXKyy9MN4G/Xk/FzzpCjL7DYlVUaA3gwr8RJueeDpH+Z4cKTebvdivfvd9U8nBsD vWObopHc8+EgccOpfQdIU8eNswaVPLHdWoVI0GGtnYPgd9RytUnyL3GNOPvIc3zv6x2s 4Xmalj+0nJj76OleOpPZWFmk6nOeSVmrowCVlXfWPp+icy3JTxUZI/9Ior57KcCn30kd vbwzt0LJDvm8WL8kNVrZzaZlZmkzLHVpP6iRs7QzqM7YuPhPY9zVOgBT7vpWXiEQfXkx GNyw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=47mVMMEHl5uSPfcoNXOUFlXPDpMsfPVIGinZdspF4+c=; fh=0pT+toZdNoAud4rXozSjmr1+MGjLEucwLmu89pWM5mk=; b=eJWI5z4cleiNSOFPY++jye3Sefzgm4uOolY2xCVD7H3Z7VY2yMgB7XsO6jWG5iewRa vbRr9K8wVTP93okUm2xFQUs4zEtpEGYjWf0ESCgSLbppNuaO8IUQ2f3AZ8TgWQ+07zii 3coEI3lFR/s4G/312p3CuSU/nzuuImlAjhkSQRgJ3ve+gjpUCvVu30k7XX77yxVBwJxo 9xnL8YPDdKGdIMWTEej5awl0MNDaYS85l8Ex6sSk4c0J0Eag2znZVeOpdTDsrIT7LXev XtvW5TGeEQy6wg/keOMhvsf/TNAiu/NyMp1BUkhAsZMiH0pb0QxAJuHmGaDPkKIEDcde ejbg==; darn=ilbers.de ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@emlix.com header.s=20250930 header.b="q+9/r7MJ"; dkim=pass header.i=@emlix.com header.s=20250930 header.b="q+9/r7MJ"; spf=pass (google.com: domain of itrue@emlix.com designates 178.63.209.131 as permitted sender) smtp.mailfrom=itrue@emlix.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=emlix.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1764162409; x=1764767209; darn=ilbers.de; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=47mVMMEHl5uSPfcoNXOUFlXPDpMsfPVIGinZdspF4+c=; b=j0pwWLj2Y1vUB3fuiYRaLloPZpFOxmW4mIQbWHB8sbLfMLMPZfLFQKeIzD1u+o1NQT rzQiGHF/4xf3Vw6qFVMolH1T0Hn4FF2dDvsMiJ+LLhCBDDnG9RUWNWiCwzhP/iP9uYPI YiiiAgSgCn3Cz+fSe2Zv/QzBTYqtXrCCZWfYFoIBqBWshfo7zEOBXOEl3hfTzTctljYm TyNGL6OORYMBPCG3r4vQkmu+PcizTxdsqPnfaKVrlfEZF/H3npr6Ocm8XEnlrbPoQml7 d75k9BzmJRH+OBxfwXEV6U08PnpPN64aNVlU2O8gGTAMh9fX6oesAZWkV1ISUAD8Tnw4 mg4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764162409; x=1764767209; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :x-beenthere:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=47mVMMEHl5uSPfcoNXOUFlXPDpMsfPVIGinZdspF4+c=; b=BLw0jobfDZLq/bI/fhd9yqs6keq+ZTpShlRyWM2F88af4fdtzdL4SQm8PuvO1eQi2u X04BPYgddaad6ekc/vLAurtgfJRTb/MkA2XGEXKdvnc+MxbGBRiNdauUtygcUvOknqe4 AAEOYJAhyp4v246Q866u3gant236f84R8svyoXWE0h4e48H4SY06vy4iJH2tq4vuUh5c P/ZIIlrdxzTJrOw82w2uVF8XzryfYAdp8zi6Uj6r64uYcbsQQr5LjQlOjGH++IaPkLnB Lc7teHZLAFUEV0Xo6Uzq1k2VztJPyVXXD/5gAqrJEwolislIUK+U8pkO1YsVteJYf1Rg m6mQ== X-Forwarded-Encrypted: i=2; AJvYcCXzs6kH1kut9beiu1xQzm3Ey9+RN2jav3uhjmYhyPasXJK5KnmQEBt/KyPQzprFnA+qzCT2@ilbers.de X-Gm-Message-State: AOJu0YxV+lFnzF4SVz4h6IJ100P27lp/rr/LZ/OvEEWlM3kn+b/FzCJe SqdweFiclENrctqURzfc2g1ykS3woXTVRk3dJaLLepza5HB5Qvu2bcJ8 X-Google-Smtp-Source: AGHT+IEakxPqYFmSy8ksb9hPeueSV9UWxAUrVsCTR8jsefex/THwS6Q9hMTwULyaFGC2Bjfd22fCzQ== X-Received: by 2002:a05:6402:350f:b0:640:a356:e797 with SMTP id 4fb4d7f45d1cf-645eb2648b3mr6275042a12.13.1764162409312; Wed, 26 Nov 2025 05:06:49 -0800 (PST) X-BeenThere: isar-users@googlegroups.com; h="Ae8XA+ZIrWt+herwBh0WnigCBLWO2w6/Ie1G/Lt/zy+1CnywjA==" Received: by 2002:a05:6402:3048:20b0:644:f98a:dce0 with SMTP id 4fb4d7f45d1cf-6453640f8c2ls1158353a12.2.-pod-prod-07-eu; Wed, 26 Nov 2025 05:06:46 -0800 (PST) X-Received: by 2002:a17:907:6e8b:b0:b76:26bc:f95f with SMTP id a640c23a62f3a-b76c50c2061mr682301066b.0.1764162406504; Wed, 26 Nov 2025 05:06:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1764162406; cv=none; d=google.com; s=arc-20240605; b=WqFlMBOYfla1N4GSC3LNsxJsJ55id36gi9w0BWw7tcUffyyto5j2/l2GkhnC308hvw c1y9JurqkkMngrxyxNb3V2n7JLcd8N3+zAjcInAoWTsm2bhMDdKbE4BfRq9q2Vmje0Pc iE+dnG6G+McE97ODutZ4gWscj98ug3ZiTi3FZVUUrFgbgbOq8ntMofOwr+3oHkd998W0 ZwWCfHcDHI3Lu+ACCXfx2SgIcWkB+RlqGspQe3dlaWchRreZwkv+wMvkmnAhgWJy49RS K9urz1rjVCfSndI4wxXkDpuptiKBzpqhA7hIX/qFXbx+riFs71qrh8CbW4wOmYN7l4V1 7rvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature:dkim-signature; bh=EuWMQuWGnDfPSQ7r12McY5hUOadHT2xIuhrVE21m/lU=; fh=vRrjvjDC0Nm912rKb+hserwyuGVHai4IaHlHCTH5jzE=; b=jn1qdKAH0MbpMISDn19Ksscxjo2Wb1rJGhKXacrxnzBpQCmhNSTL+zurGP/s/bor/F FGzau5RRh2AX5L/c1XrS0+f9bTfW6z/rpdNZ+isyRtWiGRmSG3LoiKRMXc/5yrD3iGXp YD9zm3H+xFizKlCbhWcrYsxhB+FyShSHJLgI60htY7CILvaeaceVnInmK/pRGVcGMwfI 6IYYT2ZfGTyw3/LOZJYsda+qdeipKO8esN/EHF8X1mHeyH8nGF5HUgYKK5HetYHmzit/ K7oMAj3xlum202Bj4ittQ8Rt7GUZpWhBjwclHJb8lK10hc9OEi9Ytims2uyvgMN5bUQ5 Fbdw==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@emlix.com header.s=20250930 header.b="q+9/r7MJ"; dkim=pass header.i=@emlix.com header.s=20250930 header.b="q+9/r7MJ"; spf=pass (google.com: domain of itrue@emlix.com designates 178.63.209.131 as permitted sender) smtp.mailfrom=itrue@emlix.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=emlix.com Received: from mx1.emlix.com (mx1.emlix.com. [178.63.209.131]) by gmr-mx.google.com with ESMTPS id a640c23a62f3a-b7654fc8ea2si43102166b.2.2025.11.26.05.06.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Nov 2025 05:06:46 -0800 (PST) Received-SPF: pass (google.com: domain of itrue@emlix.com designates 178.63.209.131 as permitted sender) client-ip=178.63.209.131; Received: from mx1.emlix.com (localhost [127.0.0.1]) by mx1.emlix.com (Postfix) with ESMTP id B33545FADF for ; Wed, 26 Nov 2025 14:06:40 +0100 (CET) Received: from mailer.emlix.com (p5098be52.dip0.t-ipconnect.de [80.152.190.82]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.emlix.com (Postfix) with ESMTPS id 9DD2E5FC39 for ; Wed, 26 Nov 2025 14:06:40 +0100 (CET) From: "'Isaac True' via isar-users" To: isar-users@googlegroups.com Cc: Isaac True Subject: [PATCH v2 1/2] linux-custom: add linux-tools package and build perf Date: Wed, 26 Nov 2025 14:02:28 +0100 Message-ID: <20251126130534.3484253-3-itrue@emlix.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20251126130534.3484253-2-itrue@emlix.com> References: <20251126130534.3484253-2-itrue@emlix.com> MIME-Version: 1.0 X-Virus-Scanned: ClamAV using ClamSMTP X-Original-Sender: itrue@emlix.com X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@emlix.com header.s=20250930 header.b="q+9/r7MJ"; dkim=pass header.i=@emlix.com header.s=20250930 header.b="q+9/r7MJ"; spf=pass (google.com: domain of itrue@emlix.com designates 178.63.209.131 as permitted sender) smtp.mailfrom=itrue@emlix.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=emlix.com X-Original-From: Isaac True Reply-To: Isaac True Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: isar-users@googlegroups.com X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-Spam-Status: No, score=-4.9 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2,RCVD_IN_RP_CERTIFIED, RCVD_IN_RP_RNBL,RCVD_IN_RP_SAFE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-TUID: QJK3hV3MngvC 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 --- 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: +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) }" -- 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/20251126130534.3484253-3-itrue%40emlix.com.