Repository navigation
ci: build, smoke-test and release the Goke GK7101/GK7102 U-Boot - #21
Conversation
build-gk710x.yml is build-xm.yml for the openipc-gk710x branch: resolve -> build (gk7101, gk7102) + qemu -> qemu_smoke -> release (gk710x tag) / publish (OpenIPC/firmware latest, openipc.org). NOR only, 256 KiB boot partition including the boot ROM header. The smoke test boots each image from an 8 MiB flash image twice on qemu-hisilicon's goke machines; the second boot must load the environment the first saved. The flash file is written byte-swapped per 32-bit word, as the chip holds it. README and CLAUDE.md describe the family and the workflow. openipc.org must allowlist build-gk710x.yml before the first publish. The smoke step was run locally against both images with qemu-hisilicon master: PASS for gk7101 and gk7102.
PR Summary by QodoBuild, smoke-test, and release GK7101/GK7102 U-Boot
AI Description
Diagram
High-Level Assessment
Files changed (3)
|
Code Review by Qodo
1. Vendor builds fail in the CI environment
|
| - name: Install dependencies | ||
| timeout-minutes: 15 | ||
| run: | | ||
| # apt mirrors on hosted runners intermittently HANG on the | ||
| # mirrorlist fetch (not just fail). Bound each attempt with its own | ||
| # `timeout` so a hang is killed fast and the retry actually fires. | ||
| install() { | ||
| sudo timeout 180 apt-get update && \ | ||
| sudo timeout 240 apt-get install -y --no-install-recommends \ | ||
| build-essential gcc-arm-linux-gnueabi device-tree-compiler \ | ||
| bison flex bc libssl-dev python3 |
There was a problem hiding this comment.
1. Vendor builds fail in the ci environment 📘 Rule violation ☼ Reliability
The build leg installs only a subset of the required tools and never changes /bin/sh to bash. When vendor recipes require pycryptodome, u-boot-tools, lzop, or bash-specific /bin/sh behavior, the build can fail before producing its boot image.
Agent Prompt
## Issue description
The GK710x build leg does not install `u-boot-tools` or `lzop`, does not install `pycryptodome`, and does not point `/bin/sh` to bash as required by the vendor build recipes.
## Fix Focus Areas
- .github/workflows/build-gk710x.yml[75-85]
## Recommended Fix
Match the established build dependency setup by installing `u-boot-tools` and `lzop`, installing `pycryptodome` with pip, and creating the `/bin/sh` symlink to `/bin/bash` before invoking `build.sh`.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
| # Build qemu-system-arm once and share it with every smoke leg. | ||
| qemu: | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 45 | ||
| steps: |
There was a problem hiding this comment.
2. Smoke setup can skip revision resolution 📘 Rule violation ☼ Reliability
The qemu job has no needs: resolve, unlike the build job, so QEMU preparation is independent of the resolved source job. A run can therefore start QEMU preparation before the revision is pinned, leaving the declared resolve -> build + qemu graph unenforced.
Agent Prompt
## Issue description
The QEMU preparation job is not dependent on `resolve`, so it can begin before the workflow pins the source revision even though the required job graph places `resolve` before both build and QEMU preparation.
## Fix Focus Areas
- .github/workflows/build-gk710x.yml[135-139]
## Recommended Fix
Add `needs: resolve` to the `qemu` job so revision resolution completes before QEMU preparation starts, while retaining the existing `qemu_smoke` dependency on both `build` and `qemu`.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
| if grep -q 'bad CRC' /tmp/uboot2.txt; then | ||
| echo "FAIL: the environment saved on the first boot did not land" | ||
| exit 1 |
There was a problem hiding this comment.
3. The smoke test can miss failed saves 🐞 Bug ≡ Correctness
qemu_smoke waits for the autoboot prompt and kills QEMU without issuing a save command or checking that a save completed. If the first boot does not persist its environment, the second boot is judged solely by the absence of the literal bad CRC message rather than by loading a value written on the first boot.
Agent Prompt
## Issue description
The two-boot smoke test does not explicitly save an environment value or verify that the second boot loaded it.
## Fix Focus Areas
- .github/workflows/build-gk710x.yml[223-256]
## Recommended Fix
On the first boot, interrupt autoboot, set a distinctive environment variable, run the save command, and wait for confirmation before stopping QEMU. On the second boot, verify that the variable has the saved value.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
| - name: Report to openipc.org | ||
| env: | ||
| GK_SHA: ${{ needs.resolve.outputs.sha }} | ||
| run: | | ||
| set -eu | ||
| mkdir published | ||
| find artifacts -type f -name '*.bin' -exec cp {} published/ \; | ||
| python3 firmware/.github/scripts/push_build.py \ |
There was a problem hiding this comment.
4. New releases miss the website record 🐞 Bug ≡ Correctness
The publish job uploads assets before push_build.py reports them, but the new workflow is not yet on the website's stated allowlist. Until that separate allowlist change is deployed, a manual publish can update OpenIPC/firmware and then have its openipc.org report rejected.
Agent Prompt
## Issue description
Publishing uploads release assets before reporting them, but the website does not yet accept reports from this workflow.
## Fix Focus Areas
- .github/workflows/build-gk710x.yml[308-356]
- CLAUDE.md[95-101]
## Recommended Fix
Add `build-gk710x.yml` to the OpenIPC/website workflow allowlist and deploy that change before the first publish run. Keep the publish input unused until the verifier accepts reports from this workflow.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
Adds
build-gk710x.ymlfor the newopenipc-gk710xbranch, plus README and CLAUDE.md entries.build-xm.yml: resolve -> build (gk7101, gk7102) + qemu -> qemu_smoke -> release (gk710xtag) / publish (OpenIPC/firmwarelatest, openipc.org). NOR only; the 256 KiB size check includes the boot ROM header.gk7101/gk7102machines (qemu-hisilicon All plats capsule guid arr v4 u-boot/u-boot#159). The second boot must load the environment the first saved. The flash file is byte-swapped per 32-bit word, as the chip holds it.service/internal/builds/verify.go).build-gk710x.ymlneeds adding there before the firstpublish.Tested: I ran the smoke step locally against both images with qemu-hisilicon master, and both pass.
Merge after #22. A PR against
openipcbuilds the currentopenipc-gk710x, which is plain v2022.10 until #22 lands, so the gk7101/gk7102 build legs here fail withbuild.sh: No such file or directoryuntil then. After #22 is merged, re-run this PR's checks. openipc-xm went in the same order (#13, then #14).