From 800ebf7e94e3a7e375cf915ae21e14514fd81450 Mon Sep 17 00:00:00 2001 From: Richard Genoud Date: Fri, 23 Jan 2026 12:45:01 +0100 Subject: tools: sunxi-spl-image-builder: support H6/H616 NAND boot The H6/H616 boot ROM doesn't expect a SPL scrambled the same way as older SoCs. It doesn't use a specific seeds table, it expects a maximized ECC (BCH-80), a specific BBM (FF000301) and doesn't work if empty pages are skipped (it needs its specific BBM, even in the padding). So, add a --soc=h6 option to support H6/616 with: - more ECC strengths - specific BBM - default_scrambler_seeds[] with all values - no empty pages skip In Kconfig, select BCH-80 by default for SUNXI_SPL_ECC_STRENGTH to make BROM happy. And in scripts/Makefile.xpl, use --soc=h6 option when building for a SUN50I_GEN_H6 SoC. Tested on Whatsminer H616 board, booting from NAND. Reviewed-by: Miquel Raynal Co-developed-by: James Hilliard Signed-off-by: James Hilliard Signed-off-by: Richard Genoud Signed-off-by: Michael Trimarchi --- scripts/Makefile.xpl | 1 + 1 file changed, 1 insertion(+) (limited to 'scripts') diff --git a/scripts/Makefile.xpl b/scripts/Makefile.xpl index 5e65d7b2498..55aeac1038e 100644 --- a/scripts/Makefile.xpl +++ b/scripts/Makefile.xpl @@ -457,6 +457,7 @@ $(obj)/sunxi-spl.bin: $(obj)/$(SPL_BIN).bin FORCE quiet_cmd_sunxi_spl_image_builder = SUNXI_SPL_IMAGE_BUILDER $@ cmd_sunxi_spl_image_builder = $(objtree)/tools/sunxi-spl-image-builder \ + $(if $(CONFIG_SUN50I_GEN_H6),--soc=h6) \ -c $(CONFIG_NAND_SUNXI_SPL_ECC_STRENGTH)/$(CONFIG_NAND_SUNXI_SPL_ECC_SIZE) \ -p $(CONFIG_SYS_NAND_PAGE_SIZE) \ -o $(CONFIG_SYS_NAND_OOBSIZE) \ -- cgit v1.2.3