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; Thu, 27 Nov 2025 12:31:25 +0100 X-Sieve: CMU Sieve 2.4 Received: from mail-ed1-f63.google.com (mail-ed1-f63.google.com [209.85.208.63]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 5ARBVNNR019175 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 27 Nov 2025 12:31:23 +0100 Received: by mail-ed1-f63.google.com with SMTP id 4fb4d7f45d1cf-640cdaf43aesf784022a12.2 for ; Thu, 27 Nov 2025 03:31:23 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1764243078; cv=pass; d=google.com; s=arc-20240605; b=LNyKtw6URqXi9V1Z6Z1/uYkHYgpBZzWK7kMedf8fUUMpYKAJZYZwuC/DVd/lZxdKxI ds4yJHbzKYuCKq9GRrPKTVkHw1q2jGM4ezxJY/cSgGpvZyybBsrYSQgi5CzjjxvnuFYX AR/Dt/KpbyVxAIbsmqf1fZGK5ILpvle57fkVtGp3Oudlu9sxK3c3H472bfxiN8qJuWd4 dperbK2dhDEvk2Grzx46CGZMLaWednMkt1fV4U9i5gZPKwoE+W201FQY2BZMI1zDYNMQ VYhl0ZU9mt+QqkHRUlOrwLK1bPoYbUhNbz/yIbvk5ymvA4cA/ZPNxkktA0y52LnMqv5O vuyw== 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=+fbChbY05JqlmlRtFCSobSC/QouDFa/PYzQqB5/tnuU=; fh=eb2V4Cj4+1L20cVzFvIH8sIqUdJnmbmO1Q5oLCgchn8=; b=cHhHbYmUjghaJC997LoNlyQn64DrsYIgoozvPbZOtfFf1EJ73fBePC1Bnrsv+af19J 2jqa+GmujO1pp7UDVRlRzoQ0Q+mXK57/7CFcdYe6gW1MPCFDvEGO4kOVIH/EzBPgAmq9 Cj2lN2kF7Nt897K0AIUKGFbIHWj1SSfJVeIpLTjZXmE0ypMDIC7vOlukznABpnFRqLmp la4O5nhibP4TudAb4+kVERCM7IMyv8TNultkEXaWBYWQm6wZkoALamOkZtvRZeahv0q2 EDKcLy6UJ1sFUJj1BzYsjgK+xB3dCsugxS+abGoKcuMusXKRfDXLae+Cl85sdC1/gFBy 1IXg==; darn=ilbers.de ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@emlix.com header.s=20250930 header.b=nYhbM+U4; dkim=pass header.i=@emlix.com header.s=20250930 header.b=nYhbM+U4; 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=1764243078; x=1764847878; 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=+fbChbY05JqlmlRtFCSobSC/QouDFa/PYzQqB5/tnuU=; b=eyGrhAdcnq7O0/8XlJpCohzJYGP7kkCcrQPHBmi94tEXk2mdzIzLI1+AKSAoyzmEhC bi8cfuDYxGF+y/SKpAwpCMopO/C77Zafb3venqexHMnuNAuLNPKPUej7zobmWjmj9OP7 qhP02OpDg2qJ+26xnt2dMriys0ZISrwF9fCeaAikxYER7F92jrAjsePzcgcAJDPoELcf ZfcQinRU9i4aJ7eMOpI/YUikwSmsG4HBcrvdtun3oCJfOARKE7gPzEyZFekNqH+VBgWg S40+m0VZo0swvUSkiohZw8T2TsDhuFc6MUhHFM71nJyCIyzoX2pGU5HiyBeFQ7On2zoJ ZqHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764243078; x=1764847878; 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=+fbChbY05JqlmlRtFCSobSC/QouDFa/PYzQqB5/tnuU=; b=Fv3PdXilzwzP9j2guQu4noa3yRVKu7gY1RaSrGU77Q38YXoGgLnZzamMFWSqCkbrgU PxhDv1uzcczUyAUrMzCk3q7IzGjXoz4cyAwOoDW2p6S9XkjPP6Nwi/sSbyOyEgj9I7sS VnKLlHCZdZalOEbg9C7tnuSCxkvQ8DriZsoaO6IISY57FHT0MvxWNz5d3zdGp3AJYG9V DmM4Q9L7hIxKcNwbyff9875CRfzQX4TCKWFzOlh5y10wTVjiEEsj8gJdPyIw9ugPKTy1 1GHPqzD1t43FUF6w0KssOLtk/xa+RwZhpjqgmOiZgwyAM6o1Pxo+kXiEGn5MSDGSxA6e VH8A== X-Forwarded-Encrypted: i=2; AJvYcCUn6FC7OYJiaWyVEgokHAqJKfvttTBurUYFf5UFpdGAnrAujRqUT5GbcezrvXUqocykJkQ0@ilbers.de X-Gm-Message-State: AOJu0Yy15QR59gSM9LIe3MDC9EVv52YgoXTJu6sl0KsuFpxQK4IXx4U0 u4sej9s9h+2rZIKEAkTQjn4ZehBG3bsE0x8qZwUpwGNBJTE9bVyTl5fq X-Google-Smtp-Source: AGHT+IHWgZ/FoTvtFUXXavtEM3+mghdqTB8XUzVCPeRUXuOZf9IO6LoC+rNhtlImWFOQSZKp2TLtRA== X-Received: by 2002:a05:6402:34c7:b0:634:ab36:3c74 with SMTP id 4fb4d7f45d1cf-645544544edmr16893991a12.9.1764243078070; Thu, 27 Nov 2025 03:31:18 -0800 (PST) X-BeenThere: isar-users@googlegroups.com; h="Ae8XA+Y3SF2EwaGr27yIHMxiPJhH9bFo2qKpLulAzkXLfsRU9w==" Received: by 2002:a50:fa8c:0:b0:641:6168:4680 with SMTP id 4fb4d7f45d1cf-64741977331ls645404a12.0.-pod-prod-02-eu; Thu, 27 Nov 2025 03:31:15 -0800 (PST) X-Received: by 2002:a05:6402:3054:20b0:645:c6b1:5f9d with SMTP id 4fb4d7f45d1cf-645c6b15fd9mr10949659a12.5.1764243075349; Thu, 27 Nov 2025 03:31:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1764243075; cv=none; d=google.com; s=arc-20240605; b=YZTAsiRVZpUcQH4o1bJcwhCYPSFX9M6TbdkLcHvG8vD3HUfGdbfIXs5OZkS1rerZ+C R+xGiB5ZzJZwuii41CxCLA3/N5RQ0QFkpy2nJRyoFW0R46iTr271GzftSN9/8dvsQt2l cH7lTnIfe2e2eLuT406tqXd6Fqjr6emap/JiXqYOy4WlbZ1tX325JvQiX23bJafd/TEA IsLA06aprDNwWQ7tD6mpT9Tr1QLiw+lWFsApIgVxXjiAo98Z5srir4F5ocN5LJ1KYKo7 TQV+Vk9sjGcdovuOEomO2PWkkvJxRzCoZbRyyAP8NwcFwYwMhJyfUZrI24NRdIzg1Yz/ mq4w== 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=4krv2q80F11sfg8LcVNLOBUt5addxKNIlW+U/RwwekA=; fh=vRrjvjDC0Nm912rKb+hserwyuGVHai4IaHlHCTH5jzE=; b=B/r+ismTxRu35zrK09JU1jDRfSdesDqXzXkC/7CY8KCfHjuKd0Tqcrk32Sccsr7z+e 1em7nGQoXP4PDNJvBcimLgBUJ+wsU2cmrEppa+Y8HbTVOMYBurREV/c3suMEO5xCmCSd ws0zQvYz1cXvGQQR6xUQpV4fG32Nc2583lJCbdvZOvbGE3ufijVuvkifvXbWTNVQh2To XJAqrKHrpsTucaONEB3HU2N/W3SSHctxb/mK9EQRA5j6HU75TiE5GZYoe3e1Ft29ebGk upHpwVgYsVdRm91wY7yXwTWrcoYz2ahwy0bhTaCti6v/lq8To00My4BCXAzrRyhnMByu hbtw==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@emlix.com header.s=20250930 header.b=nYhbM+U4; dkim=pass header.i=@emlix.com header.s=20250930 header.b=nYhbM+U4; 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 4fb4d7f45d1cf-64750a3dd2asi19396a12.2.2025.11.27.03.31.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Nov 2025 03:31:15 -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 1BD715F8AF for ; Thu, 27 Nov 2025 12:31:09 +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 ECD205FB74 for ; Thu, 27 Nov 2025 12:31:08 +0100 (CET) From: "'Isaac True' via isar-users" To: isar-users@googlegroups.com Cc: Isaac True Subject: [PATCH v3 1/2] linux-custom: build perf and add it to the linux-perf package Date: Thu, 27 Nov 2025 12:26:24 +0100 Message-ID: <20251127113059.559394-2-itrue@emlix.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20251127113059.559394-1-itrue@emlix.com> References: <20251127113059.559394-1-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=nYhbM+U4; dkim=pass header.i=@emlix.com header.s=20250930 header.b=nYhbM+U4; 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: zTEeHBDmCwdQ Add an additional package to the linux-custom recipe containing the perf tool, which is built as part of the kernel build process. This package is only created and perf is only built if the "notools" profile is not active, which is controlled by the new variable "KERNEL_BUILD_NOTOOLS" and enabled by default. Signed-off-by: Isaac True --- meta/recipes-kernel/linux/files/debian/control.tmpl | 9 +++++++++ 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, 32 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..155c2808 100644 --- a/meta/recipes-kernel/linux/files/debian/control.tmpl +++ b/meta/recipes-kernel/linux/files/debian/control.tmpl @@ -69,3 +69,12 @@ 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-perf-${KERNEL_NAME_PROVIDED} +Build-Profiles: +Section: devel +Architecture: any +Multi-Arch: foreign +Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends}, ${python3:Depends} +Description: ${KERNEL_NAME_PROVIDED} performance analysis tools for @KR@ + This package contains the 'perf' performance analysis tools for @KR@. diff --git a/meta/recipes-kernel/linux/files/debian/isar/build.tmpl b/meta/recipes-kernel/linux/files/debian/isar/build.tmpl index b4c105c1..f518ce34 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 "notools"; 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..07283dcd 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_PERF=linux-perf-${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_perf_dir=${deb_top_dir}/${KERNEL_PKG_PERF} # 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..e6badb2f 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 "notools"; 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_perf_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..8d9846cd 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 "0" to disable the notools build profile and build the linux-perf package +KERNEL_BUILD_NOTOOLS ??= "1" + +# Provide the linux-perf package if the notools build profile has not been enabled +RECIPE_PROVIDES:append = " \ + ${@ bb.utils.contains('DEB_BUILD_PROFILES', 'pkg.{}.notools'.format(d.getVar('BPN')), '', 'linux-perf-{}'.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_NOTOOLS')): + profiles += ' pkg.{}.notools'.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/20251127113059.559394-2-itrue%40emlix.com.