Kernel mismatch

on compiling ar71xx images on snapshot
final image has kernel ver 4.9.70 (uname -r) and module are compiled for kernel 4.4.108.
The Modules (/lib/modules/) not loaded because of kernel mismatch.

Tried Changing kernel version in target/linux/ar71xx but still issue persist.

You are somehow mixing things up. Modules will get compiled with the same kernel version as the main kernel..

You need like!y do a make clean before recompiling.

And you should not try changing the kernel version manually unless you really understand the build system dynamics.

even fresh build is giving issue default kernel is always 4.9.70 even if 4.4.108 is selected

But clean install also compile with 4.9.70

The issue only occur when ath10k firmware is selected along with kmod-ath10k

after selection of ath10k firmware the kernel version is overwritten in final image.

It sounds like you are doing something major wrong, or you are trying to do something unsupported.

Some facts for you:

  • to my knowledge there is just one place where you select the kernel version (in the target Makefile). That will get applied to both the kernel and packages that will be compiled.
  • You can only install kmods to a firmware that was compiled at the same compilation run as the kmod itself. This is due to kmod package dependency checks based on the kernel version, exact kernel options, all kmod selections etc. (It is not quite so strict, but for most users that is an useful generalisation.)
  • after trying to change the kernel version selection, you need to do "make clean" before further compilation. And you also should run either "make defconfig" or "make menuconfig" to reflect the kernel version change in your .config. (safest/easiest might be to delete the whole .config and just reconfigure it from scratch)

As you seem to run into 4.4 vs. 4.9 mismatch, you are likely trying to broke one of those rules above.

Possibly you are trying to compile just the kmod separately and to install that into an existing firmware compiled earlier. That will not work. (e.g. installing a self-compiled kmod into an existing buildbot snapshot firmware)

As you need to have the kmod source code in the same build system where you compile the kernel & firmware, everything should happen automatically.

Can you explain what you are trying to accomplish (install which kmod into which firmware), and which changes you have done to the source code?

Thanks for the support
Was finally able to pin point the issue, it was because of my hardware ubiquity ac lr.
its having split partition and firmware need to be written on both the partition to fix or else kernel mismatch occurs.
So to downgrade kernel we need to restore stock firmware and write lede/openwrt on both the partitions.

Strange problem. I haven't heard about that kind of problem earlier. There are dual partition devices, but usually they cleanly use one partition at a time.

Sounds almost like support for the device in incomplete if it uses binary from the other partition. Or the the partition layout/usage is really peculiar.

Found Similar Issues

i guess unifi-ac is still not fully supported by sysupgrade.