PineTime SD MCUBoot

From PINE64
Revision as of 16:47, 10 August 2020 by Lupyuen (talk | contribs) (Adding solution)
Jump to navigation Jump to search

The Problem:

- PineTime ships with the MCUBoot Bootloader which boots to the InfiniTime Firmware

- This assumes that the firmware (InfiniTime, Mynewt, Zephyr, ...) has its own Bluetooth LE (BLE) stack and can handle firmware updates (DFU)

- But some firmware (wasp-os, ATCwatch) require Nordic SoftDevice to be installed to support the BLE and DFU functions

- InfiniTime Firmware does not support flashing of SoftDevice as firmware update, because SoftDevice needs to be flashed at address 0x0, which is used by the MCUBoot Bootloader

- How do we allow SoftDevice-based firmware to be flashed to PineTime via DFU?

Preferred Solution:

- We will use DFU to flash a SoftDevice Loader Firmware, which will boot and replace MCUBoot by SoftDevice

- Thereafter, when PineTime boots, it will start SoftDevice and will be ready to accept SoftDevice-based firmware for DFU: wasp-os, ATCWatch

- When we need to switch back to MCUBoot-based firmware (InfiniTime, Mynewt, Zephyr, ...), we will run an MCUBoot Loader to replace SoftDevice by MCUBoot plus a Minimal DFU Firmware that accepts DFU commands

- After rebooting, MCUBoot starts the Minimal DFU Firmware, which will accept MCUBoot-based firmware for flashing

- The MCUBoot-based firmware replaces the Minimal DFU Firmware

- SoftDevice Loader,

Alternative Solution:

- Custom MBR: