Skip to content

Wizard: the GK7205V200 family on OpenIPC/u-boot, and the split NOR layout - #482

Merged
widgetii merged 2 commits into
masterfrom
wizard/nor-split
Oct 17, 2026
Merged

widgetii merged 2 commits into
masterfrom
wizard/nor-split

Conversation

@widgetii

Copy link
Copy Markdown
Member

Bootloader

GK7202V300, GK7205V200, GK7205V210, GK7205V300 and GK7605V100 now install OpenIPC/u-boot's u-boot-<soc>-nor.bin (OpenIPC/u-boot#18, #19; published in latest). It replaces the -universal.bin from the retired u-boot-gk7205v200 repository. That bootloader scans the NOR layout at boot, so these SoCs take the #477 install: each image written at its offset, no uknor/urnor macros, no sf lock.

Split NOR layout

The same bootloader boots the split NOR layout (OpenIPC/linux#96, OpenIPC/firmware#2617, #2621). That layout is one firmware.bin at 0x50000, which the kernel divides into kernel, rootfs and rootfs_data at boot. The firmware publishes it as openipc.<board>-nor-<edition>-split.tgz, beside the fixed-slot package. The 2026-10-17 nightly is the first one with it.

The catalogue marks these SoCs nor_split. The install steps now depend on whether the -split package is published for the board and edition:

  • Published: the Linux step writes the one image at 0x50000 and erases to the end of the chip, in one guarded line, and the page links the -split package:
    tftpboot 0x42000000 firmware.bin.gk7205v300 && sf erase 0x50000 0xfb0000 && sf write 0x42000000 0x50000 ${filesize}
    
  • Not published: the two-image install stays.

The full image and the backup/restore steps are unchanged; the bootloader also boots the fixed slots that the full image carries. The frontend needs no change. The page's text ("download the firmware bundle and unpack it into your TFTP root") holds for both packages.

Tests

  • The fixture index gains the four published u-boot-<soc>-nor.bin, so the availability reference stands.
  • boards.json and the documents golden are regenerated for the five SoCs.
  • TestSplitNORInstall covers:
    • the split lines on 8 MB and 16 MB;
    • gk7205v210 through its gk7205v200 build;
    • the SD path;
    • falling back when no -split package is published.
  • service/run.sh test passes.

Verified on hardware

The same writes, made from the U-Boot console on the lab GK7205V200 (8 MB) and GK7205V300 (16 MB) with the published bootloaders, boot with the FIT hashes checked, and kernel, rootfs and rootfs_data where the image puts them.

After merge it needs a dev.openipc.org check before prod. It's a Go service change only, so no static bundle.

…yout

GK7202V300, GK7205V200, GK7205V210, GK7205V300 and GK7605V100 now install
OpenIPC/u-boot's u-boot-<soc>-nor.bin (OpenIPC/u-boot#18, #19), published
in latest, in place of the -universal.bin of the retired u-boot-gk7205v200
repository. That bootloader scans the NOR layout at boot, so these SoCs
take the #477 install: each image written at its offset, no uknor/urnor
macros, no sf lock.

The same bootloader boots the split NOR layout (OpenIPC/linux#96,
OpenIPC/firmware#2617, #2621): one firmware.bin -- a hashed FIT, then the
squashfs at the next 64 KiB -- at 0x50000, which the kernel divides into
kernel, rootfs and rootfs_data at boot. Their firmware publishes it as
openipc.<board>-nor-<edition>-split.tgz beside the fixed-slot package.
The catalogue marks these SoCs nor_split; where the -split package is
published for the board and edition, the Linux step writes that one
image at 0x50000 and erases to the end of the chip in the same guarded
line (0x7b0000 on 8 MB, 0xfb0000 on 16 MB), and the page links the
-split package. Where it is not, the two-image install stays. The full
image and the backup/restore steps are unchanged: the bootloader boots
the fixed slots the full image carries.

The fixture index gains the four published u-boot-<soc>-nor.bin, so the
availability reference stands; boards.json and the documents golden are
regenerated for the five SoCs. TestSplitNORInstall covers the split
lines, gk7205v210 through its gk7205v200 build, the SD path, and the
fall-back when no -split package is published.

The split install was verified on the lab GK7205V200 (8 MB) and GK7205V300
(16 MB) with these bootloaders and the 2026-10-17 nightly's images, by
the same U-Boot write: boots with the FIT hashes checked and kernel,
rootfs and rootfs_data where the image puts them.
@qodo-free-for-open-source-projects

Copy link
Copy Markdown

PR Summary by Qodo

Support OpenIPC NOR bootloaders and split firmware installs for Goke SoCs

✨ Enhancement ⚙️ Configuration changes 🧪 Tests 🕐 20-40 Minutes

Grey Divider

AI Description

• Switch five Goke SoCs to OpenIPC’s layout-scanning NOR bootloaders.
• Use split NOR packages when published; otherwise retain the two-image install.
• Cover flash sizes, shared board builds, SD installs, and fallback behavior.
Diagram

graph TD
  C["SoC catalogue"] --> E["Wizard exporter"] --> Q{"Split available?"} -->|yes| S["Single image flash"] --> O["Wizard page"]
  I["Release index"] --> E
  Q -->|no| F["Two image flash"] --> O
Loading
High-Level Assessment

Keep package selection conditional on both SoC support and publication for the board and edition. Always selecting split packages would break unpublished combinations; retaining only fixed-slot installs would forgo the new layout. The existing two-image path remains the appropriate fallback.

Files changed (9) +180 / -16

Enhancement (4) +49 / -1
catalogue.goExpose split-NOR capability in the SoC model +7/-1

Expose split-NOR capability in the SoC model

• Adds a YAML-backed NORSplit flag so wizard generation can distinguish eligible SoCs.

service/internal/catalogue/catalogue.go

camera.goRepresent split installs and their package and erase range +24/-0

Represent split installs and their package and erase range

• Adds split-package naming and selects it for split installs. Computes the NOR erase range from offset 0x50000 to the chip’s end.

service/internal/wizard/camera.go

export.goEnable split installs only for published packages +1/-0

Enable split installs only for published packages

• Sets split mode only when the SoC supports it, its bootloader scans NOR, and the board-and-edition split package is published.

service/internal/wizard/export.go

lines.goGenerate guarded single-image NOR flash commands +17/-0

Generate guarded single-image NOR flash commands

• Adds a split-install Linux step that loads firmware.bin, erases through the chip’s end, and writes at 0x50000 in one guarded command. Supports TFTP and SD while leaving the two-image path intact.

service/internal/wizard/lines.go

Tests (4) +121 / -10
boards.jsonRefresh expected Goke board bootloader names +5/-5

Refresh expected Goke board bootloader names

• Regenerates five board fixture entries with their NOR bootloader filenames, including the shared GK7205V200 build.

service/internal/firmware/testdata/boards.json

release-index.jsonAdd published NOR bootloaders to the fixture index +24/-0

Add published NOR bootloaders to the fixture index

• Adds four distinct NOR bootloader assets with release, size, digest, and timestamp metadata. These cover the five affected SoCs because GK7205V210 shares a build.

service/internal/firmware/testdata/release-index.json

documents.jsonRefresh wizard document golden hashes +5/-5

Refresh wizard document golden hashes

• Regenerates expected document hashes for the five affected Goke SoCs.

service/internal/wizard/testdata/documents.json

wizard_test.goTest split-NOR selection and flash commands +87/-0

Test split-NOR selection and flash commands

• Tests 8 MB and 16 MB erase ranges, shared board naming, SD loading, and fallback when a split package is unpublished. Checks that split commands omit separate kernel and rootfs writes and legacy bootloader operations.

service/internal/wizard/wizard_test.go

Other (1) +10 / -5
goke.ymlSelect OpenIPC NOR bootloaders for five Goke SoCs +10/-5

Select OpenIPC NOR bootloaders for five Goke SoCs

• Replaces retired universal bootloader filenames with published NOR builds and marks each SoC as split-NOR capable. GK7205V210 continues to use the GK7205V200 bootloader build.

data/catalogue/goke.yml

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

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

Copy link
Copy Markdown

Code Review by Qodo

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

Grey Divider


Action required

1. NAND users receive a NOR bootloader ✓ Resolved
Description
SoC.Bootloader("nand") falls back to UBootFilename, so changing the Goke entries to *-nor.bin
also changes the bootloader selected for their NAND installs and full images. When a user selects
NAND for any of these SoCs, the wizard's NAND flash command writes that NOR-named asset, and the
full-image builder selects the same asset instead of the former universal bootloader.
Code

data/catalogue/goke.yml[146]

+  uboot_filename: u-boot-gk7205v200-nor.bin
Evidence
None of the changed Goke entries supplies a NAND-specific filename. The catalogue fallback
consequently returns the newly selected NOR asset for NAND; the wizard uses that result in its NAND
erase/write command, and the full-image specification uses it for image assembly.

data/catalogue/goke.yml[141-149]
service/internal/catalogue/catalogue.go[110-121]
service/internal/wizard/camera.go[89-101]
service/internal/wizard/lines.go[275-287]
service/internal/firmware/layout.go[178-180]
service/internal/firmware/build.go[82-104]

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 five changed Goke catalogue entries now select a NOR-specific bootloader for NAND installs and NAND full images because `SoC.Bootloader` defaults to `UBootFilename`. Preserve the previous NAND bootloader choice without inadvertently enabling the distinct UBI-only NAND layout.
## Fix Focus Areas
- data/catalogue/goke.yml[131-177]
- data/catalogue/goke.yml[321-322]
- service/internal/catalogue/catalogue.go[17-40]
- service/internal/catalogue/catalogue.go[110-121]
## Recommended Fix
Represent the NAND bootloader choice independently of the flag that enables the UBI-only layout, set the affected Goke NAND choices to their former universal assets, and verify both NAND installation commands and NAND full-image inputs.

ⓘ 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 see how risky a PR is at a glance with blast radius labels

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

Comment thread data/catalogue/goke.yml
…nand.bin

Review of the previous commit: Bootloader("nand") falls back to
uboot_filename, so moving these SoCs to u-boot-<soc>-nor.bin handed that
NOR build to NAND installs and NAND full images.

OpenIPC/u-boot publishes a NAND build for each of them too,
u-boot-<soc>-nand.bin in latest, and that build is the UBI-only layout
(768k boot, 256k env, the rest one UBI device), the same as u-boot-xmedia's.
So the catalogue names it as uboot_nand_filename, which is what moves a
SoC's NAND installs onto that layout; defib (OpenIPC/defib#154) installs
these SoCs on NAND the same way. The retired -universal.bin, and its split
NAND layout, is not offered for them again.

The fixture index gains the four published -nand.bin. boards.json carries
them; the gk7202v300 NAND row of the image reference is dropped, since it
is the split NAND layout this SoC no longer installs (hi3516av100's row
still covers that layout). The documents golden is regenerated.
@widgetii
widgetii merged commit b099439 into master Oct 17, 2026
2 checks passed
@widgetii
widgetii deleted the wizard/nor-split branch October 17, 2026 20:09
widgetii added a commit to OpenIPC/wiki that referenced this pull request Oct 18, 2026
…too (#606)

openipc.org now installs the GK7205V200 family with the u-boot-<soc>-nor.bin
bootloader and, where the -split package is published for the edition,
writes firmware.bin at 0x50000 with the rest of the chip erased
(OpenIPC/website#482, deployed). Builder's FPV editions publish no -split
package and keep the two-image install.
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