Skip to content

ci, docs: build, smoke-test and release openipc-novatek - #54

Merged
dimerr merged 2 commits into
openipcfrom
ci/build-novatek
Oct 23, 2026
Merged

dimerr merged 2 commits into
openipcfrom
ci/build-novatek

Conversation

@dimerr

@dimerr dimerr commented Oct 22, 2026

Copy link
Copy Markdown
Collaborator

CI and docs for the new openipc-novatek branch (port in #53).

  • build-novatek.yml is build-anyka.yml for NT98562 and NT98566:
    • one build leg per SoC, plus gcc-arm-none-eabi for the loader;
    • the 256 KiB partition check;
    • a two-boot qemu smoke test as a hard gate;
    • release to the novatek tag, publish to OpenIPC/firmware latest.
  • README and CLAUDE.md describe the family and the workflow.

Before this goes green or publishes:

  • Smoke test: it builds qemu-hisilicon master, whose nt98562/nt98566 loader stand-in must unpack LZMA BCL1 containers (the qemu-hisilicon PR adding that).
  • publish: build-novatek.yml must be in OpenIPC/website's service/internal/builds/verify.go allowlist first.

Merge #53 first, as with the anyka pair.

build-novatek.yml is build-anyka.yml for openipc-novatek's NT98562 and
NT98566: one build leg per SoC (with gcc-arm-none-eabi for the loader),
the 256 KiB partition check, two boots of each image under
qemu-hisilicon's nt98562/nt98566 machines as a hard gate, release to the
novatek tag, publish to OpenIPC/firmware latest. The smoke test needs a
qemu-hisilicon whose loader stand-in unpacks LZMA BCL1 containers.

README and CLAUDE.md document the family.
@qodo-free-for-open-source-projects

Copy link
Copy Markdown

PR Summary by Qodo

Build, smoke-test, and release Novatek U-Boot images

⚙️ Configuration changes 🧪 Tests 📝 Documentation 🕐 20-40 Minutes

Grey Divider

AI Description

• Add SHA-pinned NT98562 and NT98566 builds with a 256 KiB NOR partition gate.
• Gate manual releases and firmware publishing on two-boot QEMU smoke tests.
• Document image layout and CI; QEMU LZMA support and website allowlisting remain prerequisites.
Diagram

graph TD
  R["Resolve revision"] --> B["Build images"] --> S["QEMU smoke"] --> P["Publish job"] --> F["Firmware latest"] --> W["openipc.org"]
  Q["Build QEMU"] --> S
  S --> L["Novatek release"]
  R --> L
  R --> P
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Parameterize a shared family workflow
  • ➕ Reduces duplicated build, smoke-test, and publishing logic across SoC families.
  • ➖ Requires a broader cross-family CI refactor and makes hardware-specific behavior harder to inspect.

Recommendation: Follow the existing Anyka workflow for this family-specific addition: it preserves established release gates without broad CI churn. Consider a shared workflow separately if duplication becomes costly. Merge the Novatek port first, ensure qemu-hisilicon can unpack LZMA BCL1, and allowlist this workflow in OpenIPC/website before publishing.

Files changed (3) +440 / -0

Documentation (2) +85 / -0
CLAUDE.mdDocument Novatek branch and CI invariants +26/-0

Document Novatek branch and CI invariants

• Describes the Novatek source branch, image layout, two-boot smoke gate, and release behavior. Records the QEMU LZMA requirement and website workflow allowlist prerequisite.

CLAUDE.md

README.mdAdd Novatek build and release guidance +59/-0

Add Novatek build and release guidance

• Adds a workflow badge and supported-family entry. Explains the loader and flash layout, build commands, QEMU coverage, and manual release and publish inputs.

README.md

Other (1) +355 / -0
build-novatek.ymlAdd Novatek build, QEMU smoke, and publishing workflow +355/-0

Add Novatek build, QEMU smoke, and publishing workflow

• Builds SHA-pinned NT98562 and NT98566 images, rejects NOR images over 256 KiB, and requires two successful QEMU boots per SoC. Manual dispatch can then release the artifacts under the novatek tag or publish them to OpenIPC/firmware latest and report their provenance to openipc.org.

.github/workflows/build-novatek.yml

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

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

Copy link
Copy Markdown

Code Review by Qodo

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

Grey Divider


Action required

1. Novatek builds miss required vendor tools 📘 Rule violation ≡ Correctness
Description
The Novatek dependency step installs neither u-boot-tools, lzop, nor pycryptodome. The build
leg therefore lacks tools required by the vendor image recipes when CI builds either supported SoC.
Code

.github/workflows/build-novatek.yml[R81-86]

+          install() {
+            sudo timeout 180 apt-get update && \
+            sudo timeout 240 apt-get install -y --no-install-recommends \
+              build-essential gcc-arm-linux-gnueabi gcc-arm-none-eabi \
+              device-tree-compiler \
+              bison flex bc libssl-dev python3
Evidence
The changed dependency list includes device-tree-compiler and the cross-compilers but omits
u-boot-tools, lzop, and pycryptodome; the repository's CI convention identifies all three as
required for vendor recipes.

CLAUDE.md: Maintain family-specific CI build dependencies: CLAUDE.md: Maintain family-specific CI build dependencies: CLAUDE.md: Maintain family-specific CI build dependencies: CLAUDE.md: Maintain family-specific CI build dependencies
.github/workflows/build-novatek.yml[81-96]
CLAUDE.md[204-207]

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 Novatek build leg omits `u-boot-tools`, `lzop`, and `pycryptodome`, which are required by the vendor image recipes.
## Fix Focus Areas
- .github/workflows/build-novatek.yml[81-96]
## Recommended Fix
Add `u-boot-tools`, `lzop`, and `python3-pip` to the apt package list, then install `pycryptodome` with pip before running the build.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


2. Vendor build scripts fail under dash 📘 Rule violation ☼ Reliability
Description
The Novatek workflow runs bash build.sh but never changes /bin/sh to Bash for nested vendor
recipes. Any recipe invoked through /bin/sh that uses Bash-only syntax reaches the default dash
shell and can fail during either Novatek build leg.
Code

.github/workflows/build-novatek.yml[R88-96]

+          for i in 1 2 3 4; do
+            install && break
+            [ "$i" = 4 ] && { echo "apt failed after 4 attempts" >&2; exit 1; }
+            echo "apt attempt $i failed/timed out; retrying in $((i*10))s" >&2
+            sleep $((i*10))
+          done
+
+      - name: Build ${{ matrix.soc }}
+        run: bash build.sh ${{ matrix.soc }}
Evidence
The changed workflow has no /bin/sh setup between dependency installation and the build
invocation, while the repository documents that vendor recipes rely on Bash features when invoked as
/bin/sh and the existing HiSilicon workflow configures the symlink.

CLAUDE.md: Maintain family-specific CI build dependencies: CLAUDE.md: Maintain family-specific CI build dependencies: CLAUDE.md: Maintain family-specific CI build dependencies: CLAUDE.md: Maintain family-specific CI build dependencies
.github/workflows/build-novatek.yml[88-96]
CLAUDE.md[204-207]
.github/workflows/build-hisilicon.yml[145-149]

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 Novatek build leg does not configure `/bin/sh` to point to Bash, although nested vendor recipes depend on Bash-specific behavior.
## Fix Focus Areas
- .github/workflows/build-novatek.yml[88-96]
## Recommended Fix
Add `sudo ln -sf /bin/bash /bin/sh` after dependency installation and before invoking `build.sh`, matching the established vendor workflow setup.

ⓘ 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 reply 'qodo' on any finding to push back, ask questions, or dig deeper

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

Comment thread .github/workflows/build-novatek.yml
Comment thread .github/workflows/build-novatek.yml
CLAUDE.md read as if every family's CI needed /bin/sh as bash and
pycryptodome, u-boot-tools and lzop; the Qodo review of #54 asked for
them in build-novatek.yml on that basis. They are what the
openipc-hisilicon vendor recipes use. openipc-novatek's build.sh runs
none of them: the loader's make system and nvt-image.py build both
images with /bin/sh as dash (checked locally).
@dimerr
dimerr merged commit 4381f60 into openipc Oct 23, 2026
37 of 51 checks passed
@dimerr
dimerr deleted the ci/build-novatek branch October 23, 2026 03:57
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