From dc5efe6651eb5634af0757f09bbb17679f54af96 Mon Sep 17 00:00:00 2001 From: Dmitry Ilyin <6576495+widgetii@users.noreply.github.com> Date: Wed, 21 Oct 2026 21:14:13 +0300 Subject: [PATCH 1/2] hi3516ev300: the split NOR image only, like hi3516cv6xx hi3516ev300's kernel is 2009K with the split options: padded to 64 KiB it ends exactly at the 2 MiB slot, so a fixed-slot package cannot ship beside a split one (the kernel would take the fixed image as split while U-Boot reads fixed slots). #2655 therefore left it out; it now ships the split package alone, as hi3516cv6xx does. Its lite images sat 16 KiB short of the 5 MiB rootfs slot, so it is the board that needs it most. - lite, ultimate, dev and glibc use general/scripts/post-image-split.sh without BR2_OPENIPC_NOR_FIXED_PACKAGE: openipc.hi3516ev300-nor- -split.tgz, no plain NOR package; ultimate still packages its NAND image. dev and glibc share hi3516ev300.generic.config, so they go with it rather than keep fixed-slot images a split-capable kernel would misread. neo keeps its own config and fixed-slot package. - hi3516ev300.generic.config: MTD_SPLIT_FIRMWARE ("firmware"), MTD_SPLIT_UIMAGE_FW, MTD_SPLIT_SQUASHFS_ROOT, MTD_ROOTFS_ROOT_DEV (OpenIPC/linux#131, #134). Built locally (kernel at hisilicon-hi3516ev200 e7008a95c): - hi3516ev300_lite: uImage 2008K/2048K read, firmware.bin 7168K/7616K; - hi3516ev300_ultimate: firmware.bin 10240K/15808K, rootfs.ubi 18304K/24576K, plus the NAND package. Tested in qemu-hisilicon (hi3516ev300) with the published u-boot-hi3516ev300-nor.bin (2022.10-gbaa15068), split firmware.bin at 0x50000, 8 MB lite and 16 MB ultimate, booted twice each: - U-Boot reads it as fixed slots (the squashfs is exactly 2 MiB after the uImage): "Found RootFS at 0x00250000", root=/dev/mtdblock3 and fixed mtdparts; the kernel: "hi_sfc: split NOR layout, device tree partitions", "root=/dev/mtdblock3 ignored", root on 31:4, login; rootfs_data at 0x750000 (lite) / 0xa50000 (ultimate) formatted once and kept (/init's .openipc-overlay marker there after the second boot). - .github/scripts/test_sysupgrade.sh passes (split-only boards take the -split package by default). After the first nightly with these packages, the stale plain openipc.hi3516ev300-nor-{lite,ultimate}.tgz on latest should be deleted: older cameras whose sysupgrade predates the split URL fallback would otherwise keep installing them. Not run on hardware. --- .../board/hi3516ev200/hi3516ev300.generic.config | 5 +++++ br-ext-chip-hisilicon/configs/hi3516ev300_dev_defconfig | 1 + br-ext-chip-hisilicon/configs/hi3516ev300_glibc_defconfig | 1 + br-ext-chip-hisilicon/configs/hi3516ev300_lite_defconfig | 1 + br-ext-chip-hisilicon/configs/hi3516ev300_ultimate_defconfig | 1 + 5 files changed, 9 insertions(+) diff --git a/br-ext-chip-hisilicon/board/hi3516ev200/hi3516ev300.generic.config b/br-ext-chip-hisilicon/board/hi3516ev200/hi3516ev300.generic.config index f24703c3ad..3e4e3d8790 100644 --- a/br-ext-chip-hisilicon/board/hi3516ev200/hi3516ev300.generic.config +++ b/br-ext-chip-hisilicon/board/hi3516ev200/hi3516ev300.generic.config @@ -892,6 +892,11 @@ CONFIG_MTD=y CONFIG_MTD_CMDLINE_PARTS=y # CONFIG_MTD_AFS_PARTS is not set CONFIG_MTD_OF_PARTS=y +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 # CONFIG_MTD_AR7_PARTS is not set # diff --git a/br-ext-chip-hisilicon/configs/hi3516ev300_dev_defconfig b/br-ext-chip-hisilicon/configs/hi3516ev300_dev_defconfig index c28254d8d1..36e8351809 100644 --- a/br-ext-chip-hisilicon/configs/hi3516ev300_dev_defconfig +++ b/br-ext-chip-hisilicon/configs/hi3516ev300_dev_defconfig @@ -70,3 +70,4 @@ BR2_PACKAGE_RTW_HOSTAPD=y BR2_PACKAGE_UACME_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" diff --git a/br-ext-chip-hisilicon/configs/hi3516ev300_glibc_defconfig b/br-ext-chip-hisilicon/configs/hi3516ev300_glibc_defconfig index 6a556143f3..c45056a378 100644 --- a/br-ext-chip-hisilicon/configs/hi3516ev300_glibc_defconfig +++ b/br-ext-chip-hisilicon/configs/hi3516ev300_glibc_defconfig @@ -67,3 +67,4 @@ BR2_PACKAGE_OPUS_OPENIPC_FIXED_POINT=y BR2_PACKAGE_UACME_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" diff --git a/br-ext-chip-hisilicon/configs/hi3516ev300_lite_defconfig b/br-ext-chip-hisilicon/configs/hi3516ev300_lite_defconfig index 1743eb612e..abc20faa72 100644 --- a/br-ext-chip-hisilicon/configs/hi3516ev300_lite_defconfig +++ b/br-ext-chip-hisilicon/configs/hi3516ev300_lite_defconfig @@ -63,3 +63,4 @@ 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" diff --git a/br-ext-chip-hisilicon/configs/hi3516ev300_ultimate_defconfig b/br-ext-chip-hisilicon/configs/hi3516ev300_ultimate_defconfig index 14ff094c0f..e7472bcca5 100644 --- a/br-ext-chip-hisilicon/configs/hi3516ev300_ultimate_defconfig +++ b/br-ext-chip-hisilicon/configs/hi3516ev300_ultimate_defconfig @@ -86,3 +86,4 @@ 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" From faab536350f80bb93871e1adcfc903d1b0bb53c2 Mon Sep 17 00:00:00 2001 From: Dmitry Ilyin <6576495+widgetii@users.noreply.github.com> Date: Wed, 21 Oct 2026 22:44:18 +0300 Subject: [PATCH 2/2] hi3518ev300 split-only too; dev and glibc take their -split archive - hi3518ev300 lite and ultimate drop BR2_OPENIPC_NOR_FIXED_PACKAGE: the fixed-slot lite package no longer fits its 5120K rootfs slot (4 KiB over after today's merges), which fails the whole nightly. They ship the -split package only, like hi3516ev300 and hi3516cv6xx. - sysupgrade's default_upgrade_url applied the -split fallback only for packages from OpenIPC/firmware. dev and glibc come from OpenIPC/builder, so on a split-only board they asked for a plain archive that is no longer built (from review). nor_split_url now applies wherever the archive lives; it switches only when a -split archive exists. - test_sysupgrade.sh: a hi3516ev300 dev camera gets builder/.../openipc.hi3516ev300-nor-dev-split.tgz when one is published, the plain one otherwise. All checks pass. --- .github/scripts/test_sysupgrade.sh | 7 +++++++ br-ext-chip-hisilicon/configs/hi3518ev300_lite_defconfig | 1 - .../configs/hi3518ev300_ultimate_defconfig | 1 - general/overlay/usr/sbin/sysupgrade | 4 +++- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/scripts/test_sysupgrade.sh b/.github/scripts/test_sysupgrade.sh index 3a072ffb6c..589967886d 100755 --- a/.github/scripts/test_sysupgrade.sh +++ b/.github/scripts/test_sysupgrade.sh @@ -3546,7 +3546,14 @@ default_url_is "$F/openipc.gk7205v200-nor-lite-split.tgz" \ eval 'set_platform gk7205v200_lite; STUB_SOC=gk7205v200; STUB_SPLIT_PUBLISHED=1' default_url_is "$F/openipc.hi3516cv6xx-nor-lite-split.tgz" \ eval 'set_platform hi3516cv6xx_lite; STUB_SOC=hi3516cv6xx; STUB_SPLIT_PUBLISHED=1' +# dev and glibc live in the builder repo; a split-only board publishes -split +# there too (hi3516ev300, hi3518ev300), and the camera must ask for it. +default_url_is "$B/openipc.hi3516ev300-nor-dev-split.tgz" \ + eval 'set_platform hi3516ev300_dev dev; STUB_SOC=hi3516ev300; STUB_SPLIT_PUBLISHED=1' unset STUB_SPLIT_PUBLISHED +default_url_is "$B/openipc.hi3516ev300-nor-dev.tgz" \ + eval 'set_platform hi3516ev300_dev dev; STUB_SOC=hi3516ev300' + default_url_is "$F/openipc.ssc338q-nor-lite.tgz" true # --channel resolves the plain package from the manifest; the family fetches # the -split one beside it. A board that publishes only the split package diff --git a/br-ext-chip-hisilicon/configs/hi3518ev300_lite_defconfig b/br-ext-chip-hisilicon/configs/hi3518ev300_lite_defconfig index 6e384e82cb..5a6939955c 100644 --- a/br-ext-chip-hisilicon/configs/hi3518ev300_lite_defconfig +++ b/br-ext-chip-hisilicon/configs/hi3518ev300_lite_defconfig @@ -67,4 +67,3 @@ BR2_PACKAGE_OPUS_OPENIPC=y BR2_PACKAGE_OPUS_OPENIPC_FIXED_POINT=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/hi3518ev300_ultimate_defconfig b/br-ext-chip-hisilicon/configs/hi3518ev300_ultimate_defconfig index a26084d230..de813070a4 100644 --- a/br-ext-chip-hisilicon/configs/hi3518ev300_ultimate_defconfig +++ b/br-ext-chip-hisilicon/configs/hi3518ev300_ultimate_defconfig @@ -82,4 +82,3 @@ 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/general/overlay/usr/sbin/sysupgrade b/general/overlay/usr/sbin/sysupgrade index fb2ed256d6..c8b602cbcb 100755 --- a/general/overlay/usr/sbin/sysupgrade +++ b/general/overlay/usr/sbin/sysupgrade @@ -3105,7 +3105,9 @@ default_upgrade_url() { # own archive: the plain one keeps the fixed-slot images every older # camera and installer expects. local u="https://github.com/OpenIPC/$repo/releases/download/latest/openipc.$model-$(pkg_flash)-$osr.tgz" - [ "$repo" = firmware ] && u=$(nor_split_url "$u") + # Wherever the archive lives: a board built split-only (hi3516ev300, + # hi3518ev300, hi3516cv6xx) publishes -split for dev and glibc too. + u=$(nor_split_url "$u") echo "$u" }