public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH] meta: build the linux-kernels cross libc-dev package if cross-profile is active
@ 2025-12-18  9:57 'Tobias Schaffner' via isar-users
  2025-12-18 10:17 ` 'MOESSBAUER, Felix' via isar-users
  2025-12-18 12:39 ` 'Jan Kiszka' via isar-users
  0 siblings, 2 replies; 5+ messages in thread
From: 'Tobias Schaffner' via isar-users @ 2025-12-18  9:57 UTC (permalink / raw)
  To: isar-users; +Cc: jan.kiszka, felix.moessbauer, amikan, Tobias Schaffner

The linux-libc-dev-${DISTRO_ARCH}-cross package is not created when cross
building the kernel because the pkg.${BPN}.cross build profile is only
activated for -native builds with the :cross-pkgs override.

This is an issue for custom kernels, because without the custom cross package,
dependent packages fall back to the default linux-libc-dev, which may lack
custom kernel headers.

Ensure that the cross package is also build for cross-builds when
KERNEL_LIBC_DEV_DEPLOY=1 is set, by adding the pkg.${BPN}.cross profile to the
default BUILD_PROFILES.

Signed-off-by: Tobias Schaffner <tobias.schaffner@siemens.com>
---
 meta/classes-recipe/linux-kernel.bbclass | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/meta/classes-recipe/linux-kernel.bbclass b/meta/classes-recipe/linux-kernel.bbclass
index 8f38a617..c9ac3336 100644
--- a/meta/classes-recipe/linux-kernel.bbclass
+++ b/meta/classes-recipe/linux-kernel.bbclass
@@ -126,7 +126,9 @@ BBCLASSEXTEND:append:cross-profile = " kbuildtarget"
 
 # When cross-profile is active:
 # build only kernel (including config) with the default variant of the recipe
-BUILD_PROFILES:cross-profile = "pkg.${BPN}.kernel"
+# and build the cross libc-dev package if KERNEL_LIBC_DEV_DEPLOY is enabled
+BUILD_PROFILES:cross-profile = "pkg.${BPN}.kernel \
+    ${@ 'pkg.' + d.getVar('BPN') + '.cross' if bb.utils.to_boolean(d.getVar('KERNEL_LIBC_DEV_DEPLOY')) else '' }"
 
 # -native: kbuild package for host
 BUILD_PROFILES:class-native = "pkg.${BPN}.kbuild"
-- 
2.43.0

-- 
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/20251218095705.1234100-1-tobias.schaffner%40siemens.com.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-12-18 12:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-12-18  9:57 [PATCH] meta: build the linux-kernels cross libc-dev package if cross-profile is active 'Tobias Schaffner' via isar-users
2025-12-18 10:17 ` 'MOESSBAUER, Felix' via isar-users
2025-12-18 12:13   ` 'Jan Kiszka' via isar-users
2025-12-18 12:27     ` 'Jan Kiszka' via isar-users
2025-12-18 12:39 ` 'Jan Kiszka' via isar-users

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox