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.

PROCESSOR-SDK-AM69: No clear instructions how to cross compile loadable kernel modules using sdk

Part Number: PROCESSOR-SDK-AM69
Other Parts Discussed in Thread: AM69

Can you provide more clear and specific steps in how to cross compile costum drivers for am69, using the sdk?

In the moment I'm facing a problem of not compatible version between the module and the target kernel as showed in the picture? How to fix this considering I have same versions in SDK and in the target board?

 

  • Hi Marlene,

    'make linux'

    The above command takes care of building the Linux kernel, dtb and modules.

    Make sure the module you want to use gets compiled.

    'make linux_install' 

    The above command makes sure that the Linux kernel dtb and modules are installed to the SD card rootfs partition.

    Can you check if the above helps? I am assuming that you are using the build infrastructure provided by the SDK.

    Best Regards,

    Keerthy 

  • Sure, but again, the module goes for some kernel with "dirty" in the name and not the right kernel as you can see in the picture:

    Consider the name of the driver being "learn" and its simply a hello world driver.

    why 6.1.46-dirty and not 6.1.46-g5892b80d6b? What i am doing wrong? It's something missing in the driver itself?

    Thank you!

  • Hi Marlene,

    That's because there is some uncommitted code? After modules install you should see that the module and kernel should be same version. Is that not the case?

    Best Regards,

    Keerthy 

  • Hello,
    committing the code didn't help. I needed to change localversion flags and scripts in order to have the proper naming. But meanwhile i solved and i was able to create my module and to deploy it in the target.

    Thank you for your help!

    BR,

    Marlene Bastos 

  • Hi Marlene:

        Could you share your changes detail about ? I also meet the same question .

    I needed to change localversion flags and scripts in order to have the proper naming.

    Thanks

  • Hi.

    This is a develop workaround by changing scripts/setlocalversion Line 85 .

    +    # printf '%s' -dirty
    +    printf '%s' -g247b2535b2  ==> change to your kernel commit version .


    The kernel version magic check purpose is making sure of your driver modules should be match with your kernel version .

    The finial solution i think you should update your driver module and kernel at the same time .