Skip to content

Add option for explicit UART socket - #44

Merged
kurtjd merged 1 commit into
OpenDevicePartnership:mainfrom
kurtjd:add-ec-uart-socket
Sep 4, 2026
Merged

Add option for explicit UART socket#44
kurtjd merged 1 commit into
OpenDevicePartnership:mainfrom
kurtjd:add-ec-uart-socket

Conversation

@kurtjd

@kurtjd kurtjd commented Sep 4, 2026

Copy link
Copy Markdown
Member

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

@kurtjd
kurtjd requested a lite review from Copilot September 4, 2026 17:39
@kurtjd kurtjd self-assigned this Sep 4, 2026
@kurtjd
kurtjd requested a review from a team as a code owner September 4, 2026 17:39
@kurtjd
kurtjd force-pushed the add-ec-uart-socket branch from 3f933fc to a1af2fd Compare September 4, 2026 17:40

Copilot AI 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.

🟡 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_SOCK in dev-qemu README and configuration table.
  • Extend qemu-ec.sh to select between -serial pty (default) and a socket-backed -chardev ... -serial chardev:... when EC_UART_SOCK is 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.

Comment thread platform/dev-qemu/qemu-ec.sh Outdated
@kurtjd
kurtjd force-pushed the add-ec-uart-socket branch from a1af2fd to 44dbaa8 Compare September 4, 2026 17:45
@kurtjd
kurtjd merged commit 77b14e7 into OpenDevicePartnership:main Sep 4, 2026
40 checks passed
@kurtjd
kurtjd deleted the add-ec-uart-socket branch September 4, 2026 18:08
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.

dev-qemu: Need option for explicit UART path

4 participants