You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixed:patches-generic/022-kernel_module_packages_include_kernel_checksum_in_version.patch produced kernel-module package versions that apk-tools 3 rejects as invalid. It has been removed — gargoyle #120 — and a regression guard added so it can't silently return.
Thanks to Lantis for flagging this while reviewing the 25.12 fork build ("APK hates non standard package naming. Was something done to fix this?").
The problem
Patch 022 appended -$(LINUX_VERMAGIC) — the kernel vermagic, a hex hash — to every kernel module's VERSION. So a kmod ended up versioned like:
Under opkg this was harmless. Under apk it is not: apk-tools 3 enforces a strict version grammar, and the trailing -<hash> after -rN is not a valid version. On an apk-backed image, every kmod is therefore unaddressable.
Root cause, confirmed on hardware
Tested directly with apk's own validator on a real GL-MT6000 (apk-tools 3.0.5):
# apk version -c '6.12.94-r1-baf9420f9bd78ec51e3c0ae30308d28a'
-> exit 1 (invalid)
# apk version -c '6.12.94-r1'
-> exit 0 (valid)
apk cannot even sort two such versions that differ only by vermagic, so the property patch 022 was trying to provide — "treat a kmod as changed when the kernel changes" — does not actually function under apk anyway.
Why removing it is the correct fix
Patch 022 is Gargoyle-original (carried since the 21.02 era). Stock OpenWrt's kmod VERSION line has no vermagic suffix, so removing the patch simply returns to upstream behaviour — the exact 6.12.x-rN form OpenWrt 25.12's own apk-based kmods use.
The kernel-ABI safety is not provided by the VERSION string. It is provided by the untouched line directly above it:
which pins each kmod to its exact kernel ABI regardless of the version string. That guard is unchanged, so a kmod still cannot install against a mismatched kernel.
Validation
Build: a full x86 build with the patch removed emits clean versions — kmod-*_6.12.94-r1_*.ipk, no hash — and builds successfully.
Regression: full simulator suite 330/335 (baseline; the apk-backend phases pass), so the change breaks nothing functionally — it only relabels version strings, the .ko files are identical.
Guard: a new simulator check (gargoyle-tools #17, T-APKB-12) asserts, using apk's own validator on the target, that every baked-in kmod version is apk-valid. It passed 12/12 with all 207 kmod versions valid. Before the fix, all 207 carry the vermagic suffix and fail — so a reintroduction would turn this red immediately.
This gap was previously invisible because the simulator exercised the apk backend's health but never validated kmod version strings against apk. That is now covered.
Status
Merged and validated. This will be in the next build.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Summary
Fixed:
patches-generic/022-kernel_module_packages_include_kernel_checksum_in_version.patchproduced kernel-module package versions that apk-tools 3 rejects as invalid. It has been removed — gargoyle #120 — and a regression guard added so it can't silently return.Thanks to Lantis for flagging this while reviewing the 25.12 fork build ("APK hates non standard package naming. Was something done to fix this?").
The problem
Patch 022 appended
-$(LINUX_VERMAGIC)— the kernel vermagic, a hex hash — to every kernel module'sVERSION. So a kmod ended up versioned like:Under opkg this was harmless. Under apk it is not: apk-tools 3 enforces a strict version grammar, and the trailing
-<hash>after-rNis not a valid version. On an apk-backed image, every kmod is therefore unaddressable.Root cause, confirmed on hardware
Tested directly with apk's own validator on a real GL-MT6000 (apk-tools 3.0.5):
apk cannot even sort two such versions that differ only by vermagic, so the property patch 022 was trying to provide — "treat a kmod as changed when the kernel changes" — does not actually function under apk anyway.
Why removing it is the correct fix
Patch 022 is Gargoyle-original (carried since the 21.02 era). Stock OpenWrt's kmod
VERSIONline has no vermagic suffix, so removing the patch simply returns to upstream behaviour — the exact6.12.x-rNform OpenWrt 25.12's own apk-based kmods use.The kernel-ABI safety is not provided by the
VERSIONstring. It is provided by the untouched line directly above it:which pins each kmod to its exact kernel ABI regardless of the version string. That guard is unchanged, so a kmod still cannot install against a mismatched kernel.
Validation
kmod-*_6.12.94-r1_*.ipk, no hash — and builds successfully..kofiles are identical.T-APKB-12) asserts, using apk's own validator on the target, that every baked-in kmod version is apk-valid. It passed 12/12 with all 207 kmod versions valid. Before the fix, all 207 carry the vermagic suffix and fail — so a reintroduction would turn this red immediately.This gap was previously invisible because the simulator exercised the apk backend's health but never validated kmod version strings against apk. That is now covered.
Status
Merged and validated. This will be in the next build.
All reactions