Issues installing packages on custom built OpenWrt firmware

Hey there everyone!
So here's the deal.
I'm running 23.05.3 release Owrt.
My kernel - 5.15.150-1-83850846aeb31a278a010941bbebf326
My friend built custom packages for AmneziaWG, and I can't install one of them. Specifically - kmod-amneziawg_v23.05.3_v23.05.3_aarch64_cortex-a53_mediatek_filogic.ipk.
I try to install and get:

Collected errors:
 * pkg_hash_check_unresolved: cannot find dependency kernel (= 5.15.150-1-0603ef37b358fabb1f132a4507e3b82b) for kmod-amneziawg
 * pkg_hash_fetch_best_installation_candidate: Packages for kmod-amneziawg found, but incompatible with the architectures configured
 * opkg_install_cmd: Cannot install package kmod-amneziawg
.

I digged in the ipk and found that in 'control' file:

Package: kmod-amneziawg
Version: 5.15.150-1
Depends: kernel (=5.15.150-1-83850846aeb31a278a010941bbebf326), kmod-udptunnel4, kmod-udptunnel6, kmod-crypto-lib-chacha20poly1305, kmod-crypto-lib-curve25519
Source: feeds/awgopenwrt/kmod-amneziawg
SourceName: kmod-amneziawg
Section: kernel
SourceDateEpoch: 1714310150
Architecture: aarch64_cortex-a53
Installed-Size: 35889
Description:  AmneziaWG VPN Kernel Module

I also asked him which kernel he used to built - and it's same as mine.

Question: Where system get this magic number '0603ef37b358fabb1f132a4507e3b82b' ? How do I install this ipk?

Link to github

Exact version + exact kernel configuration (hash over .config), any config delta affects the kernel ABI.

1 Like

Thanks for your answer!
So, how to solve it here?

Don't use opkg at all, if you build from source, build everything you want to install into the image (especially when it comes to kmods).

2 Likes

I fully agree with @slh.
For some background information:

Sadly, but issue was in opkg cache or something.
Here is extended case:
I tried to install ipk for other kernel (I didn't know that when I tried), and it failed obviously. After that - installation of correct package failed as I said before.
So I've got same kernel dependency error from ipks with different kernel dependecies. Looks like system never bothered to check deps again.
Issue resolved once I've done factory reset and reinstalled everything.