Good afternoon, everyone!
I built the simplest module on the vanilla version of linux-5.10.160 with a configuration file for the config kernel-5.10.160-26- rk356x, taken on a running Radxa Zero 3E system.
I’m launching it. The kernel responds with "
12565.102186] hello world_radxa_zero: version magic ‘5.10.69+SMP preempt mod_unload aarch64’ should be ‘5.10.160-26-rk356x SMP mod_unload modversions aarch64’
[[12654.690950] hello world_radxa_zero: disputes about version of symbol module_layout"
I understand that versioning is being violated, but where to get the source code for version 5.10.160-26-rk356x has not been answered for all the time. Is this some kind of big secret?
Help me figure out the situation. Thanks in advance.
Makefile.zip (433 Bytes)
helloworld_radxa_zero.zip (448 Bytes)
For the sake of clarity, I will add that the same pattern is observed when using a kernel assembled according to the instructions
https://wiki.radxa.com/Zero/dev/kernel
linux-5.10.y-radxa-zero
As a result, the question is why write instructions that do not work for the current working system on Radxa Zero 3E?
I’m sorry for being emotional.
Please check this: Error when building the kernel for Radxa Zero 3E using BSP
Thanks, I’m checking.
Yes, it made me laugh a little))) And you?
Are you implying that I have already “solved” this problem? But it seems to me that the files I received in the previous topic are linux-image-5.10.160-26-rk356x_5.10.160-26_arm64.deb
linux-headers-5.10.160-26-rk356x_5.10.160-26_arm64.deb
can only be installed on an already running system. Moreover, installing them does not imply placing the kernel source codes in the system (like the command ‘sudo apt source…’. I need the kernel source codes in the host system for cross-compilation the modules, and not a new kernel in the target system. Please correct me if I’m wrong. Thank you.
Sorry I didn’t realize you were the same author.
Please check this: https://radxa-repo.github.io/bsp/dev_flow.html#prepare-working-tree, with the --no-build option, the .src/linux directory is the kernel source directory.
If you must need sudo apt source ..., I’m sorry we don’t have it, because the kernel deb uses FPM packaging
Thank you. You have nothing to apologize for (rather, I should). I’m checking it out. Then I’ll unsubscribe right away.
Fine. Thanks, everything fell into place!
I recompiled the module again. But the kernel swears again “[ 573.018163] helloworld_radxa_zero: disagrees about version of symbol module_layout”. I don’t understand the reason…
Is the kernel version 26 you’re currently running compiled by you or pre-installed by the image?
the kernel is default, it came with the official image for RadxaZero 3E
I haven’t touched anything on the target system yet.
You can install the kernel headers on your host system:
sudo dpkg --add-architecture arm64
wget https://github.com/radxa-pkg/linux-rk356x/releases/download/5.10.160-26/linux-headers-5.10.160-26-rk356x_5.10.160-26-bfb9351f3_arm64.deb
sudo apt install ./linux-headers-5.10.160-26-rk356x_5.10.160-26-bfb9351f3_arm64.deb
Then modify the directories specified in the Makefile: KERNEL_DIR ?= /usr/src/linux-headers-5.10.160-26-rk356x/
Thank you very much, I’ll write as soon as I check. Thanks!
I am very happy, you solve the problem

