Skip to content

install: gk7201v200 installs its own U-Boot and firmware, on the split layout - #164

Merged
widgetii merged 1 commit into
masterfrom
install/split-gk7201v200-cv200
Oct 24, 2026
Merged

widgetii merged 1 commit into
masterfrom
install/split-gk7201v200-cv200

Conversation

@widgetii

Copy link
Copy Markdown
Member

CHIP_TO_FIRMWARE has mapped gk7201v200 to gk7205v200 since #4, when gk7201v200 had nothing published of its own. So defib install -c gk7201v200 wrote gk7205v200's U-Boot and firmware onto it.

OpenIPC now publishes gk7201v200's own builds:

This PR:

Not in this PR: hi3516cv200 and hi3518ev200 also ship -split since OpenIPC/firmware#2668, but defib keeps installing them on fixed slots for now.

  • Today defib gives them the old -universal U-Boot. Its default environment describes the lite fixed slots, so installing the split layout with it would break the hi3518ev200 ultimate fixed-slot install.
  • Moving them to the scanning -nor.bin U-Boot, as install: the split NOR layout for hi3516cv300 and hi3516ev100 #158 did for hi3516cv300, needs a NAND U-Boot build for hi3518ev200's NAND package and a decision on its DDR3 boards. Neither exists yet.

Tests: test_gk7201v200_installs_its_own_build checks there's no alias, that gk7201v200 uses its own NOR/NAND U-Boot names, that it's split-capable, and that it has its own package board. The per-flash-type U-Boot list includes it too. pytest, ruff and mypy are clean.

The firmware side was checked in qemu-hisilicon (gk7201v200, 8 MB; see OpenIPC/firmware#2668). Not run on hardware.

…t layout

CHIP_TO_FIRMWARE mapped gk7201v200 to gk7205v200 since #4, when it had
nothing published of its own, so install wrote gk7205v200's U-Boot and
firmware onto it. OpenIPC now publishes u-boot-gk7201v200-nor.bin and
-nand.bin (OpenIPC/u-boot, xm72010200) and openipc.gk7201v200-nor-lite.tgz,
built on the gk7205v500 kernel tree with gk7201v200's own vendor modules
(OpenIPC/firmware#2478). The alias is dropped: gk7201v200 takes its
-nor/-nand U-Boot (PER_FLASH_TYPE_UBOOT) and its own firmware.

It also joins NOR_SPLIT_SOCS. Its kernel finds the split layout since
OpenIPC/linux#140, its U-Boot scans it since OpenIPC/u-boot#61, and its
firmware ships the -split package beside the fixed-slot one since
OpenIPC/firmware#2668.

gk7201v300 keeps its alias: it has U-Boot builds of its own but no
firmware package.

Tests: test_gk7201v200_installs_its_own_build (no alias, its own nor/nand
U-Boot names, split, its own package board) and the per-flash-type U-Boot
list. pytest (1087 passed), ruff and mypy clean.

The firmware side was checked in qemu-hisilicon (gk7201v200, 8 MB;
OpenIPC/firmware#2668). Not run on hardware.
@qodo-free-for-open-source-projects

Copy link
Copy Markdown

PR Summary by Qodo

Install gk7201v200’s own U-Boot and split NOR firmware

✨ Enhancement 🧪 Tests 🕐 10-20 Minutes

Grey Divider

AI Description

• Replace the gk7205v200 alias with gk7201v200’s own firmware and flash-specific U-Boot builds.
• Enable split NOR installation for gk7201v200 without changing gk7201v300.
• Add tests for artifact names, package-board matching, and split-layout support.
Diagram

graph TD
  A["gk7201v200 install"] --> B["Own chip identity"] --> C{"Flash type"}
  C -->|NOR| D["NOR U-Boot"] --> E["Split package"]
  C -->|NAND| F["NAND U-Boot"] --> G["Own board match"]
Loading
High-Level Assessment

Using the existing per-flash U-Boot and split-layout registries is the appropriate approach. Retaining the alias or adding a gk7201v200-specific installer branch would either select the wrong artifacts or duplicate established resolution logic.

Files changed (5) +27 / -8

Enhancement (1) +2 / -2
firmware.pyResolve gk7201v200 to its own builds +2/-2

Resolve gk7201v200 to its own builds

• Removes its gk7205v200 alias, enables NOR/NAND-specific U-Boot names, and marks its package board as split-NOR-capable. The gk7201v300 alias remains unchanged.

src/defib/firmware.py

Tests (2) +21 / -2
test_firmware.pyCover gk7201v200 in per-flash U-Boot tests +1/-1

Cover gk7201v200 in per-flash U-Boot tests

• Adds gk7201v200 to the parameterized list that checks published NOR and NAND artifact names and related firmware resolution.

tests/test_firmware.py

test_install_nor_split.pyVerify gk7201v200 identity and split support +20/-1

Verify gk7201v200 identity and split support

• Adds assertions that gk7201v200 has no alias, uses its own package board and U-Boot names, and supports split NOR. Moves the existing aliased-NAND assertion to gk7205v210.

tests/test_install_nor_split.py

Documentation (2) +4 / -4
CLAUDE.mdDocument gk7201v200 artifact and split-layout support +2/-2

Document gk7201v200 artifact and split-layout support

• Adds gk7201v200 to the documented per-flash U-Boot and split NOR chip lists.

CLAUDE.md

layout.pyCorrect package-lookup alias examples +2/-2

Correct package-lookup alias examples

• Replaces gk7201v200 in the NAND and split NOR lookup docstrings with chips that remain aliased.

src/defib/install/layout.py

@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 (1) 📘 Rule violations (0) 📎 Requirement gaps (0) 🎨 UX issues (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (0)

Grey Divider


Action required

1. Existing NAND packages are rejected 🐞 Bug ≡ Correctness
Description
Removing the gk7201v200 alias makes ubi_nand_boards() accept only rootfs.ubi.gk7201v200,
rather than also accepting the previously supported rootfs.ubi.gk7205v200. When a user installs
the gk7205v200 NAND archive that this chip previously accepted, load_firmware_bundle() rejects it
before flashing, while the PR identifies only a new NOR firmware package.
Code

src/defib/firmware.py[146]

-    "gk7201v200": "gk7205v200",
Evidence
The deleted alias supplied the published board name to ubi_nand_boards(), and the removed test
explicitly asserted that this NAND board name was accepted. The NAND install passes that set to the
bundle loader, which rejects any other rootfs.ubi suffix. The replacement test now asserts a set
containing only gk7201v200.

src/defib/install/layout.py[65-75]
src/defib/install/orchestrator.py[234-249]
src/defib/install/firmware.py[147-177]
tests/test_install_nor_split.py[306-327]

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

## Issue description
Removing the gk7201v200 alias also removes acceptance of its previously supported gk7205v200 NAND firmware archive. The newly identified gk7201v200 firmware package is NOR-only.
## Fix Focus Areas
- src/defib/firmware.py[143-149]
- src/defib/install/layout.py[65-75]
- tests/test_install_nor_split.py[306-329]
## Recommended Fix
Keep native gk7201v200 U-Boot and NOR package selection, but preserve acceptance of the gk7205v200 NAND package for gk7201v200 unless a replacement NAND package is confirmed. Add a NAND-package validation test covering the supported archive.

ⓘ 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

Comment thread src/defib/firmware.py
@widgetii
widgetii merged commit 78daf34 into master Oct 24, 2026
13 checks passed
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