How to build image w/o iwinfo for switches w/o wifi hw?

So, I'm trying to build a recent master snapshot for a Zyxel GS1900-10HP Rev B1 POE switch running a RTL83XX soc.
In an effort to make the firmware small enough to fit with my additions, I'm trying to remove iwinfo and related packages, which are unneeded on a switch.

Building with verbose log I see

Collected errors:
 * pkg_hash_check_unresolved: cannot find dependency libiwinfo20230701 for luci-mod-dashboard
 * pkg_hash_check_unresolved: cannot find dependency rpcd-mod-iwinfo for luci-mod-network
 * pkg_hash_check_unresolved: cannot find dependency libiwinfo20230701 for luci-mod-status
 * pkg_hash_check_unresolved: cannot find dependency rpcd-mod-iwinfo for luci-mod-status

This looks like any device building with an even barebones set of Luci pages will pull in iwinfo and other wireless related packages, even on devices without wireless hardware.

If my reasoning is correct, could we make these iwinfo related packages dependent on something else?

Looking through grep -i luci openwrt/.config |less I realize, there may not be any good candidates. I had hoped for a luci-proto-wireless package, that contains the wifi configurations pages, but that does not exist.

Alternatively, can I "demote" the above error to warning, or override it, so that the firmware assembly continues in spite of missing dependencies? (I have U-Boot access via UART)

Never tried this but have you tried:
https://openwrt.org/docs/guide-user/luci/luci.essentials

I.e. the basics for luci and not just the luci "collection" ?

Basic

    liblua
    libubus
    libubus-lua
    libuci-lua
    lua
    luci-base
    luci-lib-ip
    luci-lib-jsonc
    luci-lib-nixio
    luci-mod-admin-full
    luci-theme-bootstrap
    rpcd
    uhttpd

Extended

    luci
    luci-app-firewall
    luci-app-opkg
    luci-proto-ipv6
    luci-proto-ppp

I already removed the packages referenced in the error above, my diffconfig contains now only these Luci-related items:

CONFIG_LUCI_SRCDIET=y
CONFIG_PACKAGE_liblucihttp=y
CONFIG_PACKAGE_liblucihttp-lua=y
CONFIG_PACKAGE_liblucihttp-ucode=y
CONFIG_PACKAGE_luci-app-lldpd=y
CONFIG_PACKAGE_luci-base=y
CONFIG_PACKAGE_luci-lib-base=y
CONFIG_PACKAGE_luci-lib-ip=y
CONFIG_PACKAGE_luci-lib-json=y
CONFIG_PACKAGE_luci-lib-jsonc=y
CONFIG_PACKAGE_luci-lib-nixio=y
CONFIG_PACKAGE_luci-lua-runtime=y
CONFIG_PACKAGE_luci-mod-rpc=y
CONFIG_PACKAGE_luci-mod-system=y
CONFIG_PACKAGE_luci-proto-bonding=y
CONFIG_PACKAGE_rpcd-mod-luci=y

I think, this got rid of iwinfo related packages, but my Firmware is still to big.

But I realized, my issue lies elsewhere:
Basically identical RTL8380 devices from Netgear and HPE in my collection get a FW size a full MegaByte smaller from the same config. Upon checking the recipes, it would seem, that only switches from Netgear and HPE use better than GZIP compression, and this is especially bad for Zyxel GS1900 devices, which use an A/B boot scheme, and thus only have 8MiB available for the FW.

I will post in another thread about the above, but (IMHO) my original point for this thread still stands:

Shouldn't packages like libiwinfo, and rpcd-mod-iwinfo depend on something more wireless-related than luci-mod-{dashboard|network|status}, so that devices without Wifi HW don't pull in unneeded bloat through unoptimized dependencies?

1 Like

I've got nothing other than reading the packages themselves and doing the work to split these out..... Sounds reasonable for "someone" to do if there's no other way to shrink to get your target to work =P