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-AM62B-P1: The kernel version is different and insmod does not work.

Part Number: SK-AM62B-P1

Tool/software:

Hi experts,

I am trying to create a kernel module based on the SDK(ti-linux-kernel-6.6.58+git-ti), but the kernel version is different and insmod does not work.
SDK: PROCESSOR-SDK-LINUX-AM62X v10.01.10.04

I used the kernel header to create the module, but the kernel version in the kernel header is as follows:
6.6.58-ga7758da17c28-dirty

The kernel version running on the EVM is as follows:
6.6.58-ti-01497-ga7758da17c28-dirty

Is this a problem with the 3rd party tool used to create the kernel module? Or can it be set using the TI SDK?

Best regards,
O.H

  • Hi O.H,

    As you observed, the kernel version and the kernel module version have to be the same. The simplest solution is to compile both the kernel module and the kernel which the module is compiled against to, then update the kernel Image binary and all module binaries to the root filesystem.

  • Hi Bin Liu,

    Thank you for your reply.

    As you observed, the kernel version and the kernel module version have to be the same. The simplest solution is to compile both the kernel module and the kernel which the module is compiled against to, then update the kernel Image binary and all module binaries to the root filesystem.

    The module is created in a 3rd party environment using TI's compiler(linux-devkit) and kernel headers as reference.
    Currently, the SD card is created using .wic.xz. After that, the separately created module is installed into the EVM.

    Could you tell me what to do in a situation like this where I have no choice but to add a module later?
    If the previous reply is the answer, could you please point me to some reference material that explains the specific steps?

    Best regards,
    O.H

  • Hi O.H,

    The kernel version information in the kernel Image binary is generated during compiling kernel. It is not in the kernel header. So if you only compile the 3P module with kernel headers it won't have the version information in the module .ko to match with the version info in the kernel Image binary.

    What you can do is:

    - download the Processor SDK installer. it provides the linux-devkit and kernel source code

    - under the SDK installation directory, run command 'make linux' to rebuild the entire kernel. it will generate kernel Image, dtb, and all enabled kernel modules. install all of them to the SD card.

    - configure and compile your 3P module against the kernel source code in the SDK installation directory. this will generate the module .ko which matches the version info with the new kernel binaries.

  • Hi Bin Liu,

    Thank you for your addvice.

    After connecting the SD card and running create-sdcard.sh on the HOST PC, I was able to match the kernel version by running the following:
    # make linux
    # sudo DESTDIR=/media/USER/rootfs PLATFORM=am62xx-evm make linux_install

    https://software-dl.ti.com/processor-sdk-linux/esd/AM62X/10_01_10_04/exports/docs/linux/Overview/Top_Level_Makefile.html#steps-to-follow-on-linux-host

    In this state, evm will be 6.6.58-ga7758da17c28-dirty and insmod will pass.

    Best regards,
    O.H

  • Hi O.H,

    Glad to see the issue is resolved. Thanks for the update.