[v6,4/5] linux-module: Support emulated module build with cross-compiled kernel

Message ID 20240214101025.2123540-5-stefan-koch@siemens.com
State Superseded, archived
Headers show
Series linux-custom: Split up binaries from kernel headers to kbuild package | expand

Commit Message

Koch, Stefan Feb. 14, 2024, 10:10 a.m. UTC
Signed-off-by: Stefan Koch <stefan-koch@siemens.com>
---
 meta/recipes-kernel/linux-module/module.inc | 3 ++-
 meta/recipes-kernel/linux/linux-distro.bb   | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)

Patch

diff --git a/meta/recipes-kernel/linux-module/module.inc b/meta/recipes-kernel/linux-module/module.inc
index 269da6ae..51c89ccf 100644
--- a/meta/recipes-kernel/linux-module/module.inc
+++ b/meta/recipes-kernel/linux-module/module.inc
@@ -17,7 +17,8 @@  PN .= "-${KERNEL_NAME}"
 
 KERNEL_IMAGE_PKG ??= "linux-image-${KERNEL_NAME}"
 KERNEL_HEADERS_PKG ??= "linux-headers-${KERNEL_NAME}"
-DEPENDS += "${KERNEL_HEADERS_PKG}"
+KERNEL_KBUILD_PKG ??= "linux-kbuild-${KERNEL_NAME}-native"
+DEPENDS += "${KERNEL_HEADERS_PKG} ${KERNEL_KBUILD_PKG}"
 DEBIAN_BUILD_DEPENDS = "${KERNEL_HEADERS_PKG}"
 
 SIGNATURE_KEYFILE ??= ""
diff --git a/meta/recipes-kernel/linux/linux-distro.bb b/meta/recipes-kernel/linux/linux-distro.bb
index bc43528c..13b8dc7e 100644
--- a/meta/recipes-kernel/linux/linux-distro.bb
+++ b/meta/recipes-kernel/linux/linux-distro.bb
@@ -10,6 +10,7 @@  python() {
     for kernel in distro_kernels.split():
         d.appendVar('PROVIDES', ' linux-image-' + kernel)
         d.appendVar('PROVIDES', ' linux-headers-' + kernel)
+        d.appendVar('PROVIDES', ' linux-kbuild-' + kernel)
     if d.getVar('KERNEL_IMAGE_PKG'):
         d.appendVar('PROVIDES', ' ' + d.getVar('KERNEL_IMAGE_PKG'))
     if d.getVar('KERNEL_HEADERS_PKG'):