From 8834e75808e7fa7d05f6f2cca37bd164a73b476c Mon Sep 17 00:00:00 2001 From: Dmitry Ilyin <6576495+widgetii@users.noreply.github.com> Date: Fri, 23 Oct 2026 22:11:42 +0300 Subject: [PATCH 1/2] gk7201v200: the split NOR image, as on gk7205v500 gk7201v200 lite's rootfs grew 496K in the 30 days to the 2026-10-22 nightly and has 180K left of its 5 MiB slot. The split layout lets kernel and rootfs share one budget. - gk7201v200.generic.config turns on MTD_SPLIT_FIRMWARE (named "firmware"), MTD_SPLIT_UIMAGE_FW, MTD_SPLIT_SQUASHFS_ROOT and MTD_ROOTFS_ROOT_DEV, as gk7205v500.generic.config does. The kernel's gk7201v200 device tree has the partitions since OpenIPC/linux#140, and its U-Boot the split mode since OpenIPC/u-boot#61. - gk7201v200_lite uses post-image-split.sh with BR2_OPENIPC_NOR_FIXED_PACKAGE=y: the fixed-slot package as before, plus -split. Tested in qemu-hisilicon (gk7201v200, 8 MB) with a gk7201v200_lite build on this kernel (uImage 1836K, squashfs 4956K, firmware.bin 6848K): - split firmware.bin, new U-Boot: "Found RootFS at 0x00220000", "sfc: split NOR layout, device tree partitions", rootfs_data from 0x700000, root on 31:4, login; a second boot on the same flash reads the seed the first saved in the overlay; - the same image under the published u-boot-gk7201v200-nor.bin: "root=/dev/mtdblock3 ignored, the flash names its own root", root on 31:4; - the fixed-slot package: 6 cmdlinepart partitions, root on 31:3, login; - recovery: from fixed slots, and from a split image with one kernel byte flipped ("kernel at 0x50000 fails its CRC"), fwupd over TFTP writes firmware.bin.gk7201v200 (byte-identical on flash) and the next boot reaches login on 31:4. Not run on hardware. --- br-ext-chip-goke/board/gk7205v500/gk7201v200.generic.config | 5 +++++ br-ext-chip-goke/configs/gk7201v200_lite_defconfig | 2 ++ 2 files changed, 7 insertions(+) diff --git a/br-ext-chip-goke/board/gk7205v500/gk7201v200.generic.config b/br-ext-chip-goke/board/gk7205v500/gk7201v200.generic.config index 463398d06..54f0e2bb8 100644 --- a/br-ext-chip-goke/board/gk7205v500/gk7201v200.generic.config +++ b/br-ext-chip-goke/board/gk7205v500/gk7201v200.generic.config @@ -2844,3 +2844,8 @@ CONFIG_ARCH_HAS_SG_CHAIN=y CONFIG_SBITMAP=y # CONFIG_VIRTUALIZATION is not set # CONFIG_GCC_PLUGINS is not set +CONFIG_MTD_ROOTFS_ROOT_DEV=y +CONFIG_MTD_SPLIT_FIRMWARE=y +CONFIG_MTD_SPLIT_FIRMWARE_NAME="firmware" +CONFIG_MTD_SPLIT_SQUASHFS_ROOT=y +CONFIG_MTD_SPLIT_UIMAGE_FW=y diff --git a/br-ext-chip-goke/configs/gk7201v200_lite_defconfig b/br-ext-chip-goke/configs/gk7201v200_lite_defconfig index 702bc7397..9a27a7e76 100644 --- a/br-ext-chip-goke/configs/gk7201v200_lite_defconfig +++ b/br-ext-chip-goke/configs/gk7201v200_lite_defconfig @@ -69,3 +69,5 @@ BR2_PACKAGE_OPUS_OPENIPC=y BR2_PACKAGE_OPUS_OPENIPC_FIXED_POINT=y BR2_PACKAGE_VTUND_OPENIPC=y BR2_PACKAGE_YAML_CLI=y +BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_GENERAL_PATH)/scripts/post-image-split.sh" +BR2_OPENIPC_NOR_FIXED_PACKAGE=y From 4bbbfb0fe2373f5d45615f8e0f497607732460f9 Mon Sep 17 00:00:00 2001 From: Dmitry Ilyin <6576495+widgetii@users.noreply.github.com> Date: Sat, 24 Oct 2026 10:03:43 +0300 Subject: [PATCH 2/2] hi3516cv200 family: the split NOR image hi3516cv200 lite's rootfs is 5028K of its 5120K slot. The split layout lets kernel and rootfs share one budget. - hi3516cv200, hi3518ev200 and hi3518ev201's kernel configs turn on MTD_SPLIT_FIRMWARE (named "firmware"), MTD_SPLIT_UIMAGE_FW, MTD_SPLIT_SQUASHFS_ROOT and MTD_ROOTFS_ROOT_DEV. Their kernel (OpenIPC/linux hisilicon-hi3516cv200) finds the layout from its device tree since OpenIPC/linux#141, and their U-Boot scans it since OpenIPC/u-boot#61. - hi3516cv200_lite, hi3518ev200_lite, hi3518ev200_ultimate and hi3518ev201_lite use post-image-split.sh with BR2_OPENIPC_NOR_FIXED_PACKAGE=y: the fixed-slot package as before, plus -split. Tested in qemu-hisilicon (hi3516cv200, 8 MB) with hi3516cv200_lite (uImage 1658K, squashfs 5028K, firmware.bin 6720K): split boot under the new and the published U-Boot (root=/dev/mtdblock3 ignored), root on 31:4, login, the overlay kept across a power cycle; the fixed-slot package on 31:3; U-Boot recovery over TFTP from fixed slots and from a damaged kernel, byte-identical on flash. Not run on hardware. --- .../board/hi3516cv200/hi3516cv200.generic.config | 5 +++++ .../board/hi3516cv200/hi3518ev200.generic.config | 5 +++++ .../board/hi3516cv200/hi3518ev201.generic.config | 5 +++++ br-ext-chip-hisilicon/configs/hi3516cv200_lite_defconfig | 2 ++ br-ext-chip-hisilicon/configs/hi3518ev200_lite_defconfig | 2 ++ br-ext-chip-hisilicon/configs/hi3518ev200_ultimate_defconfig | 2 ++ br-ext-chip-hisilicon/configs/hi3518ev201_lite_defconfig | 2 ++ 7 files changed, 23 insertions(+) diff --git a/br-ext-chip-hisilicon/board/hi3516cv200/hi3516cv200.generic.config b/br-ext-chip-hisilicon/board/hi3516cv200/hi3516cv200.generic.config index fbddf83d7..de0680e00 100644 --- a/br-ext-chip-hisilicon/board/hi3516cv200/hi3516cv200.generic.config +++ b/br-ext-chip-hisilicon/board/hi3516cv200/hi3516cv200.generic.config @@ -2426,3 +2426,8 @@ CONFIG_ARCH_HAS_SG_CHAIN=y CONFIG_SBITMAP=y # CONFIG_VIRTUALIZATION is not set # CONFIG_GCC_PLUGINS is not set +CONFIG_MTD_ROOTFS_ROOT_DEV=y +CONFIG_MTD_SPLIT_FIRMWARE=y +CONFIG_MTD_SPLIT_FIRMWARE_NAME="firmware" +CONFIG_MTD_SPLIT_SQUASHFS_ROOT=y +CONFIG_MTD_SPLIT_UIMAGE_FW=y diff --git a/br-ext-chip-hisilicon/board/hi3516cv200/hi3518ev200.generic.config b/br-ext-chip-hisilicon/board/hi3516cv200/hi3518ev200.generic.config index e381a9909..dadf47ba8 100644 --- a/br-ext-chip-hisilicon/board/hi3516cv200/hi3518ev200.generic.config +++ b/br-ext-chip-hisilicon/board/hi3516cv200/hi3518ev200.generic.config @@ -2475,3 +2475,8 @@ CONFIG_ARCH_HAS_SG_CHAIN=y CONFIG_SBITMAP=y # CONFIG_VIRTUALIZATION is not set # CONFIG_GCC_PLUGINS is not set +CONFIG_MTD_ROOTFS_ROOT_DEV=y +CONFIG_MTD_SPLIT_FIRMWARE=y +CONFIG_MTD_SPLIT_FIRMWARE_NAME="firmware" +CONFIG_MTD_SPLIT_SQUASHFS_ROOT=y +CONFIG_MTD_SPLIT_UIMAGE_FW=y diff --git a/br-ext-chip-hisilicon/board/hi3516cv200/hi3518ev201.generic.config b/br-ext-chip-hisilicon/board/hi3516cv200/hi3518ev201.generic.config index 620b0e3d8..9cc2d7f7d 100644 --- a/br-ext-chip-hisilicon/board/hi3516cv200/hi3518ev201.generic.config +++ b/br-ext-chip-hisilicon/board/hi3516cv200/hi3518ev201.generic.config @@ -2233,3 +2233,8 @@ CONFIG_SG_POOL=y CONFIG_ARCH_HAS_SG_CHAIN=y CONFIG_SBITMAP=y # CONFIG_VIRTUALIZATION is not set +CONFIG_MTD_ROOTFS_ROOT_DEV=y +CONFIG_MTD_SPLIT_FIRMWARE=y +CONFIG_MTD_SPLIT_FIRMWARE_NAME="firmware" +CONFIG_MTD_SPLIT_SQUASHFS_ROOT=y +CONFIG_MTD_SPLIT_UIMAGE_FW=y diff --git a/br-ext-chip-hisilicon/configs/hi3516cv200_lite_defconfig b/br-ext-chip-hisilicon/configs/hi3516cv200_lite_defconfig index 2b20645ae..0fd5ba5a4 100644 --- a/br-ext-chip-hisilicon/configs/hi3516cv200_lite_defconfig +++ b/br-ext-chip-hisilicon/configs/hi3516cv200_lite_defconfig @@ -65,3 +65,5 @@ BR2_PACKAGE_MOTORS=y BR2_PACKAGE_OPUS_OPENIPC=y BR2_PACKAGE_VTUND_OPENIPC=y BR2_PACKAGE_YAML_CLI=y +BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_GENERAL_PATH)/scripts/post-image-split.sh" +BR2_OPENIPC_NOR_FIXED_PACKAGE=y diff --git a/br-ext-chip-hisilicon/configs/hi3518ev200_lite_defconfig b/br-ext-chip-hisilicon/configs/hi3518ev200_lite_defconfig index cf2407215..9bb2cec4c 100644 --- a/br-ext-chip-hisilicon/configs/hi3518ev200_lite_defconfig +++ b/br-ext-chip-hisilicon/configs/hi3518ev200_lite_defconfig @@ -65,3 +65,5 @@ BR2_PACKAGE_MOTORS=y BR2_PACKAGE_OPUS_OPENIPC=y BR2_PACKAGE_VTUND_OPENIPC=y BR2_PACKAGE_YAML_CLI=y +BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_GENERAL_PATH)/scripts/post-image-split.sh" +BR2_OPENIPC_NOR_FIXED_PACKAGE=y diff --git a/br-ext-chip-hisilicon/configs/hi3518ev200_ultimate_defconfig b/br-ext-chip-hisilicon/configs/hi3518ev200_ultimate_defconfig index 6f0f815dc..6e3d09d88 100644 --- a/br-ext-chip-hisilicon/configs/hi3518ev200_ultimate_defconfig +++ b/br-ext-chip-hisilicon/configs/hi3518ev200_ultimate_defconfig @@ -73,3 +73,5 @@ BR2_PACKAGE_UACME_OPENIPC=y BR2_PACKAGE_VTUND_OPENIPC=y BR2_PACKAGE_YAML_CLI=y BR2_PACKAGE_ZEROTIER_ONE=y +BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_GENERAL_PATH)/scripts/post-image-split.sh" +BR2_OPENIPC_NOR_FIXED_PACKAGE=y diff --git a/br-ext-chip-hisilicon/configs/hi3518ev201_lite_defconfig b/br-ext-chip-hisilicon/configs/hi3518ev201_lite_defconfig index 13a74682b..765c5596e 100644 --- a/br-ext-chip-hisilicon/configs/hi3518ev201_lite_defconfig +++ b/br-ext-chip-hisilicon/configs/hi3518ev201_lite_defconfig @@ -64,3 +64,5 @@ BR2_PACKAGE_MOTORS=y BR2_PACKAGE_OPUS_OPENIPC=y BR2_PACKAGE_VTUND_OPENIPC=y BR2_PACKAGE_YAML_CLI=y +BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_GENERAL_PATH)/scripts/post-image-split.sh" +BR2_OPENIPC_NOR_FIXED_PACKAGE=y