Forums › Reference, Evaluation, and Development Boards › Problem to load a driver in the openstlinuximage
Hi,
I have compiled a driver for the kernel version 5.10.10-r0 (stm32mp1-openstlinux-5.10-dunfell-mp1-21-03-31) but when I use insmod to load in the kernel obtain the next message: disagrees about version of symbol module_layout.It appears that the kernel version is not 5.10.10-r0. ¿Could you indicate me which kernel version is used in the openst image for osd32mp1-red?
Thanks in advance.
amolina,
This error could be related to signing of the kernel module. Module signing is enabled in the current version of the OpenSTLinux. You can sign the kernel module with the command shown here: https://github.com/octavosystems/osd32mp1-build-tools/blob/master/Makefile#L139.
You can also see the exact version of the kernel being cloned for the Debian SDK here: https://github.com/octavosystems/osd32mp1-debian/blob/main/default.xml#L7. It indicates that the kernel version is 5.10-stm32mp-r1.
That should be the same version used by meta-octavo: https://github.com/octavosystems/meta-octavo-osd32mp1.
Best,
Neeraj
Hi,
I have never seen a signed kernel module, ¿Where Do I need to add this, in my Makefile?
Thanks in advance.
To add more information I am compiling the driver out of tree with a Makefile, when it is compiled I send to my board and try to charge the driver with the insmod command, at this moment receive the message that says disagrees about version of symbol module_layout.
amolina,
The line of the Makefile(https://github.com/octavosystems/osd32mp1-build-tools/blob/master/Makefile#L139) I linked in my first response shows how you can sign the kernel module. You can integrate your custom driver into the Debian SDK by modifying the Makefile. Note the gcnano label that gives you a blueprint for out of tree kernel modules as the gcnano kernel module itself is an out of tree kernel module that gets compiled and added to the kernel(https://github.com/octavosystems/osd32mp1-build-tools/blob/master/Makefile#L147).
Best,
Neeraj
Hi,
A have a question related to this topic. Is possible to disable the signature of the modules through menuconfig disabling any option in the kernel? I have the same problem when enable drivers that are part of the kernel.
Thanks in advance.
amolina,
As mentioned in https://octavosystems.com/forums/topic/kernel-modification-in-debian-image/, you can add configuration fragments to disable kernel signing in the same way you can disable via menuconfig.
See a related discussion here: https://stackoverflow.com/questions/24975377/kvm-module-verification-failed-signature-and-or-required-key-missing-taintin for more info on driver signing.
Best,
Neeraj
Octavo Systems LLC all rights reserved
OCTAVO is registered in the U.S. Patent and Trademark Office. OSD, C-SiP, and the Octavo Logo are trademarks of Octavo Systems LLC.
"*" indicates required fields
"*" indicates required fields
"*" indicates required fields
"*" indicates required fields