rk27xx: add a finder for the NAND's FTL scheme

Many rk27xx targets have NAND whose format nobody has examined. The
finder reads ID block 1 and the first page of the first 512 blocks and
says which FTL formatted them: Scheme A by its remap-log blocks,
Scheme B by its bad-block table and data headers, another Scheme B
generation by other 0xFxxx tags. The later ID block layout ('RK27' at
0x0a) records the FTL area's BCH strength at 0x1ed - 8 on the HM-601,
14 on the Archos Vision 28 - and the scan reads in that mode.

It is read-only, shown in the debug menu as "View FTL scheme", and
built for targets whose NAND is not storage - none yet.

Run on dumps of an HM-601 it reports Scheme B, a Samsung YP-CP3
Scheme A, and an Archos Vision 28 the other Scheme B generation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Change-Id: I0528f9d2a6996089b6488a77b43942f6fd1f2c16
This commit is contained in:
Marcin Bukat 2026-10-01 09:28:08 +02:00
parent 16492de569
commit e83b7d6dc4
4 changed files with 363 additions and 0 deletions

View file

@ -1714,6 +1714,11 @@ target/arm/rk27xx/ftl-rk27xx.c
target/arm/rk27xx/ftl-scheme-a.c
target/arm/rk27xx/flash-rk27xx.c
target/arm/rk27xx/nand-rk27xx.c
#if (CONFIG_NAND == NAND_RK27XX) && !(CONFIG_STORAGE & STORAGE_NAND) \
&& !defined(BOOTLOADER)
/* no FTL scheme configured: the finder (debug menu) */
target/arm/rk27xx/ftl-probe-rk27xx.c
#endif
target/arm/rk27xx/usb-rk27xx.c
target/arm/rk27xx/lcdif-rk27xx.c
target/arm/rk27xx/rkw-loader.c