Skip to content

ci: build u-boot-z.bin with hi_gzip's 8 KiB-window encoder (fixes hardware regression) - #14

Merged
widgetii merged 1 commit into
masterfrom
ci/hi-gzip-for-real-silicon
May 8, 2026
Merged

ci: build u-boot-z.bin with hi_gzip's 8 KiB-window encoder (fixes hardware regression)#14
widgetii merged 1 commit into
masterfrom
ci/hi-gzip-for-real-silicon

Conversation

@widgetii

@widgetii widgetii commented May 8, 2026

Copy link
Copy Markdown
Member

Summary

Fixes a hardware regression introduced by PR #10. Real Goke V4
silicon's HW gzip decompressor only parses streams compressed
with WSIZE=8 KiB (HiSilicon's hi_gzip patch); system gzip's
32 KiB-window output trips Uncompress Fail! on real silicon.
The QEMU model accepted both, so the qemu_smoke gate didn't
catch the regression.

User reported the May 8 gk7205v300 binary fails on actual
camera hardware. The May 6 raw 500 KiB baseline booted, but PR #10
switched gk to publish the wrapped u-boot-z.bin artifact (~250
KiB) without bringing along the hi_gzip tool that the wrap
format requires.

User confirmed u-boot-hi3516ev300-universal.bin (which uses
hi_gzip) boots cleanly on real hi3516ev300 silicon. Goke is a
HiSilicon clone with the same source tree, so the same compression
tool applies.

Changes

  • tools/hi_gzip/: imported from u-boot-hi3516ev200. Same
    gzip-1.8 + HiSi 8 KiB-window patch that repo has shipped for
    years; not Goke-specific.
  • arch/arm/cpu/armv7/<soc>/Makefile (4 SoCs): use ./gzip
    (the staged hi_gzip binary) instead of system gzip, mirroring
    u-boot-hi3516ev200/arch/.../hw_compressed/Makefile.
  • .github/workflows/build.yml: build hi_gzip and stage it at
    arch/arm/cpu/armv7/<soc>/gzip before make u-boot-z.bin.
    The existing cp -raf in the recipe carries it into the
    sub-make work dir as ./gzip.

Test plan

  • Verified locally with arm-hisiv300-linux: produces 252 KiB
    u-boot-gk7205v200.bin (within the 256 KiB partition gate).
  • CI build and qemu_smoke (4 SoCs each) green.
  • Hardware verification: user reports the published binary
    boots on real Goke V4 silicon
    (gk7205v300 was the failing
    case in the original report).

🤖 Generated with Claude Code

Real Goke V4 silicon's HW gzip decompressor only parses streams
compressed with WSIZE=8 KiB; system gzip emits 32 KiB-window
streams that the decompressor rejects with "Uncompress Fail!".
The QEMU model is more permissive (accepted both), so the
qemu_smoke gate didn't catch this on PR #10.

User reported the May 8 gk7205v300 binary fails this way on real
hardware (vs the May 6 raw 500 KiB baseline that booted cleanly).
Test on real hi3516ev300 silicon confirms ev200's wrapped binary
(uses hi_gzip) boots — Goke is a HiSilicon clone with the same
source tree, so the same compression tool applies.

Changes:
* Import tools/hi_gzip/ from u-boot-hi3516ev200. Same gzip-1.8 +
  HiSi window-size patch ev200 has shipped for years; not
  Goke-specific.
* arch/arm/cpu/armv7/<soc>/Makefile (4 SoCs): use ./gzip (the
  staged hi_gzip binary) instead of system gzip, mirroring
  ev200's hw_compressed/Makefile pattern.
* CI: build hi_gzip and stage it at arch/arm/cpu/armv7/<soc>/gzip
  before make u-boot-z.bin. The recipe's existing cp -raf carries
  it into the sub-make work dir as ./gzip. Same pattern u-boot-
  hi3516ev200's CI uses.

Verified locally with arm-hisiv300-linux: produces 252 KiB
u-boot-gk7205v200.bin (within 256 KiB partition gate). On-hardware
verification still TODO (user has the rig).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@widgetii
widgetii merged commit 586a516 into master May 8, 2026
9 checks passed
@widgetii
widgetii deleted the ci/hi-gzip-for-real-silicon branch May 8, 2026 13:38
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.

2 participants