rockbox/firmware
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
..
asm asm: ARMv7-M: replace unity-gain write_samples() asm with memcpy 2026-07-15 22:56:05 -04:00
common Add "rbfs" prefix to native filesystem functions 2026-09-17 16:22:31 -04:00
drivers rk27xx codec: mix in only the tuner's line, keep the DAC 2026-09-30 08:07:15 -04:00
export rk27xx: pass the NAND bootloader's handoff words to the OF 2026-10-07 18:09:15 +02:00
include Add "rbfs" prefix to native filesystem functions 2026-09-17 16:22:31 -04:00
kernel 3ds: Port refactor. 2026-09-01 08:39:07 -04:00
libc chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
reggen stm32h743: implement timer API 2026-07-11 17:23:36 -04:00
target rk27xx: pass the NAND bootloader's handoff words to the OF 2026-10-07 18:09:15 +02:00
usbstack usb_storage: allocate the buffer at the storage handover 2026-10-07 09:30:49 -04:00
arabjoin.c
arabjoin.h unicode: Support characters beyond the first unicode plane 2025-09-12 09:24:30 -04:00
ata_idle_notify.c chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
backlight-sw-fading.c chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
backlight.c chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
bidi.c bidi: do not pass non-ASCII codepoints to ispunct() 2026-07-01 21:03:38 -04:00
buflib_malloc.c chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
buflib_mempool.c chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
chunk_alloc.c chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
COPYING
core_alloc.c Fix building Warble when configured as the iPod Video 2026-08-25 08:01:09 -04:00
debug.c chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
eeprom_settings.c firmware: move iriver flash helper functions into target tree 2026-09-23 13:44:45 -04:00
elf_loader.c chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
enc_base.c chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
events.c chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
firmware.make chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
font.c Add "rbfs" prefix to native filesystem functions 2026-09-17 16:22:31 -04:00
font_cache.c unicode: Support characters beyond the first unicode plane 2025-09-12 09:24:30 -04:00
general.c chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
hangul.c unicode: Support characters beyond the first unicode plane 2025-09-12 09:24:30 -04:00
lc-rock.c Add "rbfs" prefix to native filesystem functions 2026-09-17 16:22:31 -04:00
linuxboot.c chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
logf.c chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
lru.c
panic.c chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
pcm.c pcm_sink: allow per-sink swvol/hwvol selection 2026-08-14 22:39:13 +09:00
pcm_mixer.c pcm_mixer: fix active_channels handling in mixer_handle_sampr_change 2026-07-23 21:17:13 -04:00
pcm_sampr.c chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
pcm_sw_volume.c swvol: Switch to using WANT_SWVOL_32 in pcm_sw_volume.c 2026-08-14 22:45:14 -04:00
powermgmt.c chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
profile.c chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
README
rolo.c ROLO: Get rid of redundant call to audio_hard_stop() 2026-09-23 16:52:01 -04:00
rom.lds h300: add support for ROM image generation 2020-10-26 01:37:42 +00:00
screendump.c chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
scroll_engine.c chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
sdmmc.c chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
sound.c audiohw: remove unused BALANCE_CAP and CLIPPING_CAP 2026-07-20 12:47:12 -04:00
SOURCES rk27xx: name the NAND's FTL scheme in each target's config 2026-10-01 12:15:25 +02:00
storage.c chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
system.c firmware: move iriver flash helper functions into target tree 2026-09-23 13:44:45 -04:00
timer.c chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
tuner.c chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
usb.c FS#14011: Handle usb hosts whose first request is SET_ADDRESS (Anthony Fletcher) 2026-09-27 19:36:21 -04:00

See docs/README