Skip to content

mac80211 backports package fails to generate Module.symvers on kernel 6.18 #1

@graysky2

Description

@graysky2

Summary

The mac80211/backports package builds successfully on kernel 6.18 but fails to generate Module.symvers, causing all dependent modules (mt76, etc.) to fail with undefined symbol errors.

Environment

  • OpenWrt target: x86_64
  • Kernel version: 6.18.2 (testing)
  • Package: kmod-mac80211 (backports-6.18)
  • Working kernel: 6.12.62

Problem

When building mt76 against kernel 6.18, modpost fails with undefined symbols:

ERROR: modpost: "ieee80211_sta_register_airtime" [mt76.ko] undefined!
ERROR: modpost: "__ieee80211_schedule_txq" [mt76.ko] undefined!
ERROR: modpost: "ieee80211_free_hw" [mt76.ko] undefined!
[... 67+ more undefined symbols]

Root Cause

The backports build process fails to invoke modpost for kernel 6.18, resulting in an empty Module.symvers file:

Kernel 6.12 (working):

$ wc -l build_dir/.../linux-x86_64/symvers/mac80211.symvers
321 mac80211.symvers

Kernel 6.18 (broken):

$ wc -l build_dir/.../linux-x86_64/symvers/mac80211.symvers
0 mac80211.symvers

Both builds use the same backports-6.18 source tree, but:

  • mac80211.ko is built successfully in both cases
  • Module.symvers is generated only for kernel 6.12
  • No Module.symvers files exist anywhere in the backports-6.18 build tree for kernel 6.18

Analysis

The backports build aggregates Module.symvers using:

grep -F <path> backports-6.18/./Module.symvers >> Module.symvers.tmp

However, individual module directories never generate Module.symvers because modpost is not being invoked during the kernel 6.18 build.

Investigation shows:

  • modpost binary exists at linux-6.18.2/scripts/mod/modpost
  • No .cmd files in backports show modpost being invoked for individual modules
  • The backports Makefile contains no references to modpost/MODPOST

Conclusion

Kernel 6.18 changed the module build system in a way that breaks the backports package's integration with the kernel build process. The backports Makefile or OpenWrt's patches need updating for kernel 6.18 compatibility.

Reproduction

  1. Configure OpenWrt for kernel 6.18 (testing)
  2. Build kmod-mac80211
  3. Attempt to build kmod-mt76
  4. Observe undefined symbol errors
  5. Check build_dir/.../linux-x86_64/symvers/mac80211.symvers - it will be empty

Expected Behavior

Module.symvers should be generated during the mac80211 build, containing exported symbols like ieee80211_tx_status_ext, allowing dependent modules to link successfully.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions