Skip to content

Add override and mfr_util configuration files#86

Open
ArunSundar-1805 wants to merge 5 commits into
rdkcentral:developfrom
ArunSundar-1805:feature/RDKMVE-1747-vendor-service-failure
Open

Add override and mfr_util configuration files#86
ArunSundar-1805 wants to merge 5 commits into
rdkcentral:developfrom
ArunSundar-1805:feature/RDKMVE-1747-vendor-service-failure

Conversation

@ArunSundar-1805
Copy link
Copy Markdown

@ArunSundar-1805 ArunSundar-1805 commented May 28, 2026

Problem

1) hciuart.service Failure

hciuart.service intermittently fails during system boot with the following error:

Can't open serial port: No such file or directory

This occurs because hciuart.service attempts to access /dev/ttyAMA0 before the UART device is fully initialized.

As a result:

  • The service enters a failed state during boot.

2) oem-first-boot.service Failure

oem-first-boot.service fails during boot with the following error:

[OEM-FIRST-BOOT] Error: 'mfr_util' not found in PATH

This occurs because the service depends on mfr_util, which is not available in the Raspberry Pi RDKE vendor image.

As a result:

  • The service exits with failure.
  • systemd reports a failed unit during boot.
  • Boot logs contain unnecessary failure messages.

Root Cause

hciuart.service

A boot-time race condition exists where:

  • /dev/ttyAMA0 is created asynchronously during system initialization.
  • hciuart.service may start before the device becomes available.

oem-first-boot.service

A missing runtime dependency exists where:

  • oem-first-boot.sh requires mfr_util.
  • The binary is not present in the target image.
  • The service executes unconditionally and therefore fails.

Solution

hciuart.service

Added a systemd drop-in override:

systemd_units/hciuart.service.d/override.conf

The override:

  • Adds ordering and dependency on dev-ttyAMA0.device.
  • Performs a pre-start device availability check.
  • Enables automatic restart on failure.

oem-first-boot.service

Added a systemd drop-in configuration:

systemd_units/oem-first-boot.service.d/00-mfr-util.conf

The drop-in:

  • Adds:
ConditionPathExists=/usr/bin/mfr_util
  • Ensures the service only runs when mfr_util is available.
  • Prevents unnecessary service failures when the dependency is absent.

Implementation

Added the following files:

systemd_units/hciuart.service.d/override.conf
systemd_units/oem-first-boot.service.d/00-mfr-util.conf

Result

hciuart.service

  • Waits for /dev/ttyAMA0 availability before startup.
  • Eliminates intermittent boot failures.

oem-first-boot.service

  • Skips execution when mfr_util is unavailable.
  • Prevents unnecessary boot-time service failures.
  • Produces cleaner systemd boot status and logs.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 28, 2026

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@ArunSundar-1805
Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

Sharnetha
Sharnetha previously approved these changes May 29, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.service to skip starting unless /usr/bin/mfr_util exists.
  • Add a drop-in override intended for the UART/Bluetooth service to wait for /dev/ttyAMA0 and 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.

Comment thread systemd_units/oem-first-boot.service.d/00-mfr-util.conf
Comment thread systemd_units/hciuart.service.d/override.conf Outdated
Comment thread systemd_units/hciuart.service.d/override.conf
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.

4 participants