Incompatible kernel version after build

Hi, I'm new to OpenWrt and trying to install it on my EA7300. It looks like there is an issue with the kmods in the existing snapshot. The issue was addressed recently but will not be available until a few days.

I decided to compile and build the kernel locally. So I cloned the repo, ran make menuconfig, and set the target system, subtarget, and target profile. I didn't change any other settings.
When I flashed the image, I was able to SSH to the router and had an internet connection, but wasn't able to install LuCI because some requirements were "incompatible with the architecture configured".

I then installed LuCI during build and was able to use it after flashing the image. However, I'm not able to install any other packages now and get a similar error. For example, when I try to install luci-app-sqm, I get the following warning:

The installed version of package kernel is not compatible, require 5.4.75-1-befe4f13… while 5.4.75-1-160a879b… is installed.

If I install anyway, I get the same errors I used to get when trying to install LuCI from the command line:

Collected errors:
 * pkg_hash_fetch_best_installation_candidate: Packages for kmod-sched-core found, but incompatible with the architectures configured
 * pkg_hash_fetch_best_installation_candidate: Packages for kmod-ifb found, but incompatible with the architectures configured
 * pkg_hash_fetch_best_installation_candidate: Packages for kmod-ipt-ipopt found, but incompatible with the architectures configured
 * pkg_hash_fetch_best_installation_candidate: Packages for kmod-ipt-conntrack-extra found, but incompatible with the architectures configured
 * pkg_hash_fetch_best_installation_candidate: Packages for kmod-ipt-raw found, but incompatible with the architectures configured
 * pkg_hash_fetch_best_installation_candidate: Packages for kmod-sched-cake found, but incompatible with the architectures configured
 * opkg_download: Failed to download https://downloads.openwrt.org/snapshots/packages/mipsel_24kc/luci/luci-app-sqm_git-20.317.58722-c20fa83_all.ipk, wget returned 4.
 * opkg_download: Check your network settings and connectivity.

I was wondering if anyone has faced a similar issue before and knows how to solve it.

Thank you.

That is the expected behaviour. Dependencies between kernel and modules are very strict, they don't merely involve the upstream version, but also a hash over the complete kernel configuration - this will differ, unless you replicate the default configuration exactly. While you can do that, doing so would involve building the whole archive and all package feeds (and take ages doing so), a much more sensible option is to just include everything you want to install into your self-built firmware image directly.

4 Likes

Not really, you just need to match the kmods and kernel options selection, e.g.:

curl -o .config \
https://downloads.openwrt.org/releases/19.07.4/targets/x86/64/config.buildinfo
cat << EOF >> .config
CONFIG_PACKAGE_curl=m
...
EOF
1 Like

Correct, but kernel symbols can be selected by seemingly unrelated packages (this is discouraged, due to being rather opaque, but happens for packages in the base repo), even packages from the feeds (this is strongly rejected, but technically possible). You'd need to be rather experienced to rule this out (and/ or invest a lot of trial and error) - and tomorrow's build will be different anyways.

Including all necessary packages into your own build is the recommended and more reliable strategy - unless you know very well what you're doing.

2 Likes

This can become very frustrating when trying to install new packages. You have to run make every time and flash the image.

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