Repository navigation
xmlflash: tolerate stock DAs without DA.SLA property or ext patch points - #454
Merged
bkerler merged 1 commit intoNov 20, 2026
Merged
Conversation
Stock vendor V6 DAs for MT6880/MT6890 (hwcode 0x992, e.g. Quectel T750 and Fibocom FM360 DA_BR.bin) boot stage 2 fine but: - reply ERR!UNSUPPORTED to CMD:GET-SYS-PROPERTY DA.SLA. send_command() already drains the CMD:END/CMD:START pair and returns False, but get_sys_property() ignored that and waited for another command result, timing out and then crashing in check_sla() with "'bool' object has no attribute 'decode'". Return None on a failed send and treat it as SLA disabled. - have a DA2 the xml extension patcher cannot pattern-match (get_next_bl_from_off(None) -> TypeError). Make a failed patch() non-fatal and continue with the stock DA2 commands instead of aborting. With both, printgpt / rl / ro work on an unfused 0x992 eMMC board.
lukejenkins
force-pushed
the
fix/xml-stock-da-unsupported-sla
branch
from
November 12, 2026 06:09
d6b71e0 to
5c0cc4c
Compare
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.
xmlflash: tolerate stock DAs without DA.SLA property or ext patch points
Fixes the "stage 2 loads fine, then every command hangs/crashes" symptom reported for
MT6880/MT6890 (hwcode 0x992) eMMC boards with stock vendor DAs (#302, #88, see also #445).
Problem
With an unfused 0x992 target (target config 0x0) and a stock V6
DA_BR.binfrom avendor T750 package (tested with a Quectel T750 build
MTK_DA_v6_2023-12-20and aFibocom FM360 build
MTK_DA_v6_2021-05-07), stage 1 and stage 2 upload fine andCMD:NOTIFY-INIT-HWcompletes, but:CMD:GET-SYS-PROPERTYwithDA.SLAis answered withERR!UNSUPPORTED.send_command(..., noack=True)already consumes theCMD:END/CMD:STARTpair for that case and returns
False, butget_sys_property()ignores thereturn value and calls
get_command_result()again, so it waits on an emptypipe, times out (
xread: Wrong length), andcheck_sla()then crashes withAttributeError: 'bool' object has no attribute 'decode'.With that fixed,
xmlft.patch()raisesTypeError: '<' not supported between instances of 'NoneType' and 'int'fromget_next_bl_from_off(), becausefind_register_xml_cmd_func()can't find itspattern in this vendor DA2. This aborts the whole session even though the stock
DA2 is fully usable without the extension.
Change
get_sys_property(): returnNoneifsend_command()didn't returnTrue.check_sla(): treatNone/Falseas "DA XML SLA disabled".upload_da(): wrapself.xmlft.patch(); on exception log it, skip theCUSTOMextension upload (
daextstays False) and continue with stock DA2 commands.Tested
MT6890 (hwcode 0x992, subcode 0x8a00, hwver 0xca01), 16 GB eMMC, preloader mode:
printgpt,rl(all 57 GPT partitions, ~14 MB/s; two passes byte-identical),ro --parttype boot1/boot2. Read-only; no write paths exercised.Not addressed (noted for follow-up)
(
Read length[N] is larger than partition max size[N], it compares againstsize - offset strictly), so
rfandrf --parttype boot1fail;roto size-0x200 works.use legacy numeric partition IDs (
Cannot find [8]/Cannot find [1]); power-cyclingthe target first avoids it.