Ok, this is indeed a tricky one...
It's based on the code from Stefan's "[PATCH] linux-module: Support
emulated module build with cross-compiled kernel" (replacing that patch),
and on the result of staring at dependency graphs with Jan.
This mainly addresses corner cases of the refactored kbuild packaging
when cross-compiling.
I've tested
- cross-compiled custom kernel and cross module build
- cross-compiled custom kernel and emulated module build
- distro kernel and emulated module build
Let me know if one of your use-cases is still missing.
Also including some fixups (p2-3) brought up in recent reviews on the ML.
Adriaan
changes since v3:
- (almost) restored the old API, where a module recipe only depends on
linux-headers-*. Now it's linux-headers-*-native.
- Removed the -native suffix from all PROVIDES and DEPENDS because
I realized that those are added automatically by the multiarch logic.
Only exception is the pseudo target used to pull in the base variant
(which builds the headers) into the native one (which builds the kbuild
tools). This still needs to be named "-native".
changes since v2:
- removed a forgotten line of testing code
changes since v1:
- always use linux-kbuild-native as build dependency, even for emulated
builds, because the multiarch logic will select the correct package
Adriaan Schmidt (3):
module.inc: fix kbuild dependency
linux-custom: use to_boolean when checking ISAR_CROSS_COMPILE
kbuildtarget.bbclass: add missing license header
meta/recipes-kernel/linux-module/module.inc | 2 +-
.../linux/classes/kbuildtarget.bbclass | 5 ++++
meta/recipes-kernel/linux/linux-custom.inc | 27 ++++++++++++-------
meta/recipes-kernel/linux/
linux-distro.bb | 1 +
4 files changed, 25 insertions(+), 10 deletions(-)
--
2.39.2