Skip to content

gk710x: images in CPU order; how to make a programmer image - #49

Merged
dimerr merged 1 commit into
openipcfrom
docs/gk710x-cpu-order
Oct 22, 2026
Merged

dimerr merged 1 commit into
openipcfrom
docs/gk710x-cpu-order

Conversation

@dimerr

@dimerr dimerr commented Oct 22, 2026

Copy link
Copy Markdown
Collaborator

Goes with the openipc-gk710x PR from gk710x/cpu-order. That branch now publishes u-boot-<soc>-nor.bin in CPU order, like OpenIPC's uImage and rootfs.

  • README, gk710x section:
    • why a programmer needs the whole flash image word-swapped: concatenating the files as they are leaves the kernel and rootfs unswapped on the chip, which is what a GK7102C camera's dump shows;
    • bash recipes: U-Boot alone, a full 8 MiB image laid out with dd then objcopy --reverse-bytes=4 (or perl), and a dump back to normal order;
    • updated status: U-Boot has started on GK7102C cameras, and recovery works from an SD card.
  • build-gk710x.yml: comments only. The smoke step already swaps a CPU-order image into chip order for qemu's flash file.

The recipe was run as written: the results equal the files laid out and word-swapped, and perl matches objcopy byte for byte.

openipc-gk710x now publishes u-boot-<soc>-nor.bin in CPU order, like
OpenIPC's uImage and rootfs, so all three load by tftp, mmc or usb and go
on with sf write. README: why a programmer needs the whole flash image
word-swapped and how to make one with dd + objcopy --reverse-bytes=4 (or
perl), and a dump back; U-Boot has started on GK7102C cameras; SD
recovery. build-gk710x.yml's smoke step already swaps a CPU-order image
into chip order for qemu's flash file; its comments say so now.

The README recipe, run as it is: the 8 MiB programmer image equals the
three files laid out and word-swapped, U-Boot alone and the dump round
trip likewise, and perl gives the same bytes as objcopy.
@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 ask Qodo to dismiss a finding you disagree with, with your reason on record

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

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

Copy link
Copy Markdown

PR Summary by Qodo

Document GK710x CPU-order images and programmer image creation

📝 Documentation 🕐 Less than 10 minutes

Grey Divider

AI Description

• Clarifies that GK710x release images use CPU byte order for loading and sf write.
Diagram

graph TD
  CPU["CPU-order files"] --> Layout["Offset layout"] --> Swap["Word reversal"] --> Flash[("Programmer flash")] --> Restore["Dump reversal"] --> Normal["Normal dump"]
  CPU --> CI["Smoke conversion"] --> QEMU[("QEMU flash")]
Loading
High-Level Assessment

Keep the whole-image reversal recipe: it accounts for every flash region, including gaps, and makes the distinction between CPU-order release files and chip-order programmer images explicit. Swapping individual files before concatenation is easier to get wrong; the documented Perl fallback already covers systems without binutils.

Files changed (2) +42 / -14

Documentation (2) +42 / -14
build-gk710x.ymlClarify byte order in QEMU smoke-test comments +5/-5

Clarify byte order in QEMU smoke-test comments

• Corrects comments to describe current images as CPU-order and older images as chip-order. Rewords the existing conversion log message; the smoke-test behavior is unchanged.

.github/workflows/build-gk710x.yml

README.mdExplain GK710x programmer images and recovery status +37/-9

Explain GK710x programmer images and recovery status

• Documents CPU-order release images and why a direct programmer needs the entire offset-laid-out flash image word-reversed. Adds U-Boot-only, full-flash, Perl fallback and dump-conversion recipes, and updates GK7102C boot and SD-recovery status.

README.md

@dimerr
dimerr merged commit e8ee9a7 into openipc Oct 22, 2026
84 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