Help compiling OpenWRT image for Raspberry Pi CM4 with extras

Just compiled a fresh image from v23.05.4 for Raspberry Pi CM4 using DfRobot router board, using this guide: How to build a custom OpenWRT image for Raspberry Pi Router

Everything went fine, but after flashing and doing "opkg update" I try to install some packages and get:

satisfy_dependencies_for: Cannot satisfy the following dependencies for dockerd:*
kernel (= 5.15.162-1-ff3c8e5d13ba51d6e12024010af1a071)*
opkg_install_cmd: Cannot install package*

  • Got this error for dockerd, sqm-scripts, etc.
  • But some packages worked fine, like adblock, ddns-scripts, etc.

Saw this post: https://openwrt.org/faq/cannot_satisfy_dependencies
Just to clarify, while doing "make menuconfig" just need to mark the softwares i want with < M > instead of < * > and then try to install then after flashing?
I tried to add docker and sqm-scripts in "make menuconfig" with <*> but got compiling error.

To summarise: my main goal is to make an updated Openwrt image with some extras packages.

  • First attempt: Got compiling error when tried to add some packages with menuconfig.
  • Second attempt: Did a clean install with my compiled image and got wrong kernel version trying to install some software's.

Can anyone help me to understand the deal with kernel version / kernel mismatch?

why not simply add the extra modules they list in the doc, using
https://firmware-selector.openwrt.org/?version=23.05.4&target=bcm27xx%2Fbcm2711&id=rpi-4
click the tiny arrow, add your modules, and request a build.
you can skip luci, it should already be on the default package list.

search the forum for vermagic, if you want to go down this road.

thought this only worked for modules ...

2 Likes

Q: why not simply add the extra modules they list in the doc
A: Really wanted to compile it myself, but seems to be an easier solution if it works. I will give a try. Also, compiling myself give me the opportunity to see all available options through menuconfig.

Q: search the forum for vermagic, if you want to go down this road.
A: Thanks for the info.

Q: thought this only worked for modules
A: you right, just double checked it

DIY also lets you set the root FS size, using the link provided the image will always be ~100MB, and you'll have to resize the FS yourself, afterwards.

1 Like

When requesting new image from the URL you sent, it is possible to add my network and firewall config?

yes, you can set IPs, enable wifi (which is off by default), etc.

https://openwrt.org/docs/guide-developer/uci-defaults

depending on what you want to do, the local image builder might be a better tool for you.

https://openwrt.org/docs/guide-user/additional-software/imagebuilder

Thanks to @frollic i searched about vermagic and understood the mismatch i was receiving from kernel.

Basically, i need some specific kernel modules for my build, so docker, sqm, etc could run.

Just made a list of the kernel modules I needed, add everything in menuconfig and compiled again the openwrt image.

Working fine now.

you'll however run into this issue with every kmod you'll try to install from the official repo, unless you apply the vermagic "hack".
if you create your own image, from source, the kmods have to come from you too.

1 Like

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