mksenaofw: warn instead of erroring on plain type-0 images - #76
Open
mishahawthorn wants to merge 1 commit into
Open
mksenaofw: warn instead of erroring on plain type-0 images#76mishahawthorn wants to merge 1 commit into
mishahawthorn wants to merge 1 commit into
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 outprints the warning, exits 0, and reproduces a genuine stock WAX214 header field-for-field with a byte-identical XOR payload (only the uninitialisedpadand the non-gatedchksumdiffer).https://forum.openwrt.org/t/wax214-v1-no-serial-openwrt-install-via-the-stock-web-ui-working/252965