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-AM62X: support Needed: AD9361 Driver Version Magic Mismatch on AM62x E3 Evaluation Board

Part Number: PROCESSOR-SDK-AM62X


Tool/software:

Dear TI Support Team,

I am working with the AM62x E3 evaluation board and am attempting to interface the AD9361 using its driver. I built the .ko driver file using the latest TI SDK for AM62x. While the driver file was successfully generated, I am encountering issues when trying to load the module on the target board.

Below are the details of my setup and the error:

Setup Details
Host System Details:

OS: Ubuntu 22.04
Kernel Version: 6.8.0-49-generic
SDK: AM62x latest SDK (TI Linux Kernel 6.6.32 branch)
Target Board Details:

Board: AM62x E3 Evaluation Board
Kernel Version on Board: 6.6.32-ti-g6de6e418c80e-dirty
Driver Compilation and Verification:

Driver compiled successfully, and the .ko file was generated.
Verified the .ko file on the target board:


root@am62xx-evm:~# ls -l /usr/lib/modules/6.6.32-ti-g6de6e418c80e-dirty/kernel/drivers/iio/adc/ad9361_drv.ko
-rw-r--r-- 1 root root 565704 Dec 17 2024 /usr/lib/modules/6.6.32-ti-g6de6e418c80e-dirty/kernel/drivers/iio/adc/ad9361_drv.ko
Verified the modinfo of the driver module:

root@am62xx-evm:~# modinfo /usr/lib/modules/6.6.32-ti-g6de6e418c80e-dirty/kernel/drivers/iio/adc/ad9361_drv.ko
filename: /usr/lib/modules/6.6.32-ti-g6de6e418c80e-dirty/kernel/drivers/iio/adc/ad9361_drv.ko
license: GPL v2
description: Analog Devices AD9361 ADC
author: Michael Hennerich <michael.hennerich@analog.com>
alias: spi:ad9363a
alias: spi:ad9361-2x
alias: spi:ad9364
alias: spi:ad9361
depends:
intree: Y
name: ad9361_drv
vermagic: 6.6.32 SMP preempt mod_unload aarch64
Issue Observed
When I attempt to load the ad9361_drv.ko driver on the target board, I receive the following error:


root@am62xx-evm:~# dmesg | grep ad9361
[ 552.798171] ad9361_drv: version magic '6.6.32 SMP preempt mod_unload aarch64' should be '6.6.32-ti-g6de6e418c80e-dirty SMP preempt mod_unload aarch64'
[ 966.385706] ad9361_drv: version magic '6.6.32 SMP preempt mod_unload aarch64' should be '6.6.32-ti-g6de6e418c80e-dirty SMP preempt mod_unload aarch64'
When I use modprobe to load the driver, it fails with:


root@am62xx-evm:~# sudo modprobe ad9361_drv
modprobe: FATAL: Module ad9361_drv not found in directory /lib/modules/6.6.32-ti-g6de6e418c80e-dirty
Analysis and Observations
Version Magic Mismatch:

The kernel version on the target board is:


root@am62xx-evm:~# uname -r
6.6.32-ti-g6de6e418c80e-dirty
The version magic in the driver file is:
makefile


vermagic: 6.6.32 SMP preempt mod_unload aarch64
The kernel expects the version magic to be:


6.6.32-ti-g6de6e418c80e-dirty SMP preempt mod_unload aarch64
This mismatch is causing the driver to fail when loading.

Kernel Compilation Mismatch:

The SDK's ti-linux-kernel branch I used to build the driver on the host system does not align with the kernel on the target board.
The host system's kernel version is 6.8.0-49-generic, which is different from the target kernel version (6.6.32-ti-g6de6e418c80e-dirty).
Request for Assistance
How to Align Kernel Versions:
What is the recommended process to ensure that the driver’s version magic matches the target board’s kernel version? Should I rebuild the kernel on the host system with the exact version used on the target board (6.6.32-ti-g6de6e418c80e-dirty)?

Rebuilding the SDK Kernel:
If rebuilding is required, could you provide guidance on compiling the kernel with the same vermagic string on the host system and syncing it with the target board?

Best Practices for Driver Integration:
Are there specific settings or steps in the TI SDK that ensure compatibility between the driver and the kernel during development?

Debugging Further:
Are there other tools or logs I can check to better understand this issue or identify other potential problems?

I would appreciate detailed instructions to resolve this issue. Thank you in advance for your support!

Best regards,
Vaishnavi

root@am62xx-evm:~#
root@am62xx-evm:~# modinfo /usr/lib/modules/6.6.32-ti-g6de6e418c80e-dirty/kernel/drivers/iio/adc/ad9361_drv.ko
filename:       /usr/lib/modules/6.6.32-ti-g6de6e418c80e-dirty/kernel/drivers/iio/adc/ad9361_drv.ko
license:        GPL v2
description:    Analog Devices AD9361 ADC
author:         Michael Hennerich <michael.hennerich@analog.com>
alias:          spi:ad9363a
alias:          spi:ad9361-2x
alias:          spi:ad9364
alias:          spi:ad9361
depends:
intree:         Y
name:           ad9361_drv
vermagic:       6.6.32 SMP preempt mod_unload aarch64
root@am62xx-evm:~# dmesg | grep ad9361
[  552.798171] ad9361_drv: version magic '6.6.32 SMP preempt mod_unload aarch64' should be '6.6.32-ti-g6de6e418c80e-dirty SMP preempt mod_unload aarch64'
[  966.385706] ad9361_drv: version magic '6.6.32 SMP preempt mod_unload aarch64' should be '6.6.32-ti-g6de6e418c80e-dirty SMP preempt mod_unload aarch64'
[ 1067.917523] ad9361_drv: version magic '6.6.32 SMP preempt mod_unload aarch64' should be '6.6.32-ti-g6de6e418c80e-dirty SMP preempt mod_unload aarch64'
[ 1187.477387] ad9361_drv: version magic '6.6.32 SMP preempt mod_unload aarch64' should be '6.6.32-ti-g6de6e418c80e-dirty SMP preempt mod_unload aarch64'
[ 1798.451914] ad9361_drv: version magic '6.6.32 SMP preempt mod_unload aarch64' should be '6.6.32-ti-g6de6e418c80e-dirty SMP preempt mod_unload aarch64'
[ 1892.803525] ad9361_drv: version magic '6.6.32 SMP preempt mod_unload aarch64' should be '6.6.32-ti-g6de6e418c80e-dirty SMP preempt mod_unload aarch64'
root@am62xx-evm:~#
root@am62xx-evm:~#
root@am62xx-evm:~# sudo modprobe ad9361_drv
modprobe: FATAL: Module ad9361_drv not found in directory /lib/modules/6.6.32-ti-g6de6e418c80e-dirty



Setup Details
Host System Details:

OS: Ubuntu 22.04
Kernel Version: 6.8.0-49-generic
SDK: AM62x latest SDK (TI Linux Kernel 6.6.32 branch)
Target Board Details:

Board: AM62x E3 Evaluation Board
#uname -r
Kernel Version on Board: 6.6.32-ti-g6de6e418c80e-dirty

Setup Details
Host System Details:

OS: Ubuntu 22.04
Kernel Version: 6.8.0-49-generic
SDK: AM62x latest SDK (TI Linux Kernel 6.6.32 branch)
Target Board Details:

Board: AM62x E3 Evaluation Board
Kernel Version on Board: 6.6.32-ti-g6de6e418c80e-dirty

  • Hi,

    To make the off-tree kernel driver having the same vermagic as the running kernel on the target, here is the general guideline:

    1. rebuild the kernel and its in-tree modules;

    2. build the off-tree kernel driver against the kernel build in step 1;

    3. install the kernel Image and in-tree modules built in step 1 to the target;

    4. install the off-tree kernel driver built in step 2 to the target.

    Now the kernel and off-tree driver are all from the same build, the vermagic will match.

    In the Processor SDK top directory, using command "make linux" to do step 1.

    In the Processor SDK, refer to the makefile <SDK>/makerules/Makefile_cryptodev to understand how to do step 2 with command "make cryptodev".

  • HI

          Thank you for your support. Can you give detail information about this,I didn't able to solve the issues.

  • I already provided all the details in my previous post. What else do you need?