Skip to content

hi3518ev200_lite_baolian-11r6w25-hx20y: build and publish the split NOR image - #221

Merged
openipc-ai merged 1 commit into
masterfrom
baolian-split-nor
Nov 2, 2026
Merged

openipc-ai merged 1 commit into
masterfrom
baolian-split-nor

Conversation

@openipc-ai

Copy link
Copy Markdown
Contributor

Problem

The #2675 camera (Baolian 11R6W25-HX20Y, #218) could not install its own image:

Download from https://github.com/OpenIPC/builder/releases/download/latest/hi3518ev200_lite_baolian-11r6w25-hx20y-nor.tgz
Received and unpacked
This camera runs the split NOR layout and upgrades from firmware.bin (openipc.hi3518ev200-nor-lite-split.tgz), not a separate kernel and rootfs. Nothing was written. Aborting.

Since OpenIPC/firmware#2668, the generic hi3518ev200 image uses the split NOR layout: the uImage and the squashfs sit back to back in one firmware partition, which the kernel divides at boot. The camera runs the generic image, so it's on that layout. #218 cloned this device from a profile that predates the split, and it has neither half:

  • No split package: the post-image script that makes firmware.bin and the -split package isn't set.
  • No kernel support: its kernel config lacks the options that divide the partition at boot.

Change

Exactly what firmware#2668 did for hi3518ev200_lite:

  • defconfig:
    BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_GENERAL_PATH)/scripts/post-image-split.sh"
    BR2_OPENIPC_NOR_FIXED_PACKAGE=y
    
  • kernel config (the device ships its own), appended where firmware's hi3518ev200.generic.config has them; the last six lines are now identical to it:
    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
    

The fixed-slot package is still made while it fits, for cameras whose sysupgrade predates the split layout. The workflow publishes <device>-nor-split.tgz beside it (#220), and sysupgrade looks for it next to the plain package named in upgrade (firmware#2743). The default firmware offset 0x50000 matches this camera's partitions (256 KB boot + 64 KB env).

The other hi3518ev200 lite devices here (qtech-qvc-ipc-136w, smartwares-cip-37210, switcam-hs303, switcam-hs303-v2, vstarcam-c8892wip) have the same gap. They're proven devices, so they're left to a separate change.

Tested

  • Not on the camera yet. The #2675 reporter will install the -split package from this build. The refusal above shows sysupgrade wrote nothing, so the camera is untouched.
  • python3 .github/scripts/ci-matrix.py --self-test → self-test ok (130 devices, 16 smoke, 39 cases). The selector narrows this PR to the device.

…OR image

The #2675 camera could not install its own image. Like every
hi3518ev200 on the generic image since OpenIPC/firmware#2668, it runs the
split NOR layout (the uImage and squashfs in one "firmware" partition the
kernel divides at boot), and sysupgrade refused the device's plain
package:

  This camera runs the split NOR layout and upgrades from firmware.bin
  (openipc.hi3518ev200-nor-lite-split.tgz), not a separate kernel and
  rootfs. Nothing was written. Aborting.

The device was cloned from a profile that predates the split layout, so
it had neither half: the post-image script that makes firmware.bin and
the -split package, nor the kernel options that divide the partition at
boot. Both are added as firmware#2668 has them for hi3518ev200_lite: the
two defconfig lines, and CONFIG_MTD_SPLIT_* with CONFIG_MTD_ROOTFS_ROOT_DEV
in the device's kernel config. The fixed-slot package is still made while
it fits. The workflow publishes <device>-nor-split.tgz (#220), and
sysupgrade looks for it beside the plain one (firmware#2743).
@qodo-free-for-open-source-projects

Copy link
Copy Markdown

PR Summary by Qodo

Build split NOR firmware for the Baolian 11R6W25-HX20Y

🐞 Bug fix ⚙️ Configuration changes 🕐 10-20 Minutes

Grey Divider

AI Description

• Enable the split NOR image required to upgrade this camera from its current layout.
• Enable kernel partition splitting so the combined firmware image can boot; retain the legacy
 fixed-slot package.
Diagram

graph TD
  A["Device defconfig"] --> B["Post-image script"] --> C["firmware.bin"] --> D["Split package"] --> E["Flash firmware"] --> F["MTD splitter"] --> G["Root filesystem"]
  H["Kernel config"] --> F
Loading
High-Level Assessment

Use the existing split NOR post-image script and MTD options in this device profile. This matches the established image layout without changing shared profiles or upgrade infrastructure; hardware installation and boot verification are the remaining checks.

Files changed (2) +7 / -0

Bug fix (1) +5 / -0
hi3518ev200.generic.configEnable kernel support for the split firmware partition +5/-0

Enable kernel support for the split firmware partition

• Enables MTD splitting of the firmware partition into uImage and squashfs sections and allows the discovered root filesystem to serve as the root device.

devices/hi3518ev200_lite_baolian-11r6w25-hx20y/br-ext-chip-hisilicon/board/hi3516cv200/hi3518ev200.generic.config

Other (1) +2 / -0
hi3518ev200_lite_baolian-11r6w25-hx20y_defconfigGenerate split NOR firmware while retaining fixed-slot packaging +2/-0

Generate split NOR firmware while retaining fixed-slot packaging

• Selects the existing split post-image script so the build produces a combined firmware image and split package. Keeps fixed-slot package generation enabled for older upgrade paths.

devices/hi3518ev200_lite_baolian-11r6w25-hx20y/br-ext-chip-hisilicon/configs/hi3518ev200_lite_baolian-11r6w25-hx20y_defconfig

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

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Tip of the day
💡 Did you know, you can copy the agent prompt from any finding and feed it to your IDE agent

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

@openipc-ai
openipc-ai merged commit b8996c2 into master Nov 2, 2026
7 checks passed
@openipc-ai
openipc-ai deleted the baolian-split-nor branch November 2, 2026 09:50
openipc-ai added a commit that referenced this pull request Nov 2, 2026
…ery device (#222)

Since OpenIPC/firmware#2668 the generic hi3516cv200_lite, hi3518ev200_lite,
hi3518ev200_ultimate and gk7201v200_lite images use the split NOR layout:
uImage and squashfs in one "firmware" partition the kernel divides at
boot. A camera on that layout takes only a -split package; offered a
device's plain one, sysupgrade refuses ("This camera runs the split NOR
layout ... Nothing was written"), which is how the #2675 camera met it
(fixed for its own device in #221).

None of the eleven devices built on those four profiles had the split
layout. Each gets what #221 gave the Baolian and firmware#2668 gave the
profiles: the post-image script and BR2_OPENIPC_NOR_FIXED_PACKAGE in the
defconfig, and, for the four that ship their own kernel config (trassir,
lenovo-snowman lite and ultimate, vstarcam), CONFIG_MTD_SPLIT_* with
CONFIG_MTD_ROOTFS_ROOT_DEV; the other seven take firmware's, which has
them. The fixed-slot package is still made while it fits, and a
NOR+NAND ultimate still packages its NAND image either way. The workflow
publishes <device>-nor-split.tgz (#220); sysupgrade finds it beside the
plain one (firmware#2743).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant