Kernel Module development using Yocto

Yocto related software discussions are here

Kernel Module development using Yocto

Postby nambiar » Mon Apr 17, 2017 9:12 am

Hi All,
I use Yocto to develop the kernel module for the wandboard. But I get the following error message while inserting the kernel module
hello: disagrees about version of symbol module_layout
insmod: ERROR: could not insert module hello.ko: Invalid module format

hell.ko is a simple kernel hello world module.
I execute the following command on my wandboard
Code: Select all
uname -r                                                 
3.14.28_1.0.0_ga-wandboard+g08f5291

I execute the following command on the kernel module.
Code: Select all
modinfo hello.ko                                         
filename:       /home/root/hello.ko                                             
depends:                                                                       
vermagic:       3.14.28_1.0.0_ga-wandboard+g08f5291 SMP preempt mod_unload modv

I see that the kernel version is still the same, Is there anything wrong in my approach , Also I dont see ant
/lib/modules
in my image. I have use the kernel source I generated in my SDK folder by adding the following command in my local.conf
Code: Select all
TOOLCHAIN_TARGET_TASK_append += " kernel-devsrc"

Kindly point the mistake , I am doing.

Regards
Sainath
nambiar
 
Posts: 9
Joined: Tue Apr 04, 2017 12:21 pm

Re: Kernel Module development using Yocto

Postby nambiar » Thu Apr 27, 2017 10:42 am

The issue is fixed when executed the command.
bitbake minimal-image -c populate sdk
nambiar
 
Posts: 9
Joined: Tue Apr 04, 2017 12:21 pm

Re: Kernel Module development using Yocto

Postby ClayMontgomery » Tue May 09, 2017 6:07 pm

In my experience, kernel modules must be built using the exact same version of the linux kernel AND the Yocto release for your linux image you will install the modules on.

Regards, Clay
ClayMontgomery
 
Posts: 60
Joined: Tue Nov 19, 2013 9:14 pm


Return to Software - Yocto

Who is online

Users browsing this forum: No registered users and 13 guests