Skip to content

gk7205v500: the split NOR image, as on the gk7205v200 family - #2658

Merged
widgetii merged 1 commit into
masterfrom
split/gk7205v500
Oct 22, 2026
Merged

widgetii merged 1 commit into
masterfrom
split/gk7205v500

Conversation

@widgetii

@widgetii widgetii commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

The gk7205v500 lite rootfs is 5044K of its 5120K slot. The split layout lets kernel and rootfs share one budget.

  • gk7205v500_lite and _ultimate use general/scripts/post-image-split.sh with BR2_OPENIPC_NOR_FIXED_PACKAGE=y: the fixed-slot package as before, plus -split.
  • gk7205v500.generic.config turns on MTD_SPLIT_FIRMWARE (named "firmware"), MTD_SPLIT_UIMAGE_FW, MTD_SPLIT_SQUASHFS_ROOT and MTD_ROOTFS_ROOT_DEV (gk7205v500 family: the split NOR layout, from the device tree linux#137). Its U-Boot has the split mode since nor: split layout on the gk7205v500 family u-boot#52.
  • Only these two defconfigs use this kernel config, and both ship -split, so no fixed-only build gets a split-capable kernel. gk7201v200 has its own config and is unchanged.

Built locally:

  • gk7205v500_lite: uImage 1935K of 1983K, squashfs 5044K of 5120K, firmware.bin 7040K of 7616K; -lite.tgz and -lite-split.tgz.
  • gk7205v500_ultimate: uImage 1935K, squashfs 6528K, firmware.bin 8512K of 15808K; nor-ultimate, nor-ultimate-split and nand-ultimate (the same six files as on latest).

Tested in qemu-hisilicon (gk7205v500 machine), with lite and ultimate rebuilt on the merged kernel (OpenIPC/linux#137) and U-Boot rebuilt from the merged OpenIPC/u-boot#52 tree:

Run Flash U-Boot Result
lite split 8 MB new scan finds uImage at 0x50000, squashfs at 0x240000; sfc: split NOR layout, device tree partitions; firmware/kernel/rootfs/rootfs_data (0x730000); root on 31:4; login prompt
lite split, power-cycled 8 MB new second boot logs Seeding 2048 bits and crediting (the seed the first boot saved in the overlay); jffs2 overlay read from the host keeps .openipc-overlay, etc/fw_env.config, crond.reboot
lite split 8 MB published u-boot-gk7205v500-nor.bin root=/dev/mtdblock3 ignored, the flash names its own root; root on 31:4; login
ultimate split 16 MB new rootfs_data at 0x8a0000; root on 31:4; login; overlay kept across a power cycle (seed credited, same files)
ultimate split 16 MB published root= ignored; root on 31:4; login
lite fixed-slot → recovery 8 MB new fixed slots boot (cmdlinepart, root 31:3); run fwupd over TFTP fetches firmware.bin.gk7205v500 (7208960 bytes), erases 0x50000 to the end of the chip, writes it (byte-identical on flash); reboots split, root 31:4
ultimate fixed-slot → recovery 16 MB new same: 8716288 bytes, 16449536 bytes erased from 0x50000; reboots split, root 31:4, login

Not tested: sysupgrade inside Linux, because the console login stops at the Majestic EULA, and automation does not accept it. Not run on hardware. The kernel has 48K of headroom against the 1983K a fixed-slot package beside a split one may use; past that, gk7205v500 would go split-only like hi3516ev300.

The gk7205v500 lite rootfs is 5044K of its 5120K slot. Lite and
ultimate use general/scripts/post-image-split.sh with
BR2_OPENIPC_NOR_FIXED_PACKAGE=y: the fixed-slot package as before, plus
-split. gk7205v500.generic.config turns on MTD_SPLIT_FIRMWARE (named
"firmware"), MTD_SPLIT_UIMAGE_FW, MTD_SPLIT_SQUASHFS_ROOT and
MTD_ROOTFS_ROOT_DEV (OpenIPC/linux#137); its U-Boot has the
split mode since OpenIPC/u-boot#52. Only these two defconfigs use
this kernel config, and both ship -split, so no fixed-only build gets a
split-capable kernel. gk7201v200 has its own config and is unchanged.

Built locally with the kernel branch:
- gk7205v500_lite: uImage 1935K of 1983K, squashfs 5044K of 5120K,
  firmware.bin 7040K of 7616K; -lite.tgz and -lite-split.tgz.
- gk7205v500_ultimate: uImage 1935K, squashfs 6528K, firmware.bin 8512K
  of 15808K; nor-ultimate, nor-ultimate-split and nand-ultimate (the
  same six files as on latest).

Tested in qemu-hisilicon (gk7205v500 8 and 16 MB, gk7205v510/v530
16 MB): the split firmware.bin under the new U-Boot and under the
published u-boot-gk7205v500-nor.bin ("root=/dev/mtdblock3 ignored"),
root on 31:4, login, the overlay kept across a reset; the fixed-slot
package under both: root on 31:3. Not run on hardware.
@qodo-free-for-open-source-projects

Copy link
Copy Markdown

PR Summary by Qodo

Add split NOR images for gk7205v500 lite and ultimate

✨ Enhancement ⚙️ Configuration changes 🕐 10-20 Minutes

Grey Divider

AI Description

• Enable kernel detection of split firmware and automatic SquashFS root selection.
• Ship split NOR images alongside fixed-slot packages to preserve upgrade compatibility.
• Validate both layouts in QEMU; hardware testing remains outstanding.
Diagram

graph TD
  Configs["Lite and ultimate"] --> Script["Post-image script"] --> Image["Split firmware"] --> Splitter["Kernel MTD split"] --> Root["SquashFS root"]
  Configs --> Repack["NOR repack"] --> Fixed["Fixed package"]
  Image --> Repack
Loading
High-Level Assessment

Reuse the established split-image script and retain fixed-slot packages. A split-only release would lose compatibility with older upgrade flows, while remaining fixed-only would leave the lite rootfs close to its slot limit. The main remaining validation is on hardware.

Files changed (3) +9 / -0

Enhancement (3) +9 / -0
gk7205v500.generic.configEnable kernel partition discovery for split NOR firmware +5/-0

Enable kernel partition discovery for split NOR firmware

• Enables MTD splitting of the named firmware partition at its uImage and SquashFS boundaries. Also enables automatic selection of the discovered root filesystem as the root device.

br-ext-chip-goke/board/gk7205v500/gk7205v500.generic.config

gk7205v500_lite_defconfigProduce split and fixed-slot lite NOR packages +2/-0

Produce split and fixed-slot lite NOR packages

• Selects the shared split-image post-processing script and retains the fixed-slot package alongside the new split package for the 8 MB lite build.

br-ext-chip-goke/configs/gk7205v500_lite_defconfig

gk7205v500_ultimate_defconfigProduce split and fixed-slot ultimate NOR packages +2/-0

Produce split and fixed-slot ultimate NOR packages

• Selects the same split-image script and preserves fixed-slot NOR packaging for the 16 MB ultimate build. Its existing NAND packaging remains available.

br-ext-chip-goke/configs/gk7205v500_ultimate_defconfig

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

qodo-free-for-open-source-projects Bot commented Oct 22, 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. Split firmware has no hardware proof 📘 Rule violation ☼ Reliability
Description
The gk7205v500 split configuration changes the kernel partitioning and post-image layout for both
shipped variants without real-camera verification. The PR description reports only QEMU testing and
explicitly says it was not run on hardware, so boot and upgrade behaviour on affected cameras
remains unverified.
Code

br-ext-chip-goke/board/gk7205v500/gk7205v500.generic.config[R2873-2877]

+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
Evidence
The checklist requires real-camera evidence for any change that can alter firmware behaviour. These
changes enable split MTD partition handling in the kernel and select the split post-image script for
both shipped gk7205v500 variants, while the PR description states that testing was not run on
hardware.

Rule 3: Hardware evidence is present and honest
br-ext-chip-goke/board/gk7205v500/gk7205v500.generic.config[2873-2877]
br-ext-chip-goke/configs/gk7205v500_lite_defconfig[75-76]
br-ext-chip-goke/configs/gk7205v500_ultimate_defconfig[84-85]

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 new split firmware layout changes kernel and rootfs partition behaviour for gk7205v500 images, but the PR provides only QEMU results and states that hardware testing was not performed.
## Fix Focus Areas
- br-ext-chip-goke/board/gk7205v500/gk7205v500.generic.config[2873-2877]
- br-ext-chip-goke/configs/gk7205v500_lite_defconfig[75-76]
- br-ext-chip-goke/configs/gk7205v500_ultimate_defconfig[84-85]
## Recommended Fix
Test both lite and ultimate split images on the affected gk7205v500 hardware, recording boot, root filesystem selection, login, overlay persistence across reset, and upgrade or recovery behaviour. Add the affected board names and before/after observations to the PR description; if hardware is unavailable, do not claim hardware verification and provide the strongest applicable self-test evidence instead.

ⓘ 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 ask Qodo to dismiss a finding you disagree with, with your reason on record

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

@widgetii
widgetii merged commit 020f895 into master Oct 22, 2026
36 of 42 checks passed
@widgetii
widgetii deleted the split/gk7205v500 branch October 22, 2026 14:46
widgetii added a commit to OpenIPC/defib that referenced this pull request Oct 23, 2026
The gk7205v500 firmware now ships the split NOR package beside the
fixed-slot one (OpenIPC/firmware#2658). Its kernel (OpenIPC/linux#137)
and NOR U-Boot (OpenIPC/u-boot#52) both know the layout.

- `gk7205v500` joins `NOR_SPLIT_SOCS`, so `install` writes
`firmware.bin.gk7205v500` at 0x50000 and erases the rest of the chip.
- `FIRMWARE_PACKAGE_BOARD` maps gk7205v510/v530 to `gk7205v500`, the one
build the family installs, as NAND already does (`_UBI_NAND_BOARD`).
Each keeps its own `-nor` U-Boot. A fixed-slot package named for the
chip itself is still accepted.
- V500 boot-ROM recovery (`HiSiliconV500`) and the agent's donor are
unchanged.

Local: `pytest` (1084 passed), `ruff`, `mypy` clean.

Not run on hardware. The firmware side was checked in qemu-hisilicon
(see OpenIPC/firmware#2658): split boot under the new and the published
U-Boot, the overlay kept across a power cycle, and U-Boot recovery from
a fixed-slot install to the split image. qemu-hisilicon does not emulate
the V500 boot ROM, so `defib install` itself was not run against it.
widgetii added a commit to OpenIPC/website that referenced this pull request Oct 23, 2026
gk7205v500 ships the split NOR package beside the fixed-slot one since
OpenIPC/firmware#2658, on a kernel (OpenIPC/linux#137) and a -nor U-Boot
(OpenIPC/u-boot#52) that scan the layout. nor_split on gk7205v500,
gk7205v510 and gk7205v530 lets the wizard give the split install where
the -split package is published, as on the gk7205v200 family.

gk7205v510 installs the gk7205v500 build on NOR too, as defib does since
OpenIPC/defib#163 and as gk7205v530 already did here. Its own
openipc.gk7205v510-nor-lite.tgz dates from 2026-10-02 and has no
defconfig behind it any more. Without the move, deleting that stale
asset from the release would leave v510 with no NOR download. v510 keeps
its own -nor and -nand U-Boot. nand_board, which only v510 used, has no
user now; the field stays.

Tests: the fixture index loses the v510 package and gains the two
gk7205v500 -split packages (sizes and digests from the latest release).
boards.json moves v510 to the gk7205v500 build. The nand_board wizard
test becomes TestV510InstallsTheV500Build: v510's NOR and NAND
installs use the gk7205v500 build, and NOR uses the split
firmware.bin.gk7205v500. The golden is regenerated for the three V500
SoCs. go test ./... (uncached) passes.
widgetii added a commit to OpenIPC/wiki that referenced this pull request Oct 23, 2026
* nor-split: the Hi3516EV200 family, Hi3516EV300 split-only

- nor-split-layout: Hi3516EV200, Hi3518EV300 and Hi3516DV200 ship the
  split package beside the fixed-slot one (OpenIPC/firmware#2655, on
  OpenIPC/linux#131 and OpenIPC/u-boot#48); Hi3516EV300 lite and
  ultimate ship the split package only, its kernel filling the 2 MiB
  kernel slot (neo keeps fixed slots). Going back to fixed slots lists
  them accordingly.
- sysupgrade: `sysupgrade -k -r` installs the split layout on them.

Checked in qemu-hisilicon (hi3516ev200, hi3518ev300, hi3516ev300; 8 and
16 MB). Not run on hardware.

* nor-split: the GK7205V500 family

GK7205V500 ships the split package beside the fixed-slot one
(OpenIPC/firmware#2658, on OpenIPC/linux#137 and OpenIPC/u-boot#52).
GK7205V510 and GK7205V530 install that one gk7205v500 build, as defib
(OpenIPC/defib#163) and the site's installer do. Each keeps its own
u-boot-<soc>-nor.bin. sysupgrade -k -r takes the split package on them
too, and they go back to fixed slots the same way.

Checked in qemu-hisilicon (gk7205v500 8 and 16 MB, gk7205v510/v530
16 MB). Not run on hardware.

* sysupgrade: the split list is for NOR cameras, and Hi3516EV300 lite and ultimate

From review: the list of SoCs whose sysupgrade -k -r installs the split
package now says it is about NOR flash, and points NAND cameras to their
own layout page. Hi3516EV300 is listed for lite and ultimate only: neo
keeps fixed slots, as the layout page says.
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