Hi, This is to request for having the standard mechanism for building the kernel modules on the sdk target. Currently Yocto sdk Image does not have /lib/modules/$(shell uname -r)/build, which is the standard path to look for the kernel headers while building the kernel module. Having this in Yocto sdk image would be a good option to build the kernel modules on the target. Thanks Kishore.
If only the directory name need to exist, then this can be implemented easily. I am looking into it. Nitin
Looking further into this I noted: 1. This will need changes to the linux-yocto recipes from oecore 2. The building and packaging of the kernel recipes will be changed 3. the linux-yocto kernel recipes have lot of customization, which complicates the work further. 4. Given the M3 cut-off date is just one more day, It makes sense to push this features to post 1.7 release.
This looks like a related bug: https://bugzilla.yoctoproject.org/show_bug.cgi?id=6630
Created attachment 2147 [details] a simple sample kernel module sources for test I am able to build the attached kernel module on the target after making a softlink from /usr/src/kernel/ to /lib/modules/$(shell uname -r)/build
sent a fix for this to oecore ML.
http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=3224472c68865714716305dfbc8efaa59f73958e