Skip to content

hi3516cv500 family, hi3536dv100, hi3516av100 family: the split NOR image - #2669

Merged
widgetii merged 3 commits into
masterfrom
split/cv500-36dv100-av100
Oct 24, 2026
Merged

widgetii merged 3 commits into
masterfrom
split/cv500-36dv100-av100

Conversation

@widgetii

Copy link
Copy Markdown
Member

Three more families on the split NOR layout. Each ships its fixed-slot package as before, plus -split (post-image-split.sh, BR2_OPENIPC_NOR_FIXED_PACKAGE=y). Each kernel config turns on MTD_SPLIT_FIRMWARE (named firmware), MTD_SPLIT_UIMAGE_FW, MTD_SPLIT_SQUASHFS_ROOT and MTD_ROOTFS_ROOT_DEV.

Family defconfigs kernel U-Boot
hi3516cv500 hi3516cv500_lite, hi3516dv300_lite, hi3516av300_lite (16 MB) OpenIPC/linux#142 OpenIPC/u-boot#62
hi3536dv100 hi3536dv100_lite OpenIPC/linux#143 OpenIPC/u-boot#62
hi3516av100 hi3516av100_lite/_ultimate, hi3516dv100_lite/_ultimate OpenIPC/linux#144 (HiSFC350 driver) OpenIPC/u-boot#62, which also gives these boards the sf command their bootcmd needs

Tested in qemu-hisilicon with each family's lite build:

hi3516cv500 (16 MB) hi3536dv100 (8 MB) hi3516av100 (8 MB)
uImage / squashfs / firmware.bin 1943K / 7852K / 9856K 1710K / 4820K / 6592K 1833K / 4580K / 6464K
split image, new U-Boot root on 31:4, login root on 31:4, login split taken from the DT, rootfs set as root
split image, published U-Boot root=/dev/mtdblock3 ignored, 31:4 same (the published av100 U-Boot has no sf; see u-boot#62)
overlay across a power cycle kept kept —
fixed-slot package cmdlinepart, 31:3 cmdlinepart, 31:3 cmdlinepart, mtd3 set as root
U-Boot recovery over TFTP, from fixed slots and from a damaged kernel byte-identical, boots split same same
SD script.txt with fatload + fwwrite on a fresh env (u-boot#62) byte-identical, boots split — —

On hi3516av100, qemu-hisilicon's model stops the boot after the MTD probe, before root is mounted. It does that on either layout, and with today's released kernel too, so the av100 root mount isn't shown. Not run on hardware.

hi3516cv500 lite's rootfs is 7852K of its 8 MiB slot on 16 MB flash.
hi3516cv500, hi3516dv300 and hi3516av300'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 finds the
layout from its device tree since OpenIPC/linux#142, their U-Boot scans it
since OpenIPC/u-boot#62. The three lite defconfigs use post-image-split.sh
with BR2_OPENIPC_NOR_FIXED_PACKAGE=y: the fixed-slot package as before,
plus -split.

Tested in qemu-hisilicon (hi3516cv500, 16 MB) with hi3516cv500_lite
(uImage 1943K, squashfs 7852K, firmware.bin 9856K): split boot under the
new and the published U-Boot, 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.
hi3536dv100's kernel config turns on MTD_SPLIT_FIRMWARE (named
"firmware"), MTD_SPLIT_UIMAGE_FW, MTD_SPLIT_SQUASHFS_ROOT and
MTD_ROOTFS_ROOT_DEV; its kernel finds the layout from its device tree
since OpenIPC/linux#143, its U-Boot scans it since OpenIPC/u-boot#62.
hi3536dv100_lite uses post-image-split.sh with
BR2_OPENIPC_NOR_FIXED_PACKAGE=y.

Tested in qemu-hisilicon (hi3536dv100, 8 MB) with hi3536dv100_lite
(uImage 1710K, squashfs 4820K, firmware.bin 6592K): split boot under the
new and the published U-Boot, root on 31:4, login, the overlay kept; the
fixed-slot package on 31:3; recovery from fixed slots and from a damaged
kernel, byte-identical on flash. Not run on hardware.
hi3516av100 and hi3516dv100'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 finds the layout from its device tree
since OpenIPC/linux#144 (through the HiSFC350 driver), their U-Boot scans
it since OpenIPC/u-boot#62, which also gives these boards the sf command
their bootcmd needs. The lite and ultimate defconfigs use
post-image-split.sh with BR2_OPENIPC_NOR_FIXED_PACKAGE=y.

Tested in qemu-hisilicon (hi3516av100, 8 MB) with hi3516av100_lite
(uImage 1833K, squashfs 4580K, firmware.bin 6464K): the split image is
taken from the device tree (kernel 0x50000-0x220000, rootfs, rootfs_data
from 0x6a0000, rootfs set as root); fixed slots keep the command line's
partitions; U-Boot recovery from fixed slots and from a damaged kernel,
byte-identical on flash. qemu-hisilicon's hi3516av100 model stops the boot
after the MTD probe, before the root is mounted, on either layout and with
today's released kernel, so the root mount is not shown. Not run on
hardware.
@qodo-free-for-open-source-projects

Copy link
Copy Markdown

PR Summary by Qodo

Enable split NOR images for three HiSilicon families

✨ Enhancement ⚙️ Configuration changes 🕐 20-40 Minutes

Grey Divider

AI Description

• Enable kernel firmware splitting and root-device selection for six HiSilicon board configurations.
• Build split NOR images for eight variants while retaining fixed-slot packages for existing
 devices.
• Extend the established image layout to these families without changing the shared packaging
 script.
Diagram

graph TD
  A["Board defconfigs"] --> B["Post-image script"] --> C["Split firmware"] --> D["Kernel MTD split"] --> E["Root device"]
  A --> F["Package selection"] --> G["Fixed-slot package"]
  C --> F
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Publish split packages only
  • ➕ Simplifies output and removes fixed-slot size constraints.
  • ➖ Does not preserve the plain fixed-slot package for devices using older upgrade paths.

Recommendation: Keep the PR's dual-package approach: it reuses the established split-image pipeline while preserving fixed-slot output when it fits. Split-only publishing would make the transition less compatible with existing devices.

Files changed (14) +46 / -0

Other (14) +46 / -0
hi3516av100.generic.configEnable firmware splitting for hi3516av100 +5/-0

Enable firmware splitting for hi3516av100

• Enables named firmware, uImage, and squashfs MTD splitting and automatic root-device selection in the hi3516av100 kernel configuration.

br-ext-chip-hisilicon/board/hi3516av100/hi3516av100.generic.config

hi3516dv100.generic.configEnable firmware splitting for hi3516dv100 +5/-0

Enable firmware splitting for hi3516dv100

• Adds the MTD firmware and rootfs split settings, including root-device selection, to the hi3516dv100 kernel configuration.

br-ext-chip-hisilicon/board/hi3516av100/hi3516dv100.generic.config

hi3516av300.generic.configEnable firmware splitting for hi3516av300 +5/-0

Enable firmware splitting for hi3516av300

• Configures the hi3516av300 kernel to split the named firmware partition into uImage and squashfs components and select the discovered root device.

br-ext-chip-hisilicon/board/hi3516cv500/hi3516av300.generic.config

hi3516cv500.generic.configEnable firmware splitting for hi3516cv500 +5/-0

Enable firmware splitting for hi3516cv500

• Adds MTD firmware, uImage, and squashfs splitting with automatic root-device selection to the hi3516cv500 kernel configuration.

br-ext-chip-hisilicon/board/hi3516cv500/hi3516cv500.generic.config

hi3516dv300.generic.configEnable firmware splitting for hi3516dv300 +5/-0

Enable firmware splitting for hi3516dv300

• Enables the named firmware split and discovered squashfs root device in the hi3516dv300 kernel configuration.

br-ext-chip-hisilicon/board/hi3516cv500/hi3516dv300.generic.config

hi3536dv100.generic.configEnable firmware splitting for hi3536dv100 +5/-0

Enable firmware splitting for hi3536dv100

• Enables firmware, uImage, and squashfs MTD splitting and root-device selection in the hi3536dv100 kernel configuration.

br-ext-chip-hisilicon/board/hi3536dv100/hi3536dv100.generic.config

hi3516av100_lite_defconfigBuild split and fixed-slot hi3516av100 lite packages +2/-0

Build split and fixed-slot hi3516av100 lite packages

• Selects the existing split post-image script and requests a fixed-slot package alongside the split image.

br-ext-chip-hisilicon/configs/hi3516av100_lite_defconfig

hi3516av100_ultimate_defconfigBuild split and fixed-slot hi3516av100 ultimate packages +2/-0

Build split and fixed-slot hi3516av100 ultimate packages

• Selects split-image generation while retaining fixed-slot package output for the ultimate variant.

br-ext-chip-hisilicon/configs/hi3516av100_ultimate_defconfig

hi3516av300_lite_defconfigBuild split and fixed-slot hi3516av300 lite packages +2/-0

Build split and fixed-slot hi3516av300 lite packages

• Invokes the split post-image script and enables fixed-slot package output for the lite variant.

br-ext-chip-hisilicon/configs/hi3516av300_lite_defconfig

hi3516cv500_lite_defconfigBuild split and fixed-slot hi3516cv500 lite packages +2/-0

Build split and fixed-slot hi3516cv500 lite packages

• Enables split NOR image generation and requests the legacy fixed-slot package for hi3516cv500 lite.

br-ext-chip-hisilicon/configs/hi3516cv500_lite_defconfig

hi3516dv100_lite_defconfigBuild split and fixed-slot hi3516dv100 lite packages +2/-0

Build split and fixed-slot hi3516dv100 lite packages

• Selects the split post-image script and retains fixed-slot package output for hi3516dv100 lite.

br-ext-chip-hisilicon/configs/hi3516dv100_lite_defconfig

hi3516dv100_ultimate_defconfigBuild split and fixed-slot hi3516dv100 ultimate packages +2/-0

Build split and fixed-slot hi3516dv100 ultimate packages

• Enables split-image generation and requests fixed-slot package output for the ultimate variant.

br-ext-chip-hisilicon/configs/hi3516dv100_ultimate_defconfig

hi3516dv300_lite_defconfigBuild split and fixed-slot hi3516dv300 lite packages +2/-0

Build split and fixed-slot hi3516dv300 lite packages

• Selects the existing split post-image script and enables fixed-slot package output for hi3516dv300 lite.

br-ext-chip-hisilicon/configs/hi3516dv300_lite_defconfig

hi3536dv100_lite_defconfigBuild split and fixed-slot hi3536dv100 lite packages +2/-0

Build split and fixed-slot hi3536dv100 lite packages

• Enables split NOR image generation and requests a fixed-slot package for hi3536dv100 lite.

br-ext-chip-hisilicon/configs/hi3536dv100_lite_defconfig

@qodo-free-for-open-source-projects

qodo-free-for-open-source-projects Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (1) 📎 Requirement gaps (0) 🎨 UX issues (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (0)

Grey Divider


Action required

1. Board behavior changes lack hardware evidence 📘 Rule violation ☼ Reliability
Description
The family defconfigs now select post-image-split.sh and fixed-package generation, while the
generic kernel configurations enable split-NOR and root-filesystem behavior. Because these changes
alter image boot behavior for the listed boards, the PR's stated qemu-only testing and explicit
no-hardware qualification provide no real-camera evidence.
Code

br-ext-chip-hisilicon/configs/hi3516av100_lite_defconfig[R65-66]

+BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_GENERAL_PATH)/scripts/post-image-split.sh"
+BR2_OPENIPC_NOR_FIXED_PACKAGE=y
Evidence
The checklist requires real-camera evidence for any PR that can change firmware behavior. The added
defconfig selects split-image generation, and the added kernel configuration enables split firmware
and root filesystem handling; the PR description states that testing was limited to qemu-hisilicon
and was not run on hardware.

Rule 3: Hardware evidence is present and honest
br-ext-chip-hisilicon/configs/hi3516av100_lite_defconfig[65-66]
br-ext-chip-hisilicon/board/hi3516av100/hi3516av100.generic.config[2677-2681]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The PR changes firmware packaging and kernel MTD/rootfs behavior for multiple HiSilicon board families, but the supplied validation was performed only in qemu-hisilicon and explicitly not on hardware.
## Fix Focus Areas
- br-ext-chip-hisilicon/configs/hi3516av100_lite_defconfig[65-66]
- br-ext-chip-hisilicon/board/hi3516av100/hi3516av100.generic.config[2677-2681]
## Recommended Fix
Validate the split image on a real camera for each affected family, recording the affected board, boot/root-mount symptom, login or stream behavior, and before/after measurements or logs. Update the pull request description with that hardware evidence and identify any family that could not be tested.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Tip of the day
💡 Did you know, you can choose which labels appear on a finding, and whether they show icons or text

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

@widgetii
widgetii merged commit 79d4430 into master Oct 24, 2026
43 of 47 checks passed
@widgetii
widgetii deleted the split/cv500-36dv100-av100 branch October 24, 2026 10:04
widgetii added a commit to OpenIPC/wiki that referenced this pull request Oct 24, 2026
…mily (#622)

* nor-split: the Hi3516CV500 family, Hi3536DV100 and the Hi3516AV100 family

They ship the split package beside the fixed-slot one since
OpenIPC/firmware#2669, on OpenIPC/linux#142, #143 and #144 and
OpenIPC/u-boot#62. The Hi3516AV100 family's u-boot-<soc>-nor.bin boots
only from #62 on: earlier builds had no sf command, so their bootcmd
could not read the kernel. sysupgrade -k -r takes the split package on
them, and they go back to fixed slots the same way.

Checked in qemu-hisilicon (hi3516cv500 16 MB, hi3536dv100 and hi3516av100
8 MB). Not run on hardware.

* nor-split: the Hi3516AV100 family's universal U-Boot boots the split image

From review: the older u-boot-<soc>-universal.bin (2010.06) that these
cameras run loads the split image's kernel, which takes the device tree's
layout over the fixed-slot mtdparts it is given (checked in qemu-hisilicon,
hi3516av100). An -nor.bin from before OpenIPC/u-boot#62 boots nothing, so
no camera runs it to upgrade from.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant