Can't install new packages or upgrade existing packages

When I try to upgrade existing packages or install new packages, I get something similar to this:

opkg install kmod-usb-net-rndis
Unknown package 'kmod-usb-net-rndis'.
Collected errors:
 * pkg_hash_check_unresolved: cannot find dependency kernel (= 5.10.161-1-61a27be69d8fdf73a5b94559a7a5730a) 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.

My OpenWRT kernel is:

root@firewall:/tmp# uname -r
5.10.161

I compiled the image myself, but I don't think I compiled it from a snapshot. I think this is the stable 22.03.3 release.

 OpenWrt 22.03.3, r20028-43d71ad93e

Why can't I install new packages from the repository or upgrade the current packages from the repository?

Thank you.

What is your reasoning for compiling your own firmware? If you're simply trying to create images that have a specific combination of packages (+ some, - others), you can use the image builder and avoid all these hassles.

If you're making more significant changes that actually involve real code changes, this problem related to the fact that the hashes that are used to determine the dependencies and such are no longer the same as would be true from the standard release download.

It depends on your reason for compiling your own images.

My reason is that I want the size of the image to take the entire SD card instead of taking a small portion of the SD. I want to be able to install additional packages and don't want to run out of space.

Where do I start with the imagebuilder? Every time I tried to find a Wiki on it, it doesn't have exact steps how to do this. I started building my own images for the Raspberry Pi 4B 2.5 years ago when there was no stable release supporting it, so I built from a snapshot. Since then, I have been building my own stable images, but I run into these issues with upgrading or installing packages.

I would appreciate being pointed to the right place to start with Imagebuilder.

There are two major ways of handling this... expand the partition (there are many threads on this -- just search the forum), or create a 2nd partition and setup extroot. I'd recommend the former.

So, can you please help me out understand the process besides building my own image (which I have mastered at this point).

  1. If I use the imagebuilder, do I need to specify every single package I want to be built or does it already come preconfigured (similar to the default .config file when building my own image) with some basic packages? If it comes with some basic packages already selected, how do I see that list of packages?

  2. If the answer to #1 is that I have to choose every single package to be included in the image (there is no list of basic packages already set to be built with the imagebuilder), then this is not an option I want to use, as this is going to be a labor-intensive and error-prone process to select every image required for OpenWRT to run on the image to be built with the imagebuilder. Then, I need to go to Option #3.

  3. Download a pre-made image for the latest stable version. Is this the way you would recommend going if I don't like #2? If so, should I then expand the partition once I transfer the image to the SD card?

Thank you,

I'd recommend #3, honestly. But, to answer your question...

No, the core packages are all included by default. If you use the online image builder, it will not include LuCI unless specified. I think that's all that's omitted.

There are manifests available.

This is the easiest method -- install, expand the partition, add your packages.

By the way, the "Cannot satisfy dependencies / kernel is not compatible" article is something I keep coming across when I search for these errors. I actually tried to install a module that I compiled (by selecting "M" in menuconfig after I compiled the image itself without the package a week earlier). I used the same exact toolset that I used to compile the original package, and I still ran into the same exact issue when I tried to install an offline image via Luci (as the SFTP package wasn't built into the image, so I couldn't transfer the offline package to the OpenWRT partition via SCP).

So, I don't think I fundamentally understand why I keep encountering this error. I used to think that this error only occurs when the image is built from a snapshot (as one of the reasons mentioned in the wiki article), so the packages available in the repository a few days after the image has been built are based on a different kernel version. But, this is not the case here, as the original image that was built is the stable Open version (22.03.3).

I'd check the specific thing you downloaded -- you might have grabbed master/snapshot.

How would I know that? The version says:

root@firewall:/tmp# cat /etc/banner
  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 OpenWrt 22.03.3, r20028-43d71ad93e
 -----------------------------------------------------

This is the same exact version that's listed as the latest stable version.

what is the output of

ubus call system board
root@firewall:~# ubus call system board
{
	"kernel": "5.10.161",
	"hostname": "firewall",
	"system": "ARMv8 Processor rev 3",
	"model": "Raspberry Pi 4 Model B Rev 1.2",
	"board_name": "raspberrypi,4-model-b",
	"rootfs_type": "ext4",
	"release": {
		"distribution": "OpenWrt",
		"version": "22.03.3",
		"revision": "r20028-43d71ad93e",
		"target": "bcm27xx/bcm2711",
		"description": "OpenWrt 22.03.3 r20028-43d71ad93e"
	}
}
root@firewall:~# 

Ok... so it looks fine. But, I recommend that you simply download and install the standard release image and then expand it using this tutorial:

I'll try that. But, it would be nicer if I can pre-build my own image so that I can have a backup with all the packages installed on a spare SD card.

Can you point me to a set of directions how to build an image from an imagebuilder available online? I can't find them for the life of me. All I can find is the directions on how to download the toolset for the imagebuilder and build it on my own Linux distro.

Thank you.

You can... in fact, you can pre-load your packages into the image, and then run through the same process to expand the partition.

for building images online, select your device and then click the 'disclosure triangle' next to "Customize installed packages and/or first boot script" and add the additional packages you need (including LuCI, for most users).
https://firmware-selector.openwrt.org

Thank you!