load driver with insmod get :disagrees about version of symbol module_layout
by yntnm from LinuxQuestions.org on (#5M2TN)
I compiled simple drive for Linux kernel for ARM system:
Code:$ uname -a Quote:
To compile i used the config file from the up ruining system located at:
Quote:
i downloaded a vanilla kernel, checkout to tag 4.4.5, replace the config file ,compile the kernel, and then compile the drive with the tool-chine for arm
Quote:
The drive contain simple code
Code:#include <linux/module.h>
#include <linux/kernel.h>
int init_module(void) {
printk(KERN_INFO "Hello world.\n");
return 0;
}
void cleanup_module(void) {
printk(KERN_INFO "Goodbye world.\n");
}i used insmod to load the driver but the err message to terminal is:
Quote:
at the dmesg i get this message
Quote:
However, when i compere between running module in the system with my module with readelf -a
The ELF Header are the same and the File Attributes are the same.
what can i check more?
Maybe the module loading was blocked by kernel? how can i check that?
some one hes a lead for my what i can do next?
p.s
- simple c program is ruining fine, so i guess the tool-chine is fine
- insmod -f not work as well
Thanks
Code:$ uname -a Quote:
Linux CR5 4.4.171-cr5 #2 Tue Mar 10 11:49:00 CET 2020 armv7l GNU/Linux |
Quote:
/proc/config.gz |
Quote:
gcc-linaro-7.2.1-2017.11-i686_arm-linux-gnueabi |
Code:#include <linux/module.h>
#include <linux/kernel.h>
int init_module(void) {
printk(KERN_INFO "Hello world.\n");
return 0;
}
void cleanup_module(void) {
printk(KERN_INFO "Goodbye world.\n");
}i used insmod to load the driver but the err message to terminal is:
Quote:
insmod: ERROR: could not insert module test_module.ko: Invalid module format |
Quote:
test_module: disagrees about version of symbol module_layout |
However, when i compere between running module in the system with my module with readelf -a
The ELF Header are the same and the File Attributes are the same.
what can i check more?
Maybe the module loading was blocked by kernel? how can i check that?
some one hes a lead for my what i can do next?
p.s
- simple c program is ruining fine, so i guess the tool-chine is fine
- insmod -f not work as well
Thanks