Skip to content

Burn Image: write at the address the menu means, in any language - #86

Merged
gahingwoo merged 1 commit into
mainfrom
fix/burn-address-zh
Nov 10, 2026
Merged

gahingwoo merged 1 commit into
mainfrom
fix/burn-address-zh

Conversation

@gahingwoo

Copy link
Copy Markdown
Owner

Fixes #85.

Bug: in the Chinese UI, Burn Image at "0x0 (完整固件)" ran rkdeveloptool wl 完整固件 <image>, and rkdeveloptool refused it with Begin is invalid, please check!. The reporter ran wl 0x0 <image> by hand and it worked.

Cause: burn_image took the address from the text in parentheses, which suits partition items like boot (0x8000). The full-firmware item is the other way round:

  • Chinese 0x0 (完整固件) matched \((\S+)\), so the address became 完整固件.
  • English 0x0 (Full Firmware) didn't match because of the space, so the whole label was passed. rkdeveloptool happened to read that as 0, which is why it only broke in Chinese.

The parsing dates from 2025-11.

Fix:

  • populate_address_combo gives each item its address as item data: 0x0, a custom-address marker, or the partition's address.
  • burn_image and the custom-address field use that data. No label is parsed any more.
  • The custom address is trimmed.

Test: check_burn_address runs Burn Image in Chinese and English for full firmware, custom (" 0x4000 ") and a partition, and expects 0x0, 0x4000, 0x8000. On the old code it fails with exactly the issue's symptom:

zh: ['完整固件', ' 0x4000 ', '0x8000']
en: ['0x0 (Full Firmware)', ' 0x4000 ', '0x8000']

Burn Image read the address from the menu's label: the text in
parentheses, as in "boot (0x8000)". The full-firmware item is the other
way round, "0x0 (完整固件)" in Chinese, so rkdeveloptool got
"wl 完整固件 <image>" and refused it ("Begin is invalid"). In English
"0x0 (Full Firmware)" didn't match and the whole label went through,
which rkdeveloptool happened to read as 0.

Each menu item now carries its address as item data, and Burn Image and
the custom-address field use that. The custom address is trimmed.

Fixes #85
@gahingwoo
gahingwoo merged commit e621b91 into main Nov 10, 2026
5 checks passed
@gahingwoo
gahingwoo deleted the fix/burn-address-zh branch November 10, 2026 03:43
@gahingwoo gahingwoo mentioned this pull request Nov 10, 2026
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