1

I am running a custom built kernel (4.8.15-rt10) and have been given a module that was built on the exact same kernel with the same .config (I provided everything). When I use insmod to insert the module, I get there error "Invalid module format". So first inclination is wrong kernel version, here are the results of modinfo compared with uname -a:

uname -a ==> 4.8.15-rt10 #5 SMP PREEMPT RT Mon Oct 23 10:57:27 EDT 2017 x86_64 x86_64 x86_64 GNU/Linux
modinfo ==> vermagic: 4.8.15-rt10 SMP preempt mod_unload

As far as I can tell it's the same kernel, so what am I missing? I read somewhere I can use modprobe --force to force it, but somehow I need to use depmod first?

Thanks


Output:

user@user:/usr/src/linux-4.8.15-rt10$ cat .config | grep 'CONFIG_PREEMPT'
CONFIG_PREEMPT_RCU=y
CONFIG_PREEMPT_NOTIFIERS=y
CONFIG_PREEMPT=y
CONFIG_PREEMPT_RT_BASE=y
CONFIG_PREEMPT_LAZY=y
# CONFIG_PREEMPT_NONE is not set
# CONFIG_PREEMPT_VOLUNTARY is not set
# CONFIG_PREEMPT__LL is not set
# CONFIG_PREEMPT_RTB is not set
CONFIG_PREEMPT_RT_FULL=y
CONFIG_PREEMPT_COUNT=y
# CONFIG_PREEMPT_TRACER is not set
  • Looking closer, I'm thinking they built it without changing the Preemption model from 'Preemptible Kernel' to 'Fully Preemptible Kernel' – DrTarr Oct 23 '17 at 18:05
  • After make menuconfig check the .config file with cat .config | grep 'CONFIG_PREEMPT' what is the output? you can edit here – GAD3R Oct 23 '17 at 19:34
  • Added above, although I don't have the .config that was used to build the supplied module. I did, however, give them mine and ask them to use it. I've contacted them to double check they used the same .config file. – DrTarr Oct 23 '17 at 19:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.