Insmod kernel module with error "disagrees about version of symbol module_layout" for Jetpack 5.0.2

I am using the latest Jetpack 5.0.2 and downloaded the L4T-35.1 kernel source from Then, I could build a custom kernel module from this source. My target AGX Xavier was flashed using pre-built images through the SDK Manager. When I loaded the custom module into this target, it reported this error disagrees about version of symbol module_layout.

I think it might be the mismatch of both kernel configurations. However, I could use the same build procedures in previous Jetpack version 4.4.1 or 4.6.1 and could load the module.

How to fix this if the target is using the pre-built Jetpack 5.0.2 image?

Thank you

Did you set up your custom kernel to start with the same configuration as the running kernel, plus set CONFIG_LOCALVERSION? If not, then you need to start with this, and then add modules. Otherwise either config will mismatch or “uname -r” will mismatch.

Thanks for your advice. CONFIG_LOCALVERSION has been already set before kernel build.

now I can figure out the problem. It is because I used an old toolchain compiler from Jetpack 4.4.1 or 4.6.1, After I used the new ones from Jetpack 5.0.2, it can work.

I haven’t tried old toolchains with 5.0.2, but it does not surprise me old chains fail since it is now a 5.x kernel (it used to be a 4.x kernel).

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.