public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH 1/2] linux-kernel: Fix building of linux-libc-dev-*-cross packages
@ 2025-12-18 17:56 'Jan Kiszka' via isar-users
  2025-12-18 17:57 ` [PATCH 2/2] linux-kernel: Fix recipe provides for linux-libc-dev targets 'Jan Kiszka' via isar-users
  2025-12-19 10:45 ` [PATCH 1/2] linux-kernel: Fix building of linux-libc-dev-*-cross packages Anton Mikanovich
  0 siblings, 2 replies; 3+ messages in thread
From: 'Jan Kiszka' via isar-users @ 2025-12-18 17:56 UTC (permalink / raw)
  To: isar-users
  Cc: Tobias Schaffner, Felix Moessbauer, Anton Mikanovich, Stefan Koch

From: Jan Kiszka <jan.kiszka@siemens.com>

The cross variant of linux-libc-dev is always built along with the
kernel, just like the native variant. Ensure this by dropping the wrong
cross-pkgs override, enabling pkg.${BPN}.cross when :cross-profile is
active as well.

Fixes: afba99fe6aeb ("linux-custom: fix name collision on cross profile")
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---

Without test cases yet, not sure I manage to find time for them 
tomorrow, but I'd like to share already in case someone runs into the 
issue. Supposed to substitute "build the linux-kernels cross libc-dev 
package if cross-profile is active" by Tobias.

 meta/classes-recipe/linux-kernel.bbclass | 15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)

diff --git a/meta/classes-recipe/linux-kernel.bbclass b/meta/classes-recipe/linux-kernel.bbclass
index 8f38a617..4a304833 100644
--- a/meta/classes-recipe/linux-kernel.bbclass
+++ b/meta/classes-recipe/linux-kernel.bbclass
@@ -109,13 +109,8 @@ KERNEL_NAME_PROVIDED ?= "${@ d.getVar('BPN').partition('linux-')[2]}"
 
 # Determine cross-profile override
 python() {
-    if d.getVar("DISTRO_ARCH") != d.getVar("HOST_ARCH") and bb.utils.to_boolean(d.getVar("ISAR_CROSS_COMPILE")):
-        if "class-native" not in d.getVar("OVERRIDES").split(":"):
-            # cross compiling
-            d.appendVar("OVERRIDES", ":cross-profile")
-        else:
-            # generating -cross packages (in HOST_ARCH) from a -native variant
-            d.appendVar("OVERRIDES", ":cross-pkgs")
+    if d.getVar("DISTRO_ARCH") != d.getVar("HOST_ARCH") and bb.utils.to_boolean(d.getVar("ISAR_CROSS_COMPILE")) and "class-native" not in d.getVar("OVERRIDES").split(":"):
+        d.appendVar("OVERRIDES", ":cross-profile")
 }
 
 # Default profiles and provides
@@ -125,12 +120,12 @@ BUILD_PROFILES = "pkg.${BPN}.kernel pkg.${BPN}.kbuild"
 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"
+# Build kernel (including config) cross packages (linux-libc-dev-*-cross)
+# with the default variant of the recipe
+BUILD_PROFILES:cross-profile = "pkg.${BPN}.kernel pkg.${BPN}.cross"
 
 # -native: kbuild package for host
 BUILD_PROFILES:class-native = "pkg.${BPN}.kbuild"
-BUILD_PROFILES:append:cross-pkgs = " pkg.${BPN}.cross"
 RECIPE_PROVIDES:class-native = " \
     linux-headers-${KERNEL_NAME_PROVIDED} \
     linux-kbuild-${KERNEL_NAME_PROVIDED}"
-- 
2.51.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/60573e65-4ad1-4322-b401-94e7fcbcdfe2%40siemens.com.

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

* [PATCH 2/2] linux-kernel: Fix recipe provides for linux-libc-dev targets
  2025-12-18 17:56 [PATCH 1/2] linux-kernel: Fix building of linux-libc-dev-*-cross packages 'Jan Kiszka' via isar-users
@ 2025-12-18 17:57 ` 'Jan Kiszka' via isar-users
  2025-12-19 10:45 ` [PATCH 1/2] linux-kernel: Fix building of linux-libc-dev-*-cross packages Anton Mikanovich
  1 sibling, 0 replies; 3+ messages in thread
From: 'Jan Kiszka' via isar-users @ 2025-12-18 17:57 UTC (permalink / raw)
  To: isar-users
  Cc: Tobias Schaffner, Felix Moessbauer, Anton Mikanovich, Stefan Koch

From: Jan Kiszka <jan.kiszka@siemens.com>

Avoid the the kbuildtarget also provides linux-libc-dev*. Furthermore,
only provide the cross variant when it is actually built.

While at it, drop the unused :nolibcdev override to avoid confusion.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 meta/classes-recipe/linux-kernel.bbclass | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/meta/classes-recipe/linux-kernel.bbclass b/meta/classes-recipe/linux-kernel.bbclass
index 4a304833..37299412 100644
--- a/meta/classes-recipe/linux-kernel.bbclass
+++ b/meta/classes-recipe/linux-kernel.bbclass
@@ -140,6 +140,9 @@ BUILD_PROFILES:class-kbuildtarget = "pkg.${BPN}.kbuild"
 RECIPE_PROVIDES:class-kbuildtarget = " \
     linux-headers-${KERNEL_NAME_PROVIDED} \
     linux-kbuild-${KERNEL_NAME_PROVIDED}"
+RECIPE_PROVIDES:remove:class-kbuildtarget = " \
+    linux-libc-dev \
+    linux-libc-dev-${DISTRO_ARCH}-cross"
 # Using DEPENDS instead of RDEPENDS to ensure creation of kernel including
 # pregenerated kernel config before target specific linux-kbuild package build
 DEPENDS:class-kbuildtarget = "${BPN}"
@@ -156,12 +159,12 @@ RECIPE_PROVIDES = " \
 "
 
 # Provide linux-libc-dev packages unless nolibcdev profile used
-OVERRIDES:append = ":${@ bb.utils.contains('DEB_BUILD_PROFILES', 'pkg.{}.nolibcdev'.format(d.getVar('BPN')), 'nolibcdev', 'libcdev', d)}"
+OVERRIDES:append = ":${@ bb.utils.contains('DEB_BUILD_PROFILES', 'pkg.{}.nolibcdev'.format(d.getVar('BPN')), '', 'libcdev', d)}"
 
 RECIPE_PROVIDES:append:libcdev = " \
-    linux-libc-dev \
-    linux-libc-dev-${DISTRO_ARCH}-cross \
-"
+    linux-libc-dev"
+RECIPE_PROVIDES:append:libcdev:cross-profile = " \
+    linux-libc-dev-${DISTRO_ARCH}-cross"
 
 # When cross-profile is active:
 # kbuild package is provided by -native or -kbuildtarget variant. Also headers
-- 
2.51.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/862b289b-7978-49ad-9eb0-3fe386f9e258%40siemens.com.

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

* Re: [PATCH 1/2] linux-kernel: Fix building of linux-libc-dev-*-cross packages
  2025-12-18 17:56 [PATCH 1/2] linux-kernel: Fix building of linux-libc-dev-*-cross packages 'Jan Kiszka' via isar-users
  2025-12-18 17:57 ` [PATCH 2/2] linux-kernel: Fix recipe provides for linux-libc-dev targets 'Jan Kiszka' via isar-users
@ 2025-12-19 10:45 ` Anton Mikanovich
  1 sibling, 0 replies; 3+ messages in thread
From: Anton Mikanovich @ 2025-12-19 10:45 UTC (permalink / raw)
  To: Jan Kiszka, isar-users; +Cc: Tobias Schaffner, Felix Moessbauer, Stefan Koch

18/12/2025 19:56, Jan Kiszka wrote:
> From: Jan Kiszka <jan.kiszka@siemens.com>
>
> The cross variant of linux-libc-dev is always built along with the
> kernel, just like the native variant. Ensure this by dropping the wrong
> cross-pkgs override, enabling pkg.${BPN}.cross when :cross-profile is
> active as well.
>
> Fixes: afba99fe6aeb ("linux-custom: fix name collision on cross profile")
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Hello Jan,

This patchset fails on fast CI during 
mc:phyboard-mira-bookworm:example-module-phy build:

The following packages have unmet dependencies:
  linux-headers-phy:armhf : Depends: linux-kbuild-phy:armhf but it is 
not installable or
linux-kbuild-phy-armhf-cross:armhf but it is not installable

Full log: 
https://ci.isar-build.org/job/isar_wzh_devel_1b_fast/11/testReport/junit/(root)/CrossTest/_build_isar_wzh_devel_1b_fast_11_testsuite_citest_py_CrossTest_test_cross/

-- 
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/f03707f7-4a01-4ca6-9d08-16d23e8c0427%40ilbers.de.

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

end of thread, other threads:[~2025-12-19 10:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-12-18 17:56 [PATCH 1/2] linux-kernel: Fix building of linux-libc-dev-*-cross packages 'Jan Kiszka' via isar-users
2025-12-18 17:57 ` [PATCH 2/2] linux-kernel: Fix recipe provides for linux-libc-dev targets 'Jan Kiszka' via isar-users
2025-12-19 10:45 ` [PATCH 1/2] linux-kernel: Fix building of linux-libc-dev-*-cross packages Anton Mikanovich

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