Skip to content

Add Zephyr PQC test images for ESP32-S2 Mini - #28

Merged
ajlennon merged 6 commits into
mainfrom
briar/zephyr-s2mini-pqc
Dec 5, 2026
Merged

ajlennon merged 6 commits into
mainfrom
briar/zephyr-s2mini-pqc

Conversation

@ajlennon

@ajlennon ajlennon commented Dec 5, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Pin all four Zephyr firmware targets (ESP32, ESP32-S3, ESP32-C3 and ESP32-S2 Mini) to Zephyr v4.5.0, revision 41d10b59730406bbab4ca9f1fbbe9e96aafb4966. ESP8266 and the ESP-IDF CheerLightsQ client are separate frameworks.
  • Add baseline and ML-DSA-44 profiles for the LOLIN / XTVTX S2 Mini, 4MB flash, Simple Boot offset 0x1000, native USB CDC console, internal SRAM only and stack sentinel. Retain the documented narrowly scoped S2 USB dependency backport.
  • Add both S2 profiles to the static USB programming matrix with immutable source, effective config, S2 config/overlay, guide, build and inventory links. Reuse latest-main freshness, checksum, chip/security and bounds checks; no stale fallback or full-chip erase.
  • Package compiled devicetree and validated flash size for every Zephyr board. Zephyr 4.5 no longer emits the publisher's obsolete CONFIG_FLASH_SIZE assumption, confirmed in actual ESP32 and S2 artifacts. Keep compatibility with older byte-valued configurations and reject contradictory metadata.
  • Reduce repeated CI work: shallow-fetch the same pinned upstream inputs, reuse the exact-digest container if present, and snapshot baseline before reconfiguring the same per-board Ninja tree for ML-DSA. Keep fresh per-job workspaces, isolation, timeouts, all boards/profiles and provenance checks. Wall-clock improvement remains unmeasured pending CI.

Verification

  • Python: 200 tests, 198 passed, 2 skipped; focused builder tests 18 passed. The expected dedicated-socket refusal exercised by a negative test is not a suite failure.
  • JavaScript: 61 tests passed, including both S2 profiles, exact source/config links and wrong-chip refusal using fake serial only.
  • Python compileall and Git whitespace checks passed.
  • Previously built exact-head c729402 S2 baseline and ML-DSA-44 archives both pass the updated publisher at 4194304 bytes. Full image checksums/provenance were verified separately; new candidate CI is still required.
  • Synthetic publication test covers eight profiles from four artifacts, preserving config, manifest, inventory, checksum and flash-layout validation; negative tests reject missing/tampered DTS and bad USB/stack/PSRAM/flash policy.

Local self-review (not independent approval)

Latest publisher-unit correction: base dc6bf41189ff94dbfb6729eab398dda6b57d772a, tree 0a1212dbde5fca12e6f175f86d72f7b6398086f5, staged diff SHA256 12ff4be7eccfedc2515a43568135de40f70a87390195f9151ecbfb992ed61e1a. Reviewed complete two-file fix and regression: actual C3 config has FLASH_SIZE=4096 KiB and validated chosen flash=4194304 bytes; only exact byte or KiB conversion accepted, contradictory capacity still refused. All eight real run47525291291 packages pass the corrected publisher, archive digests, all SHA256SUMS, pinned Zephyr/source identities and effective policies. No blocking findings. Firmware inputs are unchanged by this publisher/test-only correction; retain completed four-board run47525291291 evidence for dc6bf41 without claiming artifacts were built from the new publisher commit. Fresh same-head required offline-tests and exact-base review remain mandatory; main will rebuild after merge.

Latest CI-efficiency follow-up: base 2228a14c3674599f16440655ce2e32f73bc8c050, tree 5fcd28687f1cd7972d0bb031f9856db9b1d00aaf, staged diff SHA256 a404e5d340c8f7e467c50111d8862db586377874537fa4958aff0971489e1306. Reviewed complete two-file change: west 1.5.0 upstream confirms fetch-option support; SHA identities and patch checks unchanged. Build reuse stays inside one fresh board/job, with baseline copied before OFF-to-ON reconfiguration; mocked tests cover event ordering across all four boards. Exact-digest cache lookup cannot substitute another image. No blocking self-review findings; cross-build and speed measurements remain pending. Earlier unchanged source review is retained below.

Current follow-up base c7294020fb4952ffd09a5e72b8323748577250da, candidate tree b7ee68427c796db3246c2e5315f5847a7fdd621f, staged diff SHA256 e0aa630d554fe4d7a7334e0de80ae6e389dd7555ddaf2cdd58593453952d6de4. Overall PR base 19574fd3d32ccf28e57bc2802238cf4e46a9dd54.

Briar reviewed the complete eight-file follow-up, reusing unchanged earlier PR self-review. Checked S2 chip versus artifact identity, 0x1000 offset, all-board compiled flash parsing and image bounds, modern/legacy publisher paths, required S2 effective config, build-bound DTS, immutable links, full-matrix job gate, tests and unchanged freshness/security refusals. No blocking findings. Repository CONTRIBUTING selects local self-review plus exact-head/base required CI, not Preloop/Sandchest. No bypass or premature merge.

Remaining gaps

Fresh four-board CI and protected-main publication remain pending. Hardware execution, physical browser flashing, PSRAM and PQC TLS are untested. These Zephyr images are offline boot/signature tests, not KC application firmware; no heater, relay, credentials or physical board operations are included. Published main images must be rebuilt from the accepted source, not PR artifacts.

Assisted-by: Briar

@ajlennon ajlennon added the build-esp32 Explicitly dispatch the reviewed same-repo ESP32 image candidate label Dec 5, 2026
Retain native USB with S2-only upstream-derived HAL/cache fixes and pinned-source checks. Other boards use unmodified release sources.

Assisted-by: Briar
@ajlennon ajlennon added build-esp32 Explicitly dispatch the reviewed same-repo ESP32 image candidate and removed build-esp32 Explicitly dispatch the reviewed same-repo ESP32 image candidate labels Dec 5, 2026
Zephyr 4.5 derives Espressif flash size from chosen DT rather than the old CONFIG_FLASH_SIZE. Preserve the 4MB requirement and diagnose observed policy values.

Assisted-by: Briar
@ajlennon ajlennon added build-esp32 Explicitly dispatch the reviewed same-repo ESP32 image candidate and removed build-esp32 Explicitly dispatch the reviewed same-repo ESP32 image candidate labels Dec 5, 2026
@ajlennon ajlennon added build-esp32 Explicitly dispatch the reviewed same-repo ESP32 image candidate and removed build-esp32 Explicitly dispatch the reviewed same-repo ESP32 image candidate labels Dec 5, 2026
@ajlennon ajlennon added build-esp32 Explicitly dispatch the reviewed same-repo ESP32 image candidate and removed build-esp32 Explicitly dispatch the reviewed same-repo ESP32 image candidate labels Dec 5, 2026
@ajlennon
ajlennon merged commit 242c646 into main Dec 5, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build-esp32 Explicitly dispatch the reviewed same-repo ESP32 image candidate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant