Skip to content

fix: require Pro bootloader 2.8.0 before MCU updates - #904

Draft
wabicai wants to merge 2 commits into
onekeyfrom
fix/pro-boot-before-mcu
Draft

fix: require Pro bootloader 2.8.0 before MCU updates#904
wabicai wants to merge 2 commits into
onekeyfrom
fix/pro-boot-before-mcu

Conversation

@wabicai

@wabicai wabicai commented Aug 29, 2026

Copy link
Copy Markdown
Member

Summary

Make checkNeedUpdateBootForTouch report shouldUpdate for OneKey Pro whenever the current bootloader is older than 2.8.0, even if firmware is below 4.1.0 or the device is already in bootloader mode.

Intent and context

Installing current Pro MCU packages (4.14.0 / 4.18.0 / 4.21.0 from firmware-v8) on bootloaders older than 2.8.0 fails in load_image_header with Update file header invalid. Boot 2.8.0 expanded the MCU size limit from 3.67MB to 5.5MB. App already updates boot before firmware when checkBootloaderRelease says so; the helper previously required firmware >= 4.1.0 and therefore skipped boot on empty/recovery devices.

Root cause

checkNeedUpdateBootForTouch gated Pro boot updates on firmware >= 4.1.0 (ResourceUpdate availability). That is the wrong predicate for MCU header compatibility. The real line is bootloader < 2.8.0.

Design decisions

  • Keep firmwareUpdateV2 / firmwareUpdateV3 install flows unchanged. Hosts still update boot, then MCU.
  • Pro boot < 2.8.0 always returns shouldUpdate: true.
  • Optional 2.8.0–2.8.3 → 2.8.4 upgrades still use the existing firmware >= 4.1.0 path.
  • Touch is unchanged.
  • Share PRO_MCU_MIN_BOOTLOADER_VERSION (2.8.0) with MIN_UPDATE_V3_BOOTLOADER_VERSION.

Compatibility and risk

  • No public API shape change. checkBootloaderRelease payload is the same; more Pro devices now report shouldUpdate.
  • App startUpdateWorkflow already does boot-then-firmware when bootloader.hasUpgrade is true.
  • Does not auto-install boot inside firmwareUpdateV2.

Hardware coverage

Unit-tested only. Not verified on a physical Pro with boot < 2.8.0.

Test plan

  • yarn --cwd packages/core test --runInBand check-need-update-boot-for-touch
  • yarn agent:check --profile commit
  • Physical Pro, boot 2.7.x, firmware >= 4.1.0: App should still update boot then 4.21.0
  • Physical Pro in bootloader mode with boot 2.7.x: checkBootloaderRelease should report shouldUpdate

@wabicai
wabicai marked this pull request as draft August 30, 2026 07:28
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