efahl
December 13, 2025, 11:48pm
487
And then if you really want to use a package manager, you could repackage the contents as apks, but that requires the build host version of apk (the device version, as I mention a few posts above, has the mkpkg applet left out, as that seemed very unlikely to be used on-device).
Looking at how buildroot uses apk mkpkg is a good starting point to see how that would be done:
rm -rf $$(IDIR_$(1))/CONTROL/conffiles; \
fi
if [ -z "$$$$(ls -A $$(IDIR_$(1))/CONTROL 2>/dev/null)" ]; then \
rm -rf $$(IDIR_$(1))/CONTROL; \
else \
echo "CONTROL directory $$(IDIR_$(1))/CONTROL is not empty! This is not right and should be checked!" >&2; \
exit 1; \
fi
$(FAKEROOT) $(STAGING_DIR_HOST)/bin/apk mkpkg \
--info "name:$(1)$$(ABIV_$(1))" \
--info "version:$(VERSION)" \
$$(if $$(ABIV_$(1)),--info "tags:openwrt:abiversion=$$(ABIV_$(1))") \
--info "description:$$(call description_escape,$$(strip $$(Package/$(1)/description)))" \
$(if $(findstring all,$(PKGARCH)),--info "arch:noarch",--info "arch:$(PKGARCH)") \
--info "license:$(LICENSE)" \
--info "origin:$(SOURCE)" \
--info "url:$(URL)" \
--info "maintainer:$(MAINTAINER)" \
--info "provides:$$(foreach prov,\
EDIT
Hmm, maybe we should have apk-full-* packages, like vim-full and dnsmasq-full...
4 Likes
slh
December 14, 2025, 12:09am
488
8/64, yes, for now - 4/32, no, that time has passed over half a decade ago.
Removing luci and package manager won't make it fit into 4 MB flash, not that the system would still boot with 32 MB RAM anyways. That easy (plus some less easy ones) way out ceased to work in late 2019/ early 2020 - with both limits becoming a hard problem. See Can't connect to router page - #17 by slh .
antonk
December 16, 2025, 7:00pm
489
Super useful info. This should be prominently featured in every wiki page for devices which have 8MiB flash.
efahl
December 16, 2025, 8:06pm
490
5 Likes
@efahl
apk bug or firmware selector bug?
I just used the Firmware Selector to make a custom build for a gl-b1300 (ath10k).
A snapshot build today, 2025-12-26
Part of the customisation is to change from -ct drivers to non-ct.
I expect to end up with ath10k-board, ath10k-firmware and kmod-ath10k installed
But instead I get:
root@OpenWrt:~# apk -I list | grep "ath10k"
ath10k-board-qca4019-20251125-r1 arm_cortex-a7_neon-vfpv4 {feeds/base/firmware/linux-firmware} () [installed]
ath10k-firmware-qca4019-20251125-r1 arm_cortex-a7_neon-vfpv4 {feeds/base/firmware/linux-firmware} () [installed]
kmod-ath10k-ct-6.12.62.2025.12.01~bb84e159-r1 arm_cortex-a7_neon-vfpv4 {feeds/base/kernel/ath10k-ct} (GPLv2) [installed]
root@OpenWrt:~#
I see kmod-ath10k exists in the feeds...
Could this be a problem with apk?
This is the first time I have tried this for an ath10k device since apk was introduced last year.
EDIT : I think defo. a bug:
root@OpenWrt:~# apk -I list | grep "ath10k"
ath10k-board-qca4019-20251125-r1 arm_cortex-a7_neon-vfpv4 {feeds/base/firmware/linux-firmware} () [installed]
ath10k-firmware-qca4019-20251125-r1 arm_cortex-a7_neon-vfpv4 {feeds/base/firmware/linux-firmware} () [installed]
kmod-ath10k-ct-6.12.62.2025.12.01~bb84e159-r1 arm_cortex-a7_neon-vfpv4 {feeds/base/kernel/ath10k-ct} (GPLv2) [installed]
root@OpenWrt:~#
root@OpenWrt:~#
root@OpenWrt:~# apk del kmod-ath10k
( 1/25) Purging kmod-ath10k-ct (6.12.62.2025.12.01~bb84e159-r1)
Executing kmod-ath10k-ct-6.12.62.2025.12.01~bb84e159-r1.pre-deinstall
( 2/25) Purging kmod-ath (6.12.62.6.18-r1)
Executing kmod-ath-6.12.62.6.18-r1.pre-deinstall
( 3/25) Purging kmod-hwmon-core (6.12.62-r1)
Executing kmod-hwmon-core-6.12.62-r1.pre-deinstall
( 4/25) Purging kmod-i2c-core (6.12.62-r1)
Executing kmod-i2c-core-6.12.62-r1.pre-deinstall
( 5/25) Purging kmod-mac80211 (6.12.62.6.18-r1)
Executing kmod-mac80211-6.12.62.6.18-r1.pre-deinstall
( 6/25) Purging kmod-cfg80211 (6.12.62.6.18-r1)
Executing kmod-cfg80211-6.12.62.6.18-r1.pre-deinstall
( 7/25) Purging wifi-scripts (1.0-r1)
Executing wifi-scripts-1.0-r1.pre-deinstall
( 8/25) Purging ucode-mod-digest (2025.12.01~f7c2b97a-r1)
Executing ucode-mod-digest-2025.12.01~f7c2b97a-r1.pre-deinstall
( 9/25) Purging wireless-regdb (2025.10.07-r1)
Executing wireless-regdb-2025.10.07-r1.pre-deinstall
(10/25) Purging kmod-crypto-ccm (6.12.62-r1)
Executing kmod-crypto-ccm-6.12.62-r1.pre-deinstall
(11/25) Purging kmod-crypto-cmac (6.12.62-r1)
Executing kmod-crypto-cmac-6.12.62-r1.pre-deinstall
(12/25) Purging kmod-crypto-gcm (6.12.62-r1)
Executing kmod-crypto-gcm-6.12.62-r1.pre-deinstall
(13/25) Purging kmod-crypto-ctr (6.12.62-r1)
Executing kmod-crypto-ctr-6.12.62-r1.pre-deinstall
(14/25) Purging kmod-crypto-seqiv (6.12.62-r1)
Executing kmod-crypto-seqiv-6.12.62-r1.pre-deinstall
(15/25) Purging kmod-crypto-geniv (6.12.62-r1)
Executing kmod-crypto-geniv-6.12.62-r1.pre-deinstall
(16/25) Purging kmod-crypto-rng (6.12.62-r1)
Executing kmod-crypto-rng-6.12.62-r1.pre-deinstall
(17/25) Purging kmod-crypto-hmac (6.12.62-r1)
Executing kmod-crypto-hmac-6.12.62-r1.pre-deinstall
(18/25) Purging kmod-crypto-manager (6.12.62-r1)
Executing kmod-crypto-manager-6.12.62-r1.pre-deinstall
(19/25) Purging kmod-crypto-aead (6.12.62-r1)
Executing kmod-crypto-aead-6.12.62-r1.pre-deinstall
(20/25) Purging kmod-crypto-sha3 (6.12.62-r1)
Executing kmod-crypto-sha3-6.12.62-r1.pre-deinstall
(21/25) Purging kmod-crypto-sha512 (6.12.62-r1)
Executing kmod-crypto-sha512-6.12.62-r1.pre-deinstall
(22/25) Purging kmod-crypto-ghash (6.12.62-r1)
Executing kmod-crypto-ghash-6.12.62-r1.pre-deinstall
(23/25) Purging kmod-crypto-gf128 (6.12.62-r1)
Executing kmod-crypto-gf128-6.12.62-r1.pre-deinstall
(24/25) Purging kmod-crypto-null (6.12.62-r1)
Executing kmod-crypto-null-6.12.62-r1.pre-deinstall
(25/25) Purging iw-full (6.17-r1)
Executing iw-full-6.17-r1.pre-deinstall
OK: 14.9 MiB in 143 packages
root@OpenWrt:~# apk add kmod-ath10k
( 1/25) Installing iw-full (6.17-r1)
Executing iw-full-6.17-r1.post-install
( 2/25) Installing ucode-mod-digest (2025.12.01~f7c2b97a-r1)
Executing ucode-mod-digest-2025.12.01~f7c2b97a-r1.post-install
( 3/25) Installing wifi-scripts (1.0-r1)
Executing wifi-scripts-1.0-r1.post-install
( 4/25) Installing wireless-regdb (2025.10.07-r1)
Executing wireless-regdb-2025.10.07-r1.post-install
( 5/25) Installing kmod-cfg80211 (6.12.62.6.18-r1)
Executing kmod-cfg80211-6.12.62.6.18-r1.post-install
( 6/25) Installing kmod-crypto-null (6.12.62-r1)
Executing kmod-crypto-null-6.12.62-r1.post-install
( 7/25) Installing kmod-crypto-aead (6.12.62-r1)
Executing kmod-crypto-aead-6.12.62-r1.post-install
( 8/25) Installing kmod-crypto-manager (6.12.62-r1)
Executing kmod-crypto-manager-6.12.62-r1.post-install
( 9/25) Installing kmod-crypto-hmac (6.12.62-r1)
Executing kmod-crypto-hmac-6.12.62-r1.post-install
(10/25) Installing kmod-crypto-sha3 (6.12.62-r1)
Executing kmod-crypto-sha3-6.12.62-r1.post-install
(11/25) Installing kmod-crypto-sha512 (6.12.62-r1)
Executing kmod-crypto-sha512-6.12.62-r1.post-install
(12/25) Installing kmod-crypto-rng (6.12.62-r1)
Executing kmod-crypto-rng-6.12.62-r1.post-install
(13/25) Installing kmod-crypto-geniv (6.12.62-r1)
Executing kmod-crypto-geniv-6.12.62-r1.post-install
(14/25) Installing kmod-crypto-seqiv (6.12.62-r1)
Executing kmod-crypto-seqiv-6.12.62-r1.post-install
(15/25) Installing kmod-crypto-ctr (6.12.62-r1)
Executing kmod-crypto-ctr-6.12.62-r1.post-install
(16/25) Installing kmod-crypto-ccm (6.12.62-r1)
Executing kmod-crypto-ccm-6.12.62-r1.post-install
(17/25) Installing kmod-crypto-cmac (6.12.62-r1)
Executing kmod-crypto-cmac-6.12.62-r1.post-install
(18/25) Installing kmod-crypto-gf128 (6.12.62-r1)
Executing kmod-crypto-gf128-6.12.62-r1.post-install
(19/25) Installing kmod-crypto-ghash (6.12.62-r1)
Executing kmod-crypto-ghash-6.12.62-r1.post-install
(20/25) Installing kmod-crypto-gcm (6.12.62-r1)
Executing kmod-crypto-gcm-6.12.62-r1.post-install
(21/25) Installing kmod-mac80211 (6.12.62.6.18-r1)
Executing kmod-mac80211-6.12.62.6.18-r1.post-install
(22/25) Installing kmod-ath (6.12.62.6.18-r1)
Executing kmod-ath-6.12.62.6.18-r1.post-install
(23/25) Installing kmod-i2c-core (6.12.62-r1)
Executing kmod-i2c-core-6.12.62-r1.post-install
(24/25) Installing kmod-hwmon-core (6.12.62-r1)
Executing kmod-hwmon-core-6.12.62-r1.post-install
(25/25) Installing kmod-ath10k-ct (6.12.62.2025.12.01~bb84e159-r1)
Executing kmod-ath10k-ct-6.12.62.2025.12.01~bb84e159-r1.post-install
OK: 17.2 MiB in 168 packages
root@OpenWrt:~#
As you can see above, I removed kmod-ath10k and re-added it. No mention of "ct", but I end up with the ct version reinstalled. I guess this is similar to what happens in the firmware selector.
EDIT2 for completness:
root@OpenWrt:~# apk del kmod-ath10k-ct
World updated, but the following packages are not removed due to:
kmod-ath10k-ct: kmod-ath10k
OK: 17.2 MiB in 168 packages
root@OpenWrt:~#
efahl
December 26, 2025, 4:44pm
492
That's a packaging bug due to ongoing work on snapshot. My example that's similar to yours does this:
apk add kmod-r8169
... installs kmod-r8127
Still trying to figure out what the magic incantation in the package definitions is that causes this... https://github.com/openwrt/openwrt/issues/21257#issuecomment-3691917881
1 Like
efahl
February 5, 2026, 6:17pm
493
@tofurky has identified the root cause of the various "ADB x error" issues that are seen sporadically across platforms and hosts (including the buildbots, imagebuilder, ASU and on-device). Turns out to be two bugs in apk 3.0:
First one has a fix in upstream, and has been backported, so will be available probably tomorrow in snapshot and 25.12-snapshot, and in the next 25.12.0-rc (it will be in apk 3.0.2-r3 or newer).
main ← tofurky:apk_invalid_timestamps
opened 05:17AM - 05 Feb 26 UTC
Uninitialized memory led to bogus, huge timestamps being set on files downloaded… with the wget backend. This caused odd issues like 'ls -l' crashing busybox when attempting to list the .apk file afterwards.
Link: https://gitlab.alpinelinux.org/alpine/apk-tools/-/commit/42f159e67bafe1dad16839c0c0a005b5e89487ba
The second issue deals with byte/word alignment during parsing of file streams and a solution is in process. Lots of details in this github issue, including links to the upstream MR. And for those with the affected platforms, @tofurky gives a workaround in the linked comment:
opened 05:32AM - 28 Dec 25 UTC
target/kirkwood
bug
Official Image
Supported Device
release/25.12
### Describe the bug
Flashing a clean image with the default configuration work… s well. However, performing 'apk add bash' or similar results in a segmentation fault during installation of dependencies. Consequently, 'apk upgrade' also results in a seg fault, breaking system packages. This issue seems to affect this target only, persisting since early APK snapshots.
### OpenWrt version
r32353-9e9b05130c
### OpenWrt release
25.12.0-rc1
### OpenWrt target/subtarget
kirkwood/generic
### Device
D-Link DNS-320L
### Image kind
Official downloaded image
### Steps to reproduce
1. Flash the 25.12.0-rc1 sysupgrade image from 24.10.4 (or 5) stable, reset all configuration.
2. Perform basic manual configuration, and access the system using SSH.
3. Try installing a package using 'apk update' and 'apk add bash'. (some packages work...)
4. `Segmentation Fault`
### Actual behaviour
Installing a single-dependency package seems to succeed:
```
root@bigbox:~# apk add shadow-useradd
(1/2) Installing shadow-common (4.8.1-r3)
Executing shadow-common-4.8.1-r3.post-install
(2/2) Installing shadow-useradd (4.8.1-r3)
Executing shadow-useradd-4.8.1-r3.post-install
OK: 9292 KiB in 130 packages
```
However, more than one dependency results in a segmentation fault:
```
root@bigbox:~# apk add bash
(1/4) Installing terminfo (6.4-r3)
Executing terminfo-6.4-r3.post-install
(2/4) Installing libncurses6 (6.4-r3)
23% ################################################
Segmentation fault
root@bigbox:~# bash
-ash: bash: not found
```
### Expected behaviour
The APK package manager should install dependencies first, followed by the requested package without error.
### Additional info
The system was stable on both v24 and v25, until 'apk upgrade' broke the Busybox shell. (U-Boot recovery needed...)
### Diffconfig
```text
```
### Terms
- [x] I am reporting an issue for OpenWrt, not an unsupported fork.
5 Likes
bosukes
February 6, 2026, 6:33am
494
Why do I have to add outside packages with apk add --allow-untrusted?
Dante
February 6, 2026, 6:44am
495
Because they're unsigned or signed with keys that are not on the keychain.
bosukes
February 6, 2026, 6:58am
496
Yes I know but on opkg you just can install them through web interface. At most it should ask me to install or not maybe?
slh
February 6, 2026, 7:32am
497
apk isn't a new and fancy name for opkg. While it serves a similar purpose, it's its own project, with a different feature set, semantics and syntax. It's actively developed by alpine linux for the modern day, while opkg's development ceased over 15 years ago.
2 Likes
bosukes
February 6, 2026, 7:36am
498
The point is opkg let us install those "unsecure" packages. After confirming.
slh
February 6, 2026, 7:38am
499
So does apk, if you instruct it to.
AFAIR apk file has signature within package itself while ipk (opkg) normally doesn't (it is an option though).
efahl
February 6, 2026, 3:03pm
501
As explained above, you need the keys. To make a foreign feed work seamlessly, you would add both the url and the keys to your device, after which apk add package works the same as upstream OpenWrt feeds.
echo 'https://dev.melmac.net/apk/packages.adb' >> /etc/apk/repositories.d/customfeeds.list
wget https://dev.melmac.net/apk/apk.openwrt.melmac.net.pem -P /etc/apk/keys/
EDIT
Make sure to add the key file to sysupgrade.conf so it's retained across backups (don't add that whole directory, though, or you'll overwrite updates to the OpenWrt keys).
echo '/etc/apk/keys/apk.openwrt.melmac.net.pem' >> /etc/sysupgrade.conf
3 Likes
Feature request: Add package size display like opkg
Dante
February 15, 2026, 10:16am
503
Add it where? apk already has multiple ways to show package size, e.g. via info, query or adbdump.