21
TCB Bugs / Re: Module.symvers and System.map Missing for TC 17.x
« Last post by CNK on March 02, 2026, 04:55:21 PM »The Module.symvers file used to be useful to compile kernel modules quickly, but it seems this was dropped after linux-5.x.y.
I kind-of doubt that because I tried being cheeky and using the Module.symvers file for TC 16.x (also kernel 6.x). However when I tried to build the r8168 driver that build failed with lots of errors complaining about missing entries in Module.symvers. So it's not a solution.
It sounds like you didn't copy config-6.18.2-tinycore64 to .config and "make oldconfig" before you started?
Oh, I might have stuffed things up and overwritten .config with TC 16's Module.symvers while I was flailing around trying to find solutions. Anyway now I've got it:
Code: [Select]
$ grep tinycore .config
CONFIG_LOCALVERSION="-tinycore64"
Also I definitely downloaded it from the TC 17.x directory, not an earlier release.
I just tried again after deleting the old TC 16.x Module.symvers file and running "make clean" and it completes the "make oldconfig && make prepare && make modules_prepare" commands. But the driver build still fails complaining about no Module.symvers file:
Code: [Select]
$ make modules
[snip]
make[3]: Entering directory '/home/cnk2/r8168/r8168-8.056.02/src'
CC [M] r8168_n.o
CC [M] r8168_asf.o
CC [M] rtl_eeprom.o
CC [M] rtltool.o
LD [M] r8168.o
MODPOST Module.symvers
WARNING: /home/cnk2/r8168/linux-6.18.2/Module.symvers is missing.
Modules may not have dependencies or modversions.
You may get many unresolved symbol errors.
You can set KBUILD_MODPOST_WARN=1 to turn errors into warning
if you want to proceed at your own risk.
ERROR: modpost: "napi_alloc_skb" [r8168.ko] undefined!
ERROR: modpost: "alloc_etherdev_mqs" [r8168.ko] undefined!
ERROR: modpost: "pci_save_state" [r8168.ko] undefined!
ERROR: modpost: "free_irq" [r8168.ko] undefined!
ERROR: modpost: "is_vmalloc_addr" [r8168.ko] undefined!
ERROR: modpost: "device_set_wakeup_enable" [r8168.ko] undefined!
ERROR: modpost: "__skb_pad" [r8168.ko] undefined!
ERROR: modpost: "rtnl_unlock" [r8168.ko] undefined!
ERROR: modpost: "skb_copy_bits" [r8168.ko] undefined!
ERROR: modpost: "param_ops_uint" [r8168.ko] undefined!
WARNING: modpost: suppressed 149 unresolved symbol warnings because there were too many)
make[5]: *** [/home/cnk2/r8168/linux-6.18.2/scripts/Makefile.modpost:147: Module.symvers] Error 1
make[4]: *** [/home/cnk2/r8168/linux-6.18.2/Makefile:1960: modpost] Error 2
make[3]: *** [/home/cnk2/r8168/linux-6.18.2/Makefile:248: __sub-make] Error 2
make[3]: Leaving directory '/home/cnk2/r8168/r8168-8.056.02/src'
make[2]: *** [Makefile:248: __sub-make] Error 2
make[2]: Leaving directory '/home/cnk2/r8168/linux-6.18.2'
make[1]: *** [Makefile:181: modules] Error 2
make[1]: Leaving directory '/home/cnk2/r8168/r8168-8.056.02/src'
make: *** [Makefile:41: modules] Error 2
Trying KBUILD_MODPOST_WARN=1 succeeds, so I guess maybe that's OK, but I'd be a bit surprised if the driver actually works after all the unresolved symbol warnings. It's kind of a pain to test if it doesn't because I normally run my target system headless.
Code: [Select]
$ make KBUILD_MODPOST_WARN=1 modules
make -C src/ modules
make[1]: Entering directory '/home/cnk2/r8168/r8168-8.056.02/src'
find: ‘/lib/modules/6.18.2/kernel/drivers/net/ethernet’: No such file or directory
find: ‘/lib/modules/6.18.2/kernel/drivers/net’: No such file or directory
make -C /lib/modules/6.18.2/build M=/home/cnk2/r8168/r8168-8.056.02/src modules
make[2]: Entering directory '/home/cnk2/r8168/linux-6.18.2'
make[3]: Entering directory '/home/cnk2/r8168/r8168-8.056.02/src'
MODPOST Module.symvers
WARNING: /home/cnk2/r8168/linux-6.18.2/Module.symvers is missing.
Modules may not have dependencies or modversions.
You may get many unresolved symbol errors.
You can set KBUILD_MODPOST_WARN=1 to turn errors into warning
if you want to proceed at your own risk.
WARNING: modpost: "napi_alloc_skb" [r8168.ko] undefined!
WARNING: modpost: "alloc_etherdev_mqs" [r8168.ko] undefined!
WARNING: modpost: "pci_save_state" [r8168.ko] undefined!
WARNING: modpost: "free_irq" [r8168.ko] undefined!
WARNING: modpost: "is_vmalloc_addr" [r8168.ko] undefined!
WARNING: modpost: "device_set_wakeup_enable" [r8168.ko] undefined!
WARNING: modpost: "__skb_pad" [r8168.ko] undefined!
WARNING: modpost: "rtnl_unlock" [r8168.ko] undefined!
WARNING: modpost: "skb_copy_bits" [r8168.ko] undefined!
WARNING: modpost: "param_ops_uint" [r8168.ko] undefined!
WARNING: modpost: suppressed 149 unresolved symbol warnings because there were too many)
CC [M] r8168.mod.o
CC [M] .module-common.o
LD [M] r8168.ko
make[3]: Leaving directory '/home/cnk2/r8168/r8168-8.056.02/src'
make[2]: Leaving directory '/home/cnk2/r8168/linux-6.18.2'
make[1]: Leaving directory '/home/cnk2/r8168/r8168-8.056.02/src'
I guess it could be that r8168 hasn't been updated to work without Module.symvers on newer kernels. But the current kernel documentation still describes needing Module.symvers at "the MODPOST step" for building external modules.
I guess if it is still used, I could generate Module.symvers myself by doing a full kernel build. No time to try that right now though.
Recent Posts