Skip to contentSkip to conversation

module.bbclass: add KBUILD_EXTRA_SYMBOLS to install

PATCH In review Alon Bar-Lev 2 participants 5 messages May 12, 2025 – May 18, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 module.bbclass: add KBUILD_EXTRA_SYMBOLS to install

Hello,

Please consider backporting "module.bbclass: add KBUILD_EXTRA_SYMBOLS to install"[1] trivial patch to Scarthgap and Walnascar, it will allow building kernel modules with dependencies without linkage breakage also in stable branches.

Master commit hash: 483c6067eb1ee9562c0b21cea0d375c7f521bede Into [at least]: scarthgap, walnascar

Regards,
Alon Bar-Lev

[1]
https://git.yoctoproject.org/poky/commit/?id=483c6067eb1ee9562c0b21cea0d375c7f521bede

#1 lore raw
Quoted 7 lines · Alon Bar-Lev via lists.openembedded.org

Hello,

Please consider backporting "module.bbclass: add KBUILD_EXTRA_SYMBOLS to install"[1] trivial patch to Scarthgap and Walnascar, it will allow building kernel modules with dependencies without linkage breakage also in stable branches.

Master commit hash: 483c6067eb1ee9562c0b21cea0d375c7f521bede Into [at least]: scarthgap, walnascar

It will be faster if you can send the backported patches to the mailing list after testing them out on the releases you propose them for prefixed in the subject line

Quoted 15 lines

Regards,
Alon Bar-Lev

[1] https://git.yoctoproject.org/poky/commit/?id=483c6067eb1ee9562c0b21cea0d375c7f521bede

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#216370): https://lists.openembedded.org/g/openembedded-core/message/216370
Mute This Topic: https://lists.openembedded.org/mt/113070483/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#2 lore raw

Hello Khem,

Quoted 7 lines · Khem Raj
Quoted 3 lines · Alon Bar-Lev via lists.openembedded.org

Hello,

Quoted 8 lines
Quoted 4 lines

Please consider backporting "module.bbclass: add KBUILD_EXTRA_SYMBOLS to install"[1] trivial patch to Scarthgap and Walnascar, it will allow building kernel modules with dependencies without linkage breakage also in stable branches.

Master commit hash: 483c6067eb1ee9562c0b21cea0d375c7f521bede Into [at least]: scarthgap, walnascar

It will be faster if you can send the backported patches to the mailing list after testing them out on the releases you propose them for prefixed in the subject line

The patch cleanly applies (cherry-picked) to both scarthgap, walnascar and tested.

Regards,
Alon

#3 lore raw

PATCH 1/1 module.bbclass: add KBUILD_EXTRA_SYMBOLS to install

In reply to Alon Bar-Lev

Symbols are used during install as well, adding KBUILD_EXTRA_SYMBOLS enables successful installation.

| DEBUG: Executing shell function do_install
| NOTE: make -j 22 KERNEL_SRC=xxx/kernel-source -C xxx/drivers KDIR=xxx/kernel-source DEPMOD=echo MODLIB=xxx/image/lib/modules/6.6.75-yocto-standard-00189-g530c419bc9db INSTALL_FW_PATH=xxx/image/lib/firmware CC=aarch64-poky-linux-gcc -fuse-ld=bfd -fcanon-prefix-map LD=aarch64-poky-linux-ld.bfd OBJCOPY=aarch64-poky-linux-objcopy STRIP=aarch64-poky-linux-strip O=xxx/kernel-build-artifacts modules_install
| make: Entering directory 'xxx/drivers'
| make -C xxx/kernel-source M=xxx/drivers modules
| make[1]: Entering directory 'xxx/kernel-source'
| make[2]: Entering directory 'xxx/kernel-build-artifacts'
| MODPOST xxx/drivers/Module.symvers
| ERROR: modpost: "xxx" [xxx/xxx.ko] undefined!

(From OE-Core rev: 0ef80eeda967a9e04ff91c3583aabbc35c9868e8)

---
 meta/classes-recipe/module.bbclass | 1 +
 1 file changed, 1 insertion(+)
meta/classes-recipe/module.bbclass +1 -0
index f2f0b25a2d..4948e995c5 100644
@@ -65,6 +65,7 @@ module_do_install() {
 	           CC="${KERNEL_CC}" LD="${KERNEL_LD}" OBJCOPY="${KERNEL_OBJCOPY}" \
 	           STRIP="${KERNEL_STRIP}" \
 	           O=${STAGING_KERNEL_BUILDDIR} \
+		   KBUILD_EXTRA_SYMBOLS="${KBUILD_EXTRA_SYMBOLS}" \
 	           ${MODULES_INSTALL_TARGET}
 
 	if [ ! -e "${B}/${MODULES_MODULE_SYMVERS_LOCATION}/Module.symvers" ] ; then
Signature · 1 line
2.43.0
#4 lore raw

PATCH 1/1 module.bbclass: add KBUILD_EXTRA_SYMBOLS to install

In reply to Alon Bar-Lev

Symbols are used during install as well, adding KBUILD_EXTRA_SYMBOLS enables successful installation.

| DEBUG: Executing shell function do_install
| NOTE: make -j 22 KERNEL_SRC=xxx/kernel-source -C xxx/drivers KDIR=xxx/kernel-source DEPMOD=echo MODLIB=xxx/image/lib/modules/6.6.75-yocto-standard-00189-g530c419bc9db INSTALL_FW_PATH=xxx/image/lib/firmware CC=aarch64-poky-linux-gcc -fuse-ld=bfd -fcanon-prefix-map LD=aarch64-poky-linux-ld.bfd OBJCOPY=aarch64-poky-linux-objcopy STRIP=aarch64-poky-linux-strip O=xxx/kernel-build-artifacts modules_install
| make: Entering directory 'xxx/drivers'
| make -C xxx/kernel-source M=xxx/drivers modules
| make[1]: Entering directory 'xxx/kernel-source'
| make[2]: Entering directory 'xxx/kernel-build-artifacts'
| MODPOST xxx/drivers/Module.symvers
| ERROR: modpost: "xxx" [xxx/xxx.ko] undefined!

(From OE-Core rev: 0ef80eeda967a9e04ff91c3583aabbc35c9868e8)

---
 meta/classes-recipe/module.bbclass | 1 +
 1 file changed, 1 insertion(+)
meta/classes-recipe/module.bbclass +1 -0
index f2f0b25a2d..4948e995c5 100644
@@ -65,6 +65,7 @@ module_do_install() {
 	           CC="${KERNEL_CC}" LD="${KERNEL_LD}" OBJCOPY="${KERNEL_OBJCOPY}" \
 	           STRIP="${KERNEL_STRIP}" \
 	           O=${STAGING_KERNEL_BUILDDIR} \
+		   KBUILD_EXTRA_SYMBOLS="${KBUILD_EXTRA_SYMBOLS}" \
 	           ${MODULES_INSTALL_TARGET}
 
 	if [ ! -e "${B}/${MODULES_MODULE_SYMVERS_LOCATION}/Module.symvers" ] ; then
Signature · 1 line
2.43.0