The smallest possible patch for Polyend Tracker+ firmware 1.2.0. All it changes is
the version text in Config, which reads 1.2.0-MT0. It's a harmless first check
that your unit installs patched firmware and switches back to stock, before you try a
real patch.
One literal-pool word changes: the pointer to the version format string "%d.%d.%d"
(at 0x600cbf9c, used by sprintf in 0x600cbe88). It now points to
"%d.%d.%d-MT0", stored at 0x601bb100 in the next 4 KB flash sector after the
stock image (the stock image ends inside sector 0x601ba000). The gap is written as
0xFF data, so the file has no hole. No new code runs.
If Config shows 1.2.0-MT0, the bootloader has accepted the three things every real
patch depends on:
- a
.ptfwhose records differ from Polyend's, - an image that is longer than the stock one, and
- data in a flash sector the stock image never uses.
No compiler needed: the compiled patch is in prebuilt/. See
docs/PATCHING.md for getting and checking the stock firmware.
python tools/patch_ptf.py path/to/TrackerPlus_1.2.0.ptf patch/versiontest/patch.json build/TrackerPlus_MT0.ptfTo build it from source with the Arm GNU Toolchain (build.sh writes
patch/versiontest/build/, which the patcher then uses instead of prebuilt/):
patch/versiontest/build.sh
python tools/patch_ptf.py path/to/TrackerPlus_1.2.0.ptf patch/versiontest/patch.json build/TrackerPlus_MT0.ptfTo see the version text a .ptf will show, using the firmware's own sprintf in the
emulator (needs pip install unicorn capstone numpy):
python tools/emu/check_version.py build/TrackerPlus_MT0.ptf # -> '1.2.0-MT0'- Back up the whole SD card.
- In
/Firmware, keep only the stockTrackerPlus_1.2.0.ptfandTrackerPlus_MT0.ptf, so an emergency reflash can only pick one of these two. Config's list shows files whose names start withTrackerPlusand end with.ptf. - Config → Firmware →
TrackerPlus_MT0.ptf→ confirm. - After the reboot, Config should show
1.2.0-MT0 Build 1504. - To revert: Config → Firmware →
TrackerPlus_1.2.0.ptf. Config shows1.2.0again.
If it doesn't boot, put only the stock TrackerPlus_1.2.0.ptf in /Firmware (from a
computer), power on with the card in, and press the pinhole button next to the USB-C
port. The bootloader reinstalls the stock firmware.