Skip to content

agent: add gk7605v100 - #143

Merged
widgetii merged 2 commits into
masterfrom
gk7605v100-agent
Oct 2, 2026
Merged

widgetii merged 2 commits into
masterfrom
gk7605v100-agent

Conversation

@widgetii

@widgetii widgetii commented Oct 2, 2026

Copy link
Copy Markdown
Member

Flash-agent support for gk7605v100, which shares the gk7205v200 memory map. Its kernel DTS differs from gk7205v200's only by two extra GPIO banks; UART, FMC, CRG, sysctrl and watchdog are at the same addresses.

  • agent/Makefile: gk7605v100 stanza (same as gk7205v300's), added to the supported list
  • src/defib/agent/client.py: gk7605v100 → gk7205v200 in _CHIP_TO_AGENT
  • agent/README.md, CLAUDE.md: SoC table and counts (11 agent SoCs, 113 profiles after gk7605v100: add bootrom profile #142)

Verification

  • make -C agent test HOST_CC=gcc: 5412/5412; make -C agent SOC=gk7605v100 builds (18008 B)
  • pytest 903 passed / 3 skipped, ruff and mypy clean, node 86/86

On hardware (gk7605v100, 256M, 8MB FM25Q64 NOR):

  • defib agent upload -c gk7605v100: bootrom → SPL → agent → READY
  • defib agent info: JEDEC a14017, 8192 KB, 64 KB sectors, agent v4
  • defib agent read: full 8 MiB in 94 s (89 KB/s), CRC32 OK. Byte-identical to an independent U-Boot sf read/tftpput backup over boot+env, and to the lite release uImage/rootfs.squashfs over kernel/rootfs.

Write paths (agent write/flash) were not exercised on this board.

gk7605v100 shares the gk7205v200 memory map: the kernel device trees for
the two differ only by two extra GPIO banks, with UART0 at 0x12040000,
FMC at 0x10000000 (window 0x14000000), CRG 0x12010000, sysctrl
0x12020000 and the watchdog at 0x12030000 on both. It gets its own
Makefile stanza, like gk7205v300, so `make SOC=gk7605v100` works, and it
maps to the gk7205v200 build in _CHIP_TO_AGENT.

The board has 256M of DDR, but the agent only maps the first 128 MiB from
RAM_BASE. That is enough for every staging buffer it uses.

Verified on a gk7605v100 board (sc2239, 256M, 8MB FM25Q64 NOR):

  make -C agent SOC=gk7605v100      # 18008 bytes
  defib agent upload -c gk7605v100 -p /dev/ttyUSB0
  defib agent info   -p /dev/ttyUSB0
  defib agent read   -p /dev/ttyUSB0 -o dump.bin

Upload went through the boot ROM with the full U-Boot as SPL (boundary
auto-detected) and reached READY. info reported JEDEC a14017, 8192 KB,
64 KB sectors, agent v4 with flash_stream/set_baud/scan/membw
capabilities. The full 8 MiB read took 94 s at 89 KB/s, CRC32 OK. The
dump is byte-identical to an independent U-Boot `sf read` + tftpput
backup over boot+env, and to the OpenIPC lite release uImage and
rootfs.squashfs over the kernel and rootfs partitions. Write paths were
not exercised on this board.
@qodo-free-for-open-source-projects

Copy link
Copy Markdown

PR Summary by Qodo

Add gk7605v100 flash-agent support

✨ Enhancement 📝 Documentation 🕐 10-20 Minutes

Grey Divider

AI Description

• Enable gk7605v100 agent builds using its shared gk7205v200 memory map.
• Route gk7605v100 uploads to the compatible gk7205v200 agent binary.
• Document the supported SoC; hardware upload, info, and full-flash read passed, but writes remain
 untested.
Diagram

graph TD
  CLI["Agent CLI"] --> MAP["Chip mapping"] --> BIN["Compatible agent"] --> HW["gk7605v100 hardware"]
  BUILD["SoC build settings"] --> BIN
Loading
High-Level Assessment

Reuse the gk7205v200 agent for CLI selection while retaining a named gk7605v100 build target. This follows the existing shared-memory-map pattern without introducing duplicate agent code; write-path verification remains a separate hardware follow-up.

Files changed (4) +16 / -4

Enhancement (2) +12 / -1
MakefileAdd a gk7605v100 build target +11/-1

Add a gk7605v100 build target

• Adds a dedicated SoC stanza with the same UART, FMC, RAM, watchdog, clock, and reboot settings as gk7205v200. Includes gk7605v100 in the supported-target error message.

agent/Makefile

client.pyResolve gk7605v100 to the gk7205v200 agent +1/-0

Resolve gk7605v100 to the gk7205v200 agent

• Adds a chip-to-agent mapping so CLI operations can find the compatible gk7205v200 binary for gk7605v100.

src/defib/agent/client.py

Documentation (2) +4 / -3
CLAUDE.mdRefresh documented SoC and profile counts +3/-3

Refresh documented SoC and profile counts

• Changes the documented flash-agent count from 10 to 11, including the all-socs command note. Also changes the documented profile count from 112 to 113.

CLAUDE.md

README.mdList gk7605v100 agent addresses +1/-0

List gk7605v100 agent addresses

• Adds gk7605v100 to the supported-SoC table with its UART, flash, RAM, and agent load addresses.

agent/README.md

@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 show, collapse, or hide each part of a finding: code, evidence, and all

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

The Profiles section now says 113 after the gk7605v100 profile; the
protocol section still said 112.
@widgetii
widgetii merged commit 6c3e292 into master Oct 2, 2026
13 checks passed
@widgetii
widgetii deleted the gk7605v100-agent branch October 2, 2026 08:23
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