Adding additional packages after self compile

Hey, so I needed a newer kernel (6.1) and some mhi driver patching so I've created a custom build with testing kernel from the master branch.

All good.

Now I want to two additional kmod packages: kmod-usb-net-rndis and kmod-usb-net-ipheth
Went into menuconfig, selected those, and issued make -j$(nproc) defconfig download world

All seems to be fine, packages are available at:

./bin/targets/x86/generic/packages/kmod-usb-net-ipheth_6.1.62-1_i386_pentium4.ipk
./bin/targets/x86/generic/packages/kmod-usb-net-rndis_6.1.62-1_i386_pentium4.ipk

copied those via scp and tried installing:

oot@OpenWrt:~# opkg install  kmod-usb-net-rndis_6.1.62-1_i386_pentium4.ipk
Unknown package 'kmod-usb-net-rndis'.
Collected errors:
 * pkg_hash_check_unresolved: cannot find dependency kernel (= 5.15.139-1-68cc65e31e6df10756d56c5f0fe46de9) for kmod-mii
 * pkg_hash_check_unresolved: cannot find dependency kernel (= 5.15.139-1-68cc65e31e6df10756d56c5f0fe46de9) for kmod-nls-base
 * pkg_hash_check_unresolved: cannot find dependency kernel (= 5.15.139-1-68cc65e31e6df10756d56c5f0fe46de9) for kmod-usb-core
 * pkg_hash_check_unresolved: cannot find dependency kernel (= 5.15.139-1-68cc65e31e6df10756d56c5f0fe46de9) for kmod-usb-net
 * pkg_hash_check_unresolved: cannot find dependency kernel (= 5.15.139-1-68cc65e31e6df10756d56c5f0fe46de9) for kmod-usb-net-cdc-ether
 * pkg_hash_check_unresolved: cannot find dependency kernel (= 6.1.62-1-49adc1e04208a792d795b05e9719b161) for kmod-usb-net-rndis
 * pkg_hash_fetch_best_installation_candidate: Packages for kmod-usb-net-rndis found, but incompatible with the architectures configured
 * opkg_install_cmd: Cannot install package kmod-usb-net-rndis.

All those other packages seem to exist:

root@OpenWrt:~# opkg list-installed | grep "mii\|nls-base\|usb-core\|usb-net"
kmod-mii - 6.1.62-1
kmod-nls-base - 6.1.62-1
kmod-usb-core - 6.1.62-1
kmod-usb-net - 6.1.62-1
kmod-usb-net-cdc-ether - 6.1.62-1
kmod-usb-net-cdc-mbim - 6.1.62-1
kmod-usb-net-cdc-ncm - 6.1.62-1
kmod-usb-net-qmi-wwan - 6.1.62-1

This does not seem to mention any additional steps https://openwrt.org/faq/cannot_satisfy_dependencies#i_m_using_a_self-compiled_image

What am I missing? I somehow don't want to reflash the whole image

meska,

Not always is your approach working, especially if packages need some other (dependencies) to work. Packages compiled later, could also be having other (versions of) dependencies in it, not working with the current running OpenWrt version.
It also depends on kernel and other dependencies within OpenWrt and the new compiled packages.

If you build OpenWrt with kernel 5.15.139 you can NOT (always) install packages build with another kernel version.
But even if you keep the kernel the same version, updates in './scripts/feeds update -a' and './scripts/feeds install -a' will/could have different dependencies and will therefore not work on 'older' OpenWrt versions, although the kernel is the same! (Mind that this is likely to fail for kernel related packages (kmods).)

You already answered your own question with the link: https://openwrt.org/faq/cannot_satisfy_dependencies#i_m_using_a_self-compiled_image
If you build an OpenWrt version and you want to install packages later, the best way is to build those with the 'M'odule in the original build.

I also had some issues with packages updates after an OpenWrt build.
The best answer is Solution #5: Do not install packages after flashing, but include them in your image.

You write: 'I somehow don't want to reflash the whole image'
Why don't you want to re-build a newer OpenWrt version? There are fixes made every day and you will miss all those only updating packages.

DG.

1 Like