Repository navigation
Support a persistent Linux board override - #418
makermelissa merged 2 commits into
Conversation
makermelissa
left a comment
There was a problem hiding this comment.
This can also apply to Pi CM5, CM3 boards, etc.
|
Updated in e5fcb77: the file is now /etc/blinka-board and is not gated by Raspberry Pi model or module vendor. It is a Linux-wide, persistent board override below BLINKA_FORCEBOARD, with chip detection remaining independent. This covers other Pi Compute Module generations and third-party or other SoM designs without maintaining a module allowlist. Non-Linux platforms do not read it. The README explains that connector compatibility does not imply interchangeable GPIO mappings. All 22 hardware-free tests and local lint checks pass. The approved fresh-context re-review of the broader revision is complete with no findings, and GitHub Linux CI passes. The PR description records verification and limitations; no hardware was accessed. |
Fixes #165 by implementing a vendor- and generation-independent Linux board-ID file for custom boards and SoM carriers.
Changes
/etc/blinka-boardbefore ordinary board detection to select a known public constant fromadafruit_platformdetect.constants.boards.BLINKA_FORCEBOARDprecedence and existing per-Detector caching. Chip detection remains independent; non-Linux platforms do not consult the file.This is an explicit system-wide administrator-selected override, like a persistent
BLINKA_FORCEBOARD, not automatic carrier identification or an electrical-compatibility check.BLINKA_FORCEBOARDcan override the file for an individual process, including USB-adapter use. It does not configure peripherals, change device trees, add chip support, or add a particular carrier's pin mapping. A new carrier still needs its PlatformDetect constant/family memberships and corresponding Blinka board definition/routing. Connector-compatible modules with different SoCs still require appropriate mappings.The file is deliberately not limited to Raspberry Pi CM4: it also applies to other Raspberry Pi Compute Module generations, third-party compatible modules, and other Linux SoM designs. The initial, unmerged
/etc/cm4-boardpath has been replaced rather than retained as an alias.Verification
python -m unittest discover -s tests -v). They cover all seven supported Raspberry Pi Compute Module types, non-Broadcom chip identities, independent chip/board selection, non-Linux isolation, revision decoding and model fallback without a valid override, explicit environment precedence, caching, and failure fallback.e5fcb77.git diff --checkpass.e5fcb77found no issues. Beyond passing the 22 committed tests, the reviewer used real Detector/Chip objects, actual UTF-8 decoding, and in-memory BCM2711/RK3566/A311D device-tree fixtures to verify chip independence and cached selection. The reviewer also checked Blinka's chip-first initialization and first-match board routing, including the documented system-wide effect on USB-adapter processes and per-processBLINKA_FORCEBOARDprecedence.get_html_theme_pathdeprecation warning. No documentation configuration is changed here.Local tests and review ran on macOS with hardware-path reads intercepted, not native Linux or MicroPython hardware. No physical GPIOs, USB devices, or board configuration were accessed or changed.