Tiny Core Base > TCB Bugs

Module.symvers and System.map Missing for TC 17.x

(1/2) > >>

CNK:
Trying to compile the r8168 driver module for TC17 x86_64, I found there's no Module.symvers-6.18.2-tinycore64.gz file at the expected download location:

http://www.tinycorelinux.net/17.x/x86_64/release/src/kernel/Module.symvers-6.18.2-tinycore64.gz

Same for x86.

Without downloading this, when I run "make oldconfig && make prepare && make modules_prepare" to prepare for building the third-party module, it asks lots of questions and I'm not sure if guessing the answers will cause compatibility issues with the compiled kernel module.

I won't be needing System.map for this, but it might have been left out by accident too.

Juanito:
The Module.symvers file used to be useful to compile kernel modules quickly, but it seems this was dropped after linux-5.x.y.

It sounds like you didn't copy config-6.18.2-tinycore64 to .config and "make oldconfig" before you started?

Paul_123:
Did I not provide it to you Juanito?  I should have.    I normally provide it for piCore.

CNK:

--- Quote from: Juanito on March 02, 2026, 04:42:41 AM ---The Module.symvers file used to be useful to compile kernel modules quickly, but it seems this was dropped after linux-5.x.y.

--- End quote ---

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.


--- Quote from: Juanito on March 02, 2026, 04:42:41 AM ---It sounds like you didn't copy config-6.18.2-tinycore64 to .config and "make oldconfig" before you started?

--- End quote ---

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: ---$ grep tinycore .config
CONFIG_LOCALVERSION="-tinycore64"

--- End code ---

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: ---$ 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

--- End code ---

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: ---$ 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'

--- End code ---

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.

Paul_123:
You definitely need them to build modules, but I forget which stage they get built.   Not sure modules_prepare is enough.

Anyway, I just uploaded them to the kernel source folder for v17

Navigation

[0] Message Index

[#] Next page

Go to full version