os: add support for windows - #2427
Draft
AmyJeanes wants to merge 7 commits into
Draft
Conversation
This was referenced Sep 7, 2026
AmyJeanes
marked this pull request as draft
September 7, 2026 23:22
AmyJeanes
added a commit
to AmyJeanes/openpilot-upstream
that referenced
this pull request
Sep 9, 2026
--- TODO REMOVE AFTER THE SUBMODULE PRS MERGE (commaai/msgq#709, commaai/panda#2427, commaai/rednose#61, commaai/opendbc#3724) --- Until the four submodule PRs merge, the pointers move to the windows-tidy branches on my fork and .gitmodules fetches them from there: panda and opendbc just below their own TEMP index commits (their uv sources would leak into this lockfile), rednose at its TEMP commit (its source supplies comma-deps-eigen for Windows), msgq's series on openpilot's current pin (windows-tidy-pin). The lock follows the submodules' metadata. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016AgqYZYWLpwE2T5vS3nVEt
AmyJeanes
added a commit
to AmyJeanes/openpilot-upstream
that referenced
this pull request
Sep 9, 2026
--- TODO REMOVE AFTER THE SUBMODULE PRS MERGE (commaai/msgq#709, commaai/panda#2427, commaai/rednose#61, commaai/opendbc#3724) --- Until the four submodule PRs merge, the pointers move to the windows-tidy branches on my fork and .gitmodules fetches them from there: panda and opendbc just below their own TEMP index commits (their uv sources would leak into this lockfile), rednose at its TEMP commit (its source supplies comma-deps-eigen for Windows), msgq's series on openpilot's current pin (windows-tidy-pin). The lock follows the submodules' metadata. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016AgqYZYWLpwE2T5vS3nVEt
AmyJeanes
added a commit
to AmyJeanes/openpilot-upstream
that referenced
this pull request
Sep 9, 2026
--- TODO REMOVE AFTER THE SUBMODULE PRS MERGE (commaai/msgq#709, commaai/panda#2427, commaai/rednose#61, commaai/opendbc#3724) --- Until the four submodule PRs merge, the pointers move to the windows-tidy branches on my fork and .gitmodules fetches them from there: panda and opendbc just below their own TEMP index commits (their uv sources would leak into this lockfile), rednose at its TEMP commit (its source supplies comma-deps-eigen for Windows), msgq's series on openpilot's current pin (windows-tidy-pin). The lock follows the submodules' metadata. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016AgqYZYWLpwE2T5vS3nVEt
Merged
SCons' default tools pick MSVC there; the mingw tool with clang builds both. CANPacket_t is copied onto the wire, so libpanda needs GCC's packed bitfield layout (-mno-ms-bitfields) and cffi's MSVC rules must produce the same one: unsigned int flag bits, like addr, do on both. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016AgqYZYWLpwE2T5vS3nVEt
`SETLEN=1 sign.py ...` is a shell command cmd.exe cannot run. The interpreter running SCons has the dependencies, and SETLEN moves into the command's environment; the same command on every platform. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016AgqYZYWLpwE2T5vS3nVEt
The release shim branches only know Linux and macOS; the comma-deps wheels cover Windows too (import names unchanged). They declare Python >=3.12, so the marker keeps the 3.11 half of requires-python resolving. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016AgqYZYWLpwE2T5vS3nVEt
An MSYS2 CLANG64 shell, like openpilot's Windows job; setup.sh installs clang, git and uv there with pacman. The misra script calls python (a venv on Windows has no python3), and the mutation test runs it through the bash on PATH, since cmd.exe cannot. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016AgqYZYWLpwE2T5vS3nVEt
AmyJeanes
added a commit
to AmyJeanes/openpilot-upstream
that referenced
this pull request
Sep 9, 2026
--- TODO REMOVE AFTER THE SUBMODULE PRS MERGE (commaai/msgq#709, commaai/panda#2427, commaai/rednose#61, commaai/opendbc#3724) --- Until the four submodule PRs merge, the pointers move to the windows-tidy branches on my fork and .gitmodules fetches them from there: panda and opendbc just below their own TEMP index commits (their uv sources would leak into this lockfile), rednose at its TEMP commit (its source supplies comma-deps-eigen for Windows), msgq at its tip. The lock follows the submodules' metadata. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016AgqYZYWLpwE2T5vS3nVEt
AmyJeanes
added a commit
to AmyJeanes/openpilot-upstream
that referenced
this pull request
Sep 9, 2026
--- TODO REMOVE AFTER THE SUBMODULE PRS MERGE (commaai/msgq#709, commaai/panda#2427, commaai/rednose#61, commaai/opendbc#3724) --- Until the four submodule PRs merge, the pointers move to the windows-tidy branches on my fork and .gitmodules fetches them from there: panda and opendbc just below their own TEMP index commits (their uv sources would leak into this lockfile), rednose at its TEMP commit (its source supplies comma-deps-eigen for Windows), msgq at its tip. The lock follows the submodules' metadata. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016AgqYZYWLpwE2T5vS3nVEt
AmyJeanes
added a commit
to AmyJeanes/openpilot-upstream
that referenced
this pull request
Sep 9, 2026
--- TODO REMOVE AFTER THE SUBMODULE PRS MERGE (commaai/msgq#709, commaai/panda#2427, commaai/rednose#61, commaai/opendbc#3724) --- Until the four submodule PRs merge, the pointers move to the windows-tidy branches on my fork and .gitmodules fetches them from there: panda and opendbc just below their own TEMP index commits (their uv sources would leak into this lockfile), rednose at its TEMP commit (its source supplies comma-deps-eigen for Windows), msgq at its tip. The lock follows the submodules' metadata. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016AgqYZYWLpwE2T5vS3nVEt
Quote $DIR (and the misra script's paths) in the setup and test scripts so a checkout path containing spaces works. Cross-platform: unquoted, these break on Linux too, spaces are just far more common on Windows. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016AgqYZYWLpwE2T5vS3nVEt
AmyJeanes
added a commit
to AmyJeanes/openpilot-upstream
that referenced
this pull request
Sep 10, 2026
--- TODO REMOVE AFTER THE SUBMODULE PRS MERGE (commaai/msgq#709, commaai/panda#2427, commaai/rednose#61, commaai/opendbc#3724) --- Until the four submodule PRs merge, the pointers move to the windows-tidy branches on my fork and .gitmodules fetches them from there: panda and opendbc just below their own TEMP index commits (their uv sources would leak into this lockfile), rednose at its TEMP commit (its source supplies comma-deps-eigen for Windows), msgq at its tip. The lock follows the submodules' metadata. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016AgqYZYWLpwE2T5vS3nVEt
AmyJeanes
added a commit
to AmyJeanes/openpilot-upstream
that referenced
this pull request
Sep 10, 2026
--- TODO REMOVE AFTER THE SUBMODULE PRS MERGE (commaai/msgq#709, commaai/panda#2427, commaai/rednose#61, commaai/opendbc#3724) --- Until the four submodule PRs merge, the pointers move to the windows-tidy branches on my fork and .gitmodules fetches them from there: panda and opendbc just below their own TEMP index commits (their uv sources would leak into this lockfile), rednose at its TEMP commit (its source supplies comma-deps-eigen for Windows), msgq at its tip. The lock follows the submodules' metadata. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016AgqYZYWLpwE2T5vS3nVEt
AmyJeanes
added a commit
to AmyJeanes/openpilot-upstream
that referenced
this pull request
Sep 10, 2026
--- TODO REMOVE AFTER THE SUBMODULE PRS MERGE (commaai/msgq#709, commaai/panda#2427, commaai/rednose#61, commaai/opendbc#3724) --- Until the four submodule PRs merge, the pointers move to the windows-tidy branches on my fork and .gitmodules fetches them from there: panda and opendbc just below their own TEMP index commits (their uv sources would leak into this lockfile), rednose at its TEMP commit (its source supplies comma-deps-eigen for Windows), msgq at its tip. The lock follows the submodules' metadata. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016AgqYZYWLpwE2T5vS3nVEt
AmyJeanes
added a commit
to AmyJeanes/openpilot-upstream
that referenced
this pull request
Sep 10, 2026
--- TODO REMOVE AFTER THE SUBMODULE PRS MERGE (commaai/msgq#709, commaai/panda#2427, commaai/rednose#61, commaai/opendbc#3724) --- Until the four submodule PRs merge, the pointers move to the windows-tidy branches on my fork and .gitmodules fetches them from there: panda and opendbc just below their own TEMP index commits (their uv sources would leak into this lockfile), rednose at its TEMP commit (its source supplies comma-deps-eigen for Windows), msgq at its tip. The lock follows the submodules' metadata. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016AgqYZYWLpwE2T5vS3nVEt
debug_console.py polled stdin with select(), which on Windows only works on sockets, so som_debug.sh failed there. Poll the console with msvcrt on Windows and keep select() elsewhere. Also quote `cd "$DIR"` in som_debug.sh so a checkout path with spaces works. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016AgqYZYWLpwE2T5vS3nVEt
…ies#107 publishes --- TODO REMOVE AFTER DEPENDENCY PR MERGES (commaai/dependencies#107) --- Dropped once the win_amd64 wheels are on PyPI; until then uv takes comma-deps-gcc-arm-none-eabi and comma-deps-cppcheck for win32 from a release on my fork built from that PR. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016AgqYZYWLpwE2T5vS3nVEt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Native Windows support for panda's firmware build and libpanda test library (MSYS2 CLANG64, clang), plus a windows-latest CI entry. openpilot's Windows build uses this to build and flash panda.
.dlltarget and cffi path are named per platform.-mno-ms-bitfieldsand the flag bitfields are declaredunsigned intso cffi's MSVC rules match the firmware. Linux/macOS layout unchanged (same fix as opendbc's libsafety).sign.pythrough the SCons interpreter (cmd.exe honours neither a shebang nor aVAR=valueprefix).python.Line endings were split out and comma has already merged them.
Draft: the one
TEMPcommit at the tip (markedTODO REMOVE) drops once commaai/dependencies#107 publishes the win_amd64 toolchain/cppcheck wheels; it points uv at a pre-release index meanwhile.Part of a six-repo series: commaai/openpilot#38810, commaai/msgq#709, commaai/opendbc#3724, commaai/rednose#61, commaai/dependencies#107. dependencies merges first; the rest independently.
Generated with Claude, human-reviewed and tested locally and in CI.