openwrt/target/linux/econet
Ahmed Naseef 83c6b5b5d0 econet: en75_bmt: add configurable BBT table size
Different vendor firmware versions use different BBT table sizes. The
checksum is calculated over the entire table, so the size must match
what the bootloader expects.

The Genexis Platinum-4410 bootloader was compiled with a BBT table
size of 250 entries (MAX_RAW_BAD_BLOCK_SIZE as found in vendor code).
Without this fix, the BBT checksum validation fails:

    [    0.391948] spi-nand spi0.0: Dosilicon SPI NAND was found.
    [    0.397651] spi-nand spi0.0: 128 MiB, block size: 128 KiB, page size: 2048, OOB size: 64
    [    0.407370] en75_bmt: found BMT in block 1023
    [    0.450160] en75_bmt: BBT not found and econet,can-write-factory-bbt is unset, giving up

Add a new DTS property 'econet,bbt-table-size' to configure the BBT
table size. If not specified, defaults to 1000.

After this patch:

    [    0.407021] en75_bmt: found BMT in block 1023
    [    0.449159] en75_bmt: found BBT in block 943
    [    0.453491] en75_bmt: BBT & BMT found
    [    0.457152] en75_bmt: blocks: total: 1024, user: 943, factory_bad: 0, worn: 0 reserve: 81
    [    0.465390] en75_bmt: 117 MiB usable space

Signed-off-by: Ahmed Naseef <naseefkm@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21326
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-02-15 01:12:52 +01:00
..
base-files/sbin econet: fix wrong board name for Zyxel PMG5617GA 2025-12-08 17:30:27 +01:00
dts econet: add EN7528 subtarget support 2026-02-15 01:12:52 +01:00
en7528 econet: add EN7528 subtarget support 2026-02-15 01:12:52 +01:00
en751221 econet: add EN7528 subtarget support 2026-02-15 01:12:52 +01:00
files/drivers/mtd/nand econet: en75_bmt: add configurable BBT table size 2026-02-15 01:12:52 +01:00
image econet: add EN7528 subtarget support 2026-02-15 01:12:52 +01:00
patches-6.12 econet: spi: sync spi-airoha-snfi patches from airoha target 2026-02-15 01:12:52 +01:00
Makefile econet: add EN7528 subtarget support 2026-02-15 01:12:52 +01:00