Add option for explicit UART socket - #44
Merged
Merged
Conversation
kurtjd
requested review from
kat-perez,
maxperga-msft,
philgweber and
rogurr
September 4, 2026 17:39
kurtjd
force-pushed
the
add-ec-uart-socket
branch
from
September 4, 2026 17:40
3f933fc to
a1af2fd
Compare
There was a problem hiding this comment.
🟡 Changes recommended
The new rm -f "$EC_UART_SOCK" cleanup is unsafe without -- and a type check, since it can be option-injected and can delete non-socket files at an arbitrary path.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds an opt-in environment variable to let dev-qemu use a stable UNIX-domain socket for UART instead of always allocating a PTY, improving interoperability with external QEMU co-simulation setups (per Issue #43) while preserving the existing default behavior.
Changes:
- Document
EC_UART_SOCKindev-qemuREADME and configuration table. - Extend
qemu-ec.shto select between-serial pty(default) and a socket-backed-chardev ... -serial chardev:...whenEC_UART_SOCKis set. - Preserve the “char device redirected to … (label serial0)” announcement behavior for consumers that grep it (notably the headless path).
File summaries
| File | Description |
|---|---|
| platform/dev-qemu/README.md | Documents the new UART socket option and how to enable it via EC_UART_SOCK. |
| platform/dev-qemu/qemu-ec.sh | Implements runtime selection between PTY UART and a stable UART socket based on EC_UART_SOCK. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
kurtjd
force-pushed
the
add-ec-uart-socket
branch
from
September 4, 2026 17:45
a1af2fd to
44dbaa8
Compare
felipebalbi
approved these changes
Sep 4, 2026
tullom
approved these changes
Sep 4, 2026
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.
Previously this would always have the EC produce a PTY. However, needed flexibility to instead pass in an explicit path to make it easier to use this with the host QEMU over in the qemu arm virt repo. So we just add that option, but keep the default PTY behavior if the env variable isn't set.
Resolves #43