Add override and mfr_util configuration files#86
Open
ArunSundar-1805 wants to merge 5 commits into
Open
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
Author
|
I have read the CLA Document and I hereby sign the CLA |
Sharnetha
previously approved these changes
May 29, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Adds systemd drop-in configuration intended to (1) prevent oem-first-boot.service from failing when mfr_util is absent, and (2) harden the Bluetooth UART bring-up service against boot-time /dev/ttyAMA0 availability races.
Changes:
- Add a drop-in for
oem-first-boot.serviceto skip starting unless/usr/bin/mfr_utilexists. - Add a drop-in override intended for the UART/Bluetooth service to wait for
/dev/ttyAMA0and restart on failure.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| systemd_units/oem-first-boot.service.d/00-mfr-util.conf | Adds a systemd ConditionPathExists to skip the unit when mfr_util is not present. |
| systemd_units/hciurart.service.d/override.conf | Adds ordering on dev-ttyAMA0.device, a pre-start wait loop, and restart policy for the UART/Bluetooth unit (but currently has correctness issues noted in comments). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Problem
1)
hciuart.serviceFailurehciuart.serviceintermittently fails during system boot with the following error:Can't open serial port: No such file or directoryThis occurs because
hciuart.serviceattempts to access/dev/ttyAMA0before the UART device is fully initialized.As a result:
2)
oem-first-boot.serviceFailureoem-first-boot.servicefails during boot with the following error:This occurs because the service depends on
mfr_util, which is not available in the Raspberry Pi RDKE vendor image.As a result:
Root Cause
hciuart.serviceA boot-time race condition exists where:
/dev/ttyAMA0is created asynchronously during system initialization.hciuart.servicemay start before the device becomes available.oem-first-boot.serviceA missing runtime dependency exists where:
oem-first-boot.shrequiresmfr_util.Solution
hciuart.serviceAdded a systemd drop-in override:
The override:
dev-ttyAMA0.device.oem-first-boot.serviceAdded a systemd drop-in configuration:
The drop-in:
ConditionPathExists=/usr/bin/mfr_utilmfr_utilis available.Implementation
Added the following files:
Result
hciuart.service/dev/ttyAMA0availability before startup.oem-first-boot.servicemfr_utilis unavailable.