From c11307e75f7416c2bdcd44afdb964c726ae1152e Mon Sep 17 00:00:00 2001 From: Dmitry Ilyin <6576495+widgetii@users.noreply.github.com> Date: Wed, 21 Oct 2026 13:23:46 +0300 Subject: [PATCH] install: the split NOR layout for hi3516ev200, hi3518ev300 and hi3516dv200 Their firmware ships the split NOR package beside the fixed-slot one (OpenIPC/firmware#2655, on OpenIPC/linux#131), and their OpenIPC/u-boot NOR build scans for it (OpenIPC/u-boot#48), so they join NOR_SPLIT_SOCS: one firmware.bin. at 0x50000, the rest of the chip erased. hi3516ev300 stays on fixed slots: its uImage (2009K with the split options) fills the 2 MiB slot, over the 1983K a fixed-slot package beside a split one may use, so its firmware ships no split package. Not run on hardware; the firmware side was checked in qemu-hisilicon. --- CLAUDE.md | 3 ++- src/defib/firmware.py | 3 +++ tests/test_install_nor_split.py | 3 ++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 915f8b9..a98e333 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -174,7 +174,8 @@ Backends: `spi_flash.c` (fmc100), `spi_flash_hisfc350.c` (V1-era parts), env, rest ubi), whose mtdparts/bootcmd/bootargs come from the U-Boot default env; `NAND_LAYOUT` is the legacy split layout for other chips. The `NOR_SPLIT_SOCS` (gk7205v200 family, hi3516cv6xx, hi3519dv500, - hi3516cv300/ev100; keyed by + hi3516cv300/ev100, hi3516ev200/hi3518ev300/hi3516dv200 but not + hi3516ev300; keyed by package board, `FIRMWARE_PACKAGE_BOARD` maps cv608/cv610/cv613 to `hi3516cv6xx` and hi3516dv500 to `hi3519dv500`) install the split NOR package: one `firmware.bin.` where the boot area ends (0x50000; diff --git a/src/defib/firmware.py b/src/defib/firmware.py index 6ed066d..319ebeb 100644 --- a/src/defib/firmware.py +++ b/src/defib/firmware.py @@ -87,6 +87,9 @@ "gk7202v300", "gk7205v200", "gk7205v300", "gk7605v100", "hi3516cv6xx", "hi3519dv500", "hi3516cv300", "hi3516ev100", + # Not hi3516ev300: its kernel fills the 2 MiB slot, so its firmware + # ships fixed slots only. + "hi3516ev200", "hi3518ev300", "hi3516dv200", }) # NOR boot area -- (boot partition size, env partition size) -- where it is diff --git a/tests/test_install_nor_split.py b/tests/test_install_nor_split.py index d0e0df6..e37a2ec 100644 --- a/tests/test_install_nor_split.py +++ b/tests/test_install_nor_split.py @@ -353,7 +353,8 @@ def test_package_board_and_boot_area_are_data(): assert package_board("gk7205v210") == "gk7205v200" assert "hi3516cv6xx" in split_boards("hi3516cv608") for chip in ("hi3516cv608", "hi3516cv610", "hi3516cv613", "hi3519dv500", - "hi3516dv500", "gk7205v200", "hi3516cv300", "hi3516ev100"): + "hi3516dv500", "gk7205v200", "hi3516cv300", "hi3516ev100", + "hi3516ev200", "hi3518ev300", "hi3516dv200"): assert supports_nor_split(chip), chip assert nor_boot_area("hi3516cv300") == (0x40000, 0x10000) assert not supports_nor_split("hi3516ev300")