Search | Sailfish OS | Running | PineTime | All Posts

PineTime's InfiniTime: New bootloader, and a recovery firmware!

March 10, 2021 — Nico Cartron

We're barely into March, and there's already some news on the front of InfiniTime!
Nothing really new per se, but when you scratch the surface, you'll see that it's a "building block" for future InfiniTime releases.

Follow me and let's upgrade together!


What do those 2 releases bring?

New Bootloader

As a reminder, the bootloader is responsible to boot the watch, and to load the firmware that is installed on the device (which in our case is InfiniTime, but could be another one, such as Wasp-OS).

This bootloader fixes a few bugs that could cause a PineTime to completely freeze - the only way to go back to normal was to drain the battery. Not really ideal :)
(Note that I never encountered this issue myself, but I've seen it reported on the PineTime Telegram channel a few times).

Recovery Firmware

Allows booting a minimal version of InfiniTime, whose only goal is to allow to OTA an update image, in case of issue on the current firmware.

It is only compatible with the new bootloader, so you'll have to install it once the bootloader has been updated on your PineTime.

Upgrading

Disclaimer

/!\Read the below carefully/!\

Follow the below steps in the exact order they're presented.
You've been warned!

Prerequisites

  • You need to run a recent enough version of InfiniTime (0.14 recommended, as it improves a lot the BLE connectivity - see my previous review)
  • Have a battery charged - ideally place your PineTime on the charging dock
  • I'm stating the obvious but: this procedure only works for InfiniTime firmwares!

Below, I'm using Amazfish on SailfishOS, therefore I'm using the .bin files directly, not the .zip files as mentioned in JF's article.

Step 1: Update the bootloader

  1. Download the reloader-mcuboot.zip from the PineTime mcuboot GH page and unzip it.
    It contains a custom firmware (reloader) that will overwrite the current bootloader with the new version.
  2. In Amazfish, open the Pulley menu > Download File
  3. Then browse for the reloader-mcuboot.bin file, and hit the Send button:
  4. This will upload the bootloader over the air:
  5. The watch resets and the old bootloader swaps InfiniTime with this reloader tool
  6. The bootloader then runs the reloader:
    • which overwrites the old bootloader with the new one
    • and resets the watch when it's done
  7. The new bootloader is running, which you can validate when the PineTime boots: instead of the green PineTime logo, you now get a white PineCone which turns to green:
  8. The bootloader then reverts to the InfiniTime version you were running before, and loads it.

Step 2: Installing the Recovery Firmware

  1. Download and unzip the file pinetime-mcuboot-recovery-loader-dfu-0.14.1.zip from the InfiniTime repo
  2. Upload it using Amazfish (Pulley Menu > Download File).
    This custom firmware will install the recovery firmware into the external flash memory.
  3. The watch will reboot, and you will see the InfiniTime logo:
  4. The bootloader once again reverts to the previous InfiniTime version you were running.

Step 3: Installing InfiniTime 0.14.1

Just update the firmware normally, using OTA/Amazfish.
You'll have to download and unzip the file pinetime-mcuboot-app-dfu-0.14.1.zip from the InfiniTime repo

Official instructions

You can if you want follow the instructions on JF's GitHub page.
Additionally, you can also look at the nice video that JF has recorded: it details all the steps above, in case you're more into videos.

Using the Recovery feature

When the PineTime boots/reboots (you need to hold the button for ~8 seconds), it displays a PineCone and you have around 5 seconds to take an action:

  • if you do nothing, the PineCone will turn to green, and the watch boots normally,
  • if you hold the button until the PineCone turns to blue, then the watch will load the previous firmware,
  • if you keep pressing the button, the PineCone turns to red, and the watch loads the Recovery firwmare:
    • you then have a chance to upload another firmware OTA, in case you had an issue

Wrap up

In my opinion, the most interesting option with those 2 releases, is the recovery firmware: being able to boot into a kind of "Single User" mode (like with FreeBSD) to install a new firmware.

This allows not to worry about doing OTA updates in the future - something that was still risky for sealed PineTime, since if you bricked your device, you had no way to fix it.


Tags: PineTime


I don't have any commenting system, but email me (nicolas at ncartron dot org) your comments!
If you like my work, you can buy me a coffee!