I tend to compile my own OpenWrt firmware so that I can package the apps I want. When compiling I always use the latest stable builds rather than the bleeding edge nightly builds so that I can almost guarantee 100% stability. Once I've pulled OpenWrt from GitHub I use the following commands to see the versions available
git tag
git branch
and then use git checkout v19.07.1 to select the desired OpenWrt version.
Once I have finished compiling and I have flashed the firmware to the router everything works as expected.
On the rare occasions I want to install an app I didn't initially bake into the firmware, I use the OPKG LuCI app to install any new apps. The problem I'm facing more and more often with my own compiled firmware is, I'm getting the Kernel version incompatible message when I try to install an app. For example I'm trying to install the luci-app-nft-qos and get this
The installed version of package kernel is not compatible, require 4.14.167-1-a92a3f5c… while 4.14.167-1-da4f6ade… is installed.
Looking at those numbers above that almost identical except for the last section which i assume is the GitHub commits.
There is a strict checksum login of kernel options/selections at the compilation time for kernel related packages, which practically require you to compile the kmods at the same time as the firmware.
If you know that you have not changed kernel options, and that the selection of the new module does not change the compilation of other included modules, you can try overriding the opkg check with --force-depends option. Hopefully the router does not brick...
No, it's not the commit identifier; it's a hash of the options used to compile the kernel. You will not have this issue if you compile your kernels using exactly the same parameters as the releases.
How do I set the same parameters as the releases please? My compiled firmwares are aimed at being exactly the same as the stable releases except for the packages I pack into them.
Your best approach is to build a new firmware with the needed kernel packages included. You are in any case building firmware by yourself, so that is the easiest thing.
Make menuconfig does not hurt if you do not touch any kernel related packages (no kmod may change from "m" to "y", or from "n" to any...)
You ca try to mimic the command that calculates "vermagic":
But as that is run after the kernel prepare/setup/configure step during the build, you can't really see that from menuconfig, or just by running menuconfig.
all the details are above. ...the whole source code related to the issue...
It is a hash of all kernel config & options at the compilation time. Calculated automatically during the firmware build.
In practice it forces you to compile all requested kernel related packages at the same time as the kernel itself. If you add later a package to the config, the checksum changes. You can't prevent that.
Note that you might succeed if you compiled the SDK at the same time as the firmware and later use that SDK to compile the new module for the firmware.