rockbox/firmware/target
Marcin Bukat c3a62cee96 rk27xx: pass the NAND bootloader's handoff words to the OF
Before it jumps to an image, the rk27xx NAND bootloader writes three
words at the address in RKW header field 0x14: a magic, its version
and which copy of the image it loaded. The original firmware never
initialises them: it reports the version over USB and counts its own
reboots in the third word, and once the count reaches 5 it reboots
into a mode the NAND bootloader will not boot. When our bootloader
started the OF, nothing wrote them, so the OF ran with whatever was
left in DRAM.

Field 0x14 of our own images held a constant taken from some other
image. Point it at the last 12 bytes of DRAM, which nothing uses
before our bootloader runs. load_rkw() in the bootloader now reads
the words there before loading an image, and writes them at the
address in the loaded image's header when that lies between the
image and the bootloader. Started over USB, it passes version 0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Change-Id: Ife1d63e361a780c28a9f0626d110552b98bb6b7f
2026-10-07 18:09:15 +02:00
..
arm rk27xx: pass the NAND bootloader's handoff words to the OF 2026-10-07 18:09:15 +02:00
coldfire firmware: move iriver flash helper functions into target tree 2026-09-23 13:44:45 -04:00
hosted YP-CP3: simulator 2026-10-02 16:42:34 +02:00
mips usb: let controller drivers handle SET_ADDRESS requests 2026-09-26 13:23:01 -04:00