This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

SK-AM62A-LP: Driver Compilation and interfacing with yocto build

Part Number: SK-AM62A-LP

Tool/software:

Hi,

We are working on building a camera sensor driver OS02C10. We have seperatlely built a kernel referencing to the below document:

              software-dl.ti.com/.../Foundational_Components_Kernel_Users_Guide.html

If I seperatly compile the driver in that kernel and replace the os02c10.ko file in /lib/modules/6.1.46+/kernel/drivers/media/i2c then I am getting the below error.

Error:

            [    6.142949] os02c10: version magic '6.1.46+ SMP preempt mod_unload modversions aarch64RANDSTRUCT_a9ded9ecf1d54182887d0b421d6fda34a2065573ac7a4f7824c5d88c6f0c78a5' should be '6.1.46+ SMP preempt mod_unload modversions aarch64RANDSTRUCT_c4a939762f86a8a883242c26ccb2b9840a5bf1b39a98f9bf1e2adf70db91f73b'
[    6.175182] os02c10: version magic '6.1.46+ SMP preempt mod_unload modversions aarch64RANDSTRUCT_a9ded9ecf1d54182887d0b421d6fda34a2065573ac7a4f7824c5d88c6f0c78a5' should be '6.1.46+ SMP preempt mod_unload modversions aarch64RANDSTRUCT_c4a939762f86a8a883242c26ccb2b9840a5bf1b39a98f9bf1e2adf70db91f73b'

How to add the driver directly to our yocto build?

Thanks in advance
        

  • Hi Anusha,

    How to add the driver directly to our yocto build?

    Yes this is really the best way to ensure compatibility between the kernel and the external kernel module (driver) you are trying to build; plus it will ensure you have a cohesive and reproducible build environment.

    The exact steps of what you need to do are outside the scope of what we can support here on the E2E but there are a number of helpful resources that can be found online, specifically in the Yocto documentation itself. There is an example called "hello-mod" (part of the "meta-skeleton" layer) that shows how to build and integrate an external source file as a kernel module which you should be able to use as a starting point.

    2.10.2 Incorporating Out-of-Tree Modules
    https://docs.yoctoproject.org/5.0.10/kernel-dev/common.html#incorporating-out-of-tree-modules

    If you need additional real-world examples/inspiration to model after try searching the Yocto source tree for existing kernel modules (executed from the sources/ folder):

    $ grep -r 'inherit module'

    Regards,
    Andreas