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-AM64X: Cannot install Marvell mv88e6341 driver in linux

Part Number: PROCESSOR-SDK-AM64X


Hi 

I am trying to integrate the Marvell 88E6341 switch with AM64x. While trying to install driver for the device I am getting the following error:

root@am64xx-evm:~/lib/modules/5.10.100-g7a7a3af903/kernel/drivers/net/dsa/mv88exxx# insmod mv88e6xxx.ko
[ 1466.676328] mv88e6xxx: disagrees about version of symbol module_layout
insmod: ERROR: could not insert module mv88e6xxx.ko: Invalid module format

Please let me know If I am installing the correct driver, if yes why it might be showing this error. 

If anyone has experience in integrating Marvell MV88E6341 to AM64x please do explain the  procedure.

Thanks

Himansu

  • HI,

    [ 1466.676328] mv88e6xxx: disagrees about version of symbol module_layout

    This message means the binaries of the kernel image and the driver module are not compiled on the same build.

    When you compile the kernel, please do "make Image modules", this will compile both kernel Image and driver modules on the same build. Then you populate both kernel Image and driver modules to your root filesystem. This should solve the issue.

  • Hi

    I have tried with kernel and driver of the same build but still, it shows the same error.

  • Hi,

    Please run the following command on your board and provide the output logs:

    # uname -a
    # ls -l /lib/modules/

  • root@am64xx-evm:~# uname -r
    5.10.100-g7a7a3af903
    root@am64xx-evm:~# ls -l /lib/modules
    total 4
    drwxr-xr-x 4 root root 4096 May 8 17:54 5.10.100-g7a7a3af903

  • Hi,

    I was asking the output of command 'uname -a', which has more info than 'uname -r'.

    But anyway, please provide the exact commands you used to build and install the kernel Image and modules to your root filesystem.

  • root@am64xx-evm:~/porting# uname -a
    Linux am64xx-evm0.100-g7a7a3af903 #1 SMP PREEMPT Wed Jun 22 10:44:26 IST 2022 aarch64 aarch64 aarch64 GNU/Linux

    Steps I followed to build and install Kernel image and modules:

    1. make ARCH=arm64 CROSS_COMPILE=aarch64-none-linux-gnu- tisdk_am64xx-evm_defconfig
    2. make ARCH=arm64 CROSS_COMPILE=aarch64-none-linux-gnu- Image

    3. make ARCH=arm64 CROSS_COMPILE=aarch64-none-linux-gnu- modules

    4. make ARCH=arm64 INSTALL_MOD_PATH=<installation path> modules_install

    Then I copied the kernel image to "/boot" folder and moules to "/lib" folder in filesystem.

  • 1. make ARCH=arm64 CROSS_COMPILE=aarch64-none-linux-gnu- tisdk_am64xx-evm_defconfig
    2. make ARCH=arm64 CROSS_COMPILE=aarch64-none-linux-gnu- Image

    3. make ARCH=arm64 CROSS_COMPILE=aarch64-none-linux-gnu- modules

    I believe you missed steps here, tisdk_am64xx-evm_defconfig doesn't have mv88e6xxx module enabled, how can you have mv88e6xxx.ko in your filesystem?

  • 4. make ARCH=arm64 INSTALL_MOD_PATH=<installation path> modules_install

    Then I copied the kernel image to "/boot" folder and moules to "/lib" folder in filesystem.

    By the way, when I ask for the exact commands, I meant the EXACT commands you typed, not something like "<installation path>", or "then I copied..." which doesn't help to spot any error in your process.

  • Hi Bin

    I agree that  tisdk_am64xx-evm_defconfig doesn't have mv88e6xxx module enabled so we can have mv88e6xxx.ko in our filesystem. That is the reason I enabled mv88e6xxx in menuconfig and compiled the driver modules and copied the generated driver modules to the "/lib" folder in the filesystem. After this I should be able to load the driver right? 

  • The process you described is correct, but the Linux console log "disagrees about version of symbol module_layout" means the kernel running on the board doesn't match the one which is used to compile mv88e6xxx.ko. So there is likely something is not done correctly when you ran this process. You can search this message on internet and you will find tons of threads related to this, (but most of them are on desktop Linux).

    If you can attach the entire log of you compiling the kernel and copying the file to filesystem, I can review it to see if there is any step wrong. When you "describe" what you have done, all the details are lost.

    BTY, when loading a kernel module, you suppose to use 'modprobe' instead of 'insmod'. In this case, it should be 'modprobe mv88e6xxx'.