Skip to content

Relicense as MIT/CERN-OHL-S, settle the hardware build, redesign the enclosure in SolidCraft - #1

Merged
midasdf merged 6 commits into
mainfrom
relicense-and-enclosure
Oct 13, 2026
Merged

midasdf merged 6 commits into
mainfrom
relicense-and-enclosure

Conversation

@midasdf

@midasdf midasdf commented Oct 13, 2026

Copy link
Copy Markdown
Owner

Summary

Three commits, reviewable one at a time:

  1. Relicense firmware and tools as MIT and adopt the REUSE layout (d8fa3f6)
    • Firmware and tools: GPL-3.0-or-later → MIT. Hardware, the enclosure included: CERN-OHL-S-2.0 (the enclosure was CC-BY-SA-4.0). Docs stay CC-BY-4.0; a future logo will be CC-BY-SA-4.0; the name is covered by a naming policy in TRADEMARKS.md instead of "all rights reserved".
    • Every file states its copyright and licence: two-line SPDX headers in source files (16 Zig files, the linker scripts, C headers, CI and shell files had none), REUSE.toml for files that cannot carry one, licence texts in LICENSES/.
    • tools/license_check.zig, a Zig subset of reuse lint, runs in CI.
    • THIRD-PARTY-NOTICES.md gives each BIP's own licence (BIP 32/86/174 are BSD-2-Clause, BIP 39 is MIT — they are not all CC0) and lists font8x8.
  2. Settle the standard build (6e17011)
    • RP2350-PiZero + Adafruit Mini PiTFT #4393 + ArduCam UC-805 (Arducam B0315, HM01B0) camera looking out of the back, USB power only. The OPT4048 light receiver leaves the standard build (its code stays as an optional channel).
    • docs/03 rewritten around the decided build, with superseded options and their reasons in one table.
    • Wiring in RP2350-PiZero GPIO numbers, which differ from a Raspberry Pi's on header pins 7, 8, 10, 19, 21, 23, 29 and 32 (the display ends up on SPI1).
    • Tamper-evident sealing dropped; the threat model recommends a clear case for inspection instead.
  3. Redesign the enclosure in SolidCraft from a Zig source (29213f6)
    • hardware/enclosure/case.zig holds every dimension (tagged published / photo / estimate), computes 33 clearances and writes the SolidCraft scripts. SolidCraft 0.8.0 builds the solids, exports STEP + 3 STLs, renders the pictures and runs an interference check over 4 printed and 22 bought parts (zig run case.zig -- verify reads it back).
    • 92.8 × 35.1 × 19.7 mm (the OpenSCAD v0.5 was 33.5 mm tall): camera beside the board, lens down through the floor; four header-side jumper ends unhoused and insulated so the height is the display stack; four M2 × 16 screws from underneath, nothing on top.

Verification

  • cd firmware && zig build test — 449/449 (the firmware changes are licence headers and one comment)
  • git ls-files -z | zig run tools/license_check.zig — PASS at each of the three commits
  • cd hardware/enclosure && zig test case.zig && zig run case.zig -- check — 33/33 checks PASS, committed scripts up to date
  • SolidCraft 0.8.0 (local, macOS): every part builds as one closed solid; interference check finds no overlap beyond the four expected ones (each bare terminal drawn round its own header pin)
  • Relative links in every edited document resolve

Not covered

  • Nothing has been measured. The UC-805 carrier board has no published drawing; its outline, holes and lens position come from photos. The tightest estimate: the camera's jumper housings pass 0.3 mm over the board's BAT connector. The MEASURED list is in hardware/enclosure/README.md.
  • SolidCraft is not run in CI (no Linux CLI release); STEP/STL and the interference check are regenerated locally and committed.
  • The legacy Python tools under tools/ are untouched apart from their headers.

🤖 Generated with Claude Code

midasdf and others added 3 commits October 14, 2026 03:32
The firmware and tools move from GPL-3.0-or-later to MIT; the hardware,
the enclosure included, is CERN-OHL-S-2.0 throughout (the enclosure was
CC-BY-SA-4.0); documentation stays CC-BY-4.0. The logo will be
CC-BY-SA-4.0 once one exists, and the project's name is covered by a
naming policy in TRADEMARKS.md instead of "all rights reserved".

Every file now states its copyright and licence: a two-line SPDX header
in source files (16 Zig files and the linker scripts, C headers, CI and
shell files had none), REUSE.toml for Markdown, images, JSON and other
files that cannot carry one, and the licence texts in LICENSES/.
tools/license_check.zig, a Zig subset of `reuse lint`, checks it in CI.

THIRD-PARTY-NOTICES.md now gives each BIP's own licence (BIP 32, 86 and
174 are BSD-2-Clause, BIP 39 is MIT; they are not all CC0) and lists the
public-domain font8x8 the UI font is derived from.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The parts are decided: Waveshare RP2350-PiZero, Adafruit Mini PiTFT
#4393 on header pins 1-24, and an ArduCam UC-805 (Arducam B0315, Himax
HM01B0) camera looking out of the back, powered over USB only. The
OPT4048 light receiver leaves the standard build; its code stays as an
optional channel. docs/03 is rewritten around the decided build, with
the superseded options (Pi Zero 2 WH, the LCD HAT, the light receiver,
SD-card exchange, QR-decoding modules, larger SPI cameras) kept in one
table with their reasons.

The wiring is documented in RP2350-PiZero GPIO numbers, which differ
from a Raspberry Pi's on header pins 7, 8, 10, 19, 21, 23, 29 and 32:
the display is on SPI1, and the camera's I2C and power come from the
display's STEMMA QT port while its four video signals go to pins 29,
32, 33 and 36.

Tamper-evident sealing is dropped, since every user builds and opens
their own device; the threat model recommends a clear case instead, so
the inside can be compared with an assembly photo before each use. The
enclosure itself follows in the next commit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
hardware/enclosure/case.zig now holds every dimension (tagged as
published, read off a photo, or estimated), computes 33 clearances and
writes SolidCraft command scripts; SolidCraft 0.8.0 builds the solids,
exports the STEP and the STLs, renders the pictures and runs an
interference check over the 4 printed and 22 bought parts, which
`zig run case.zig -- verify` reads back. CI runs the checks and fails if
the committed scripts are out of date.

The case is 92.8 x 35.1 x 19.7 mm, down from 33.5 mm tall for the
OpenSCAD v0.5 light-sensor design. Its height is the display stack: the
camera sits beside the board, component side down, looking out through
a countersunk opening in the floor, and the four header-side jumper
ends are unhoused and insulated instead of standing 6 mm above the
display. Two shells share one outline with a V-groove at the parting
line and a locating lip; four M2 x 16 screws come in from underneath,
two through the board and two through the camera board, so nothing
shows on top. Captive button caps, a chamfered display window, a
stadium USB-C opening (the only connector left open), an aiming ring
over the lens, foot pockets, and the name and licence engraved
underneath. A clear print is recommended for inspection.

Nothing has been measured yet: the UC-805 has no published drawing, and
the values to confirm first are listed in the enclosure README.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codeant-ai

codeant-ai Bot commented Oct 13, 2026

Copy link
Copy Markdown

Skipping CodeAnt AI review — this PR changes more than 100 files, which usually means a migration, codemod, or vendored drop. Line-level review on diffs this large produces duplicate findings on the same rewrite pattern and drowns out anything that actually matters.

If you still want a review, comment @codeant-ai : review. For better signal, consider splitting the PR into smaller chunks.

@coderabbitai

coderabbitai Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 7ef0004e-c2a4-4cad-99a5-e80a661c86b1
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-13T19:17:36.357373Z c9541c9 New commits
🔒 Security Review ✅ Completed 2026-10-13T18:46:57.594556Z 29213f6 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 29213f668a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/05-threat-model.md Resolved
Comment thread hardware/enclosure/README.md Resolved
Comment thread hardware/enclosure/README.md Resolved
Comment thread docs/09-light-audio-input.md Resolved
… commands

- docs/05 §4-4 now models firmware integrity for the standard RP2350
  build (signed boot, anti-rollback and interface locks, all planned in
  docs/11 and not yet provisioned; until then any UF2 runs), and keeps
  the Pi Zero / SD-card analysis as a labelled section for the earlier
  Linux build.
- docs/09's opening rationale (microSD input, no camera) is marked as
  historical, since both premises were overturned on 2026-10-13/14.
- The enclosure README runs `zig test` once per root file, as CI does
  (two root files on one command line is an error), and creates build/
  before redirecting SolidCraft's results into it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: eaee05ea0e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread README.md Resolved
M0 no longer sets up Raspberry Pi OS, wireless disablement, Linux
device-tree overlays or tests on a Pi: it orders and measures the parts,
assembles the enclosure, pins the Pico SDK/picotool toolchain and brings
up the display, buttons and camera in the order of docs/08 §9. The
RP2350 port leaves the "candidate" list (it is the standard build), the
optional light channel takes its place, and the remaining SD-card and
"same Linux as the device" wording in the roadmap and the CI header goes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: fc4a18b706

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/08-rp2350-pizero.md Resolved
docs/08 §5 still described the Waveshare HAT stack (SPI0 at 240x240, a
joystick and three keys, microSD file I/O). It now lists the Mini
PiTFT's ST7789 on SPI1 at 240x135 (noting that st7789.zig's zero RAM
offset is only right for 240x240), the two buttons, and the HM01B0
camera: I2C1 control plus one-bit PIO/DMA capture into the QR decoder.
The power-loss and after-boot rows, the flash-usage note and the
measurement table no longer assume an SD card.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@midasdf
midasdf merged commit 6efa845 into main Oct 13, 2026
3 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c9541c9df5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/03-hardware-bom.md
Comment on lines +165 to +167
4. Lay the board and the camera (lens down) in the printed base, photograph the inside, close the
top and drive in four M2 × 16 screws from underneath
5. Copy the firmware's UF2 file to the board (hold BOOT while plugging in USB)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Flash before enclosing the BOOT button

In the documented assembly sequence, step 4 closes and screws together the enclosure, but this step then requires holding BOOT while connecting USB. The new enclosure exposes only the power USB-C connector and provides no opening or actuator for the board's BOOT button (hardware/enclosure/case.zig describes only the display controls and power opening), so a builder cannot perform this step without immediately disassembling the case. Move flashing before closure or add BOOT access to the enclosure.

Useful? React with 👍 / 👎.

Comment thread README.md
- **Initial scope**: Bitcoin + EVM (Ethereum / ERC-20 / major L2s)
- **Hardware**: SeedSigner-compatible commodity parts, assembled without soldering
- **Target cost**: roughly ¥8,000–13,000 (USD 55–90) per unit
- **Hardware**: Waveshare RP2350-PiZero (no wireless) + Adafruit Mini PiTFT + ArduCam UC-805 (HM01B0) camera, in a clear 3D-printed case — off-the-shelf parts, no soldering

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Remove the obsolete SD-card operating step

After this line makes the RP2350/camera configuration the standard hardware, design principle 3 in this README still tells users that the SD card is removed after boot (and README.ja.md repeats it). The selected build explicitly does not use SD-card exchange (docs/03-hardware-bom.md lines 71–73), so the top-level security summary now describes an operation users cannot and should not follow; restate statelessness in terms of RAM and power loss instead.

Useful? React with 👍 / 👎.

@midasdf
midasdf deleted the relicense-and-enclosure branch October 13, 2026 19:34
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