Skip to content

mksenaofw: warn instead of erroring on plain type-0 images - #76

Open
mishahawthorn wants to merge 1 commit into
openwrt:masterfrom
mishahawthorn:mksenaofw-plain-type0
Open

mksenaofw: warn instead of erroring on plain type-0 images#76
mishahawthorn wants to merge 1 commit into
openwrt:masterfrom
mishahawthorn:mksenaofw-plain-type0

Conversation

@mishahawthorn

@mishahawthorn mishahawthorn commented Aug 24, 2026

Copy link
Copy Markdown

firmware_type 0 ("combo") is currently a fatal error unless a capwap header is supplied. Some rebranded Senao devices ship a plain type-0 header with no capwap section; notably the Netgear WAX214 and WAX218 (vendor_id 0x231), whose stock web-UI updater accepts the bare 0x60 img_header + magic-XOR'd payload.

This downgrades that case to a non-fatal warning. Capwap encodes always set a datecode (-c), so it only affects a type-0 encode with no capwap arguments; encode_image() already omits the capwap section and computes the checksum over the 0x60 header alone when no capwap header is supplied, so a plain image is produced correctly.

Used by a new qualcommax/ipq60xx web-UI factory image for the WAX214 (openwrt/openwrt#24895).

Testing: compiles; mksenaofw -r 0x231 -p 0x11d -t 0 -v 9.9.9.9 -e fit -o out prints the warning, exits 0, and reproduces a genuine stock WAX214 header field-for-field with a byte-identical XOR payload (only the uninitialised pad and the non-gated chksum differ).

https://forum.openwrt.org/t/wax214-v1-no-serial-openwrt-install-via-the-stock-web-ui-working/252965

firmware_type 0 ("combo") is currently a fatal error unless a capwap header is
supplied. Some rebranded Senao devices ship a plain type-0 header with no
capwap section -- notably the Netgear WAX214 and WAX218 (vendor_id 0x231),
whose stock web-UI updater accepts the bare 0x60 img_header + magic-XOR'd
payload.

Downgrade that case to a non-fatal warning. Capwap encodes always set a
datecode (-c), so this only affects a type-0 encode with no capwap arguments;
encode_image() already omits the capwap section and computes the checksum over
the 0x60 header alone when no capwap header is supplied, so a plain image is
produced correctly.

Signed-off-by: Misha Hawthorn <inbox@heymisha.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant