From: Jan Kiszka <
jan.k...@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.k...@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