Kernel Version mismatch on cross-compiling kernel modules (using onion/omega2-source docker)
I'm new here and I'm working on a project using omega2.
I'm trying to build some kernel module (kmod-batman-adv, kmod-i2c-algo-bit, ...) using the cross-compiling docker prepared from onion (https://hub.docker.com/r/onion/omega2-source/). I've followed the tutorial (https://onion.io/2bt-cross-compiling-c-programs-part-1/) and other useful links but the result is that the modules compiled inside the docker are compiled for kernel 4.4.74-1, while the omega 0.2.0 b194 has kernel 4.4.74.
When I try to install the compiled ipk on my omega, this is what I get:
root@Omega-D339:/tmp# opkg install ./kmod-i2c-algo-bit_4.4.74-1_mipsel_24kc.ipk
Installing kmod-i2c-algo-bit (4.4.74-1) to root...
- satisfy_dependencies_for: Cannot satisfy the following dependencies for kmod-i2c-algo-bit:
- kernel (= 4.4.74-1-8274f1be988bfc7fa195bc75194d9e87) *
- opkg_install_cmd: Cannot install package kmod-i2c-algo-bit.
If I run uname -a, what I see is:
root@Omega-D339:/tmp# uname -a
Linux Omega-D339 4.4.74 #0 Tue Jul 31 16:32:08 2018 mips GNU/Linux
So, my question is: How can I cross compile kernel modules for omega2 official firmware?
Thank you for your help,
I've found that the compiling process inside my docker has created a kernel_4.4.74-1-8274f1be988bfc7fa195bc75194d9e87_mipsel_24kc.ipk
So, I installed this package on my onion2, rebooted (no dmesg errors) and now I can correctly install my kernel modules without errors.
The question remain, because I don't want to use a custom kernel. I want to use the official omega2 firmware and then install my kernel module for the official kernel.
How can I obtain this?
It conveniently compiled the
hello-world.kofile and even created an
Unfortunetly, trying to installing that package will give you a kernel mismatch error
because the kernel hashes differ (see this link). Loading the
.kofile directly will still work though.
So, I'm able to compile the kernel modules I need (copying the
/lib/modules/4.4.74/, but the
ipkstill does not match.
Any suggestions to compile
ipkkernel modules for official firmware?