Skip to content

Update sysint-soc configuration and install priority fix#365

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

Update sysint-soc configuration and install priority fix#365
ArunSundar-1805 wants to merge 2 commits into
rdkcentral:developfrom
ArunSundar-1805:feature/RDKMVE-1747-vendor-service-failure

Conversation

@ArunSundar-1805

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

Copy link
Copy Markdown

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 by the kernel/device-tree.

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 happens because the service script (oem-first-boot.sh) depends on the mfr_util binary, which is not present in the Raspberry Pi RDKE vendor image.

As a result:

  • The service exits with failure
  • systemd marks it as a failed unit

Root Cause

hciuart.service

The failure is caused by a boot-time race condition:

  • /dev/ttyAMA0 is created asynchronously during kernel initialization
  • hciuart.service starts before the device becomes available

oem-first-boot.service

The failure is caused by a missing runtime dependency:

  • oem-first-boot.sh requires mfr_util
  • No recipe in the current build provides /usr/bin/mfr_util

Solution

1) Fix for hciuart.service

A systemd drop-in override has been added for hciuart.service:

/etc/systemd/system/hciuart.service.d/override.conf

This override:

  • Adds dependency on the UART device:
Requires=dev-ttyAMA0.device
After=dev-ttyAMA0.device
  • Adds a pre-start check to ensure device availability
  • Enables automatic restart on failure

2) Fix for oem-first-boot.service

A systemd drop-in configuration has been added:

<systemd-unit-dir>/oem-first-boot.service.d/00-mfr-util.conf

This drop-in:

  • Adds a condition:
ConditionPathExists=/usr/bin/mfr_util
  • Ensures the service only runs if mfr_util is present
  • Skips the service cleanly when the dependency is unavailable instead of failing

Implementation

hciuart.service

Added file:

systemd_units/hciuart.service.d/override.conf

Installed into:

/etc/systemd/system/hciuart.service.d/

oem-first-boot.service

Added file:

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

Updated sysint-soc.bb to install the drop-in into:

${systemd_unitdir}/system/oem-first-boot.service.d/

Updated packaging to include drop-in directories:

FILES:${PN} += "${systemd_unitdir}/system/*.d/*"

Configuration Details

override.conf (hciuart.service)

[Unit]
Requires=dev-ttyAMA0.device
After=dev-ttyAMA0.device
StartLimitIntervalSec=0

[Service]
ExecStartPre=/bin/sh -c 'i=0; while [ $i -lt 5 ]; do [ -e /dev/ttyAMA0 ] && exit 0; sleep 1; i=$((i+1)); done; exit 1'
Restart=on-failure
RestartSec=2

10-mfr-util.conf (oem-first-boot.service)

[Unit]
ConditionPathExists=/usr/bin/mfr_util

Result

hciuart.service

  • Ensures the service starts only after /dev/ttyAMA0 is available
  • Eliminates intermittent boot failures
  • Removes the need for manual restarts after reboot/flash

oem-first-boot.service

  • Prevents service failure when mfr_util is not present
  • Ensures clean system boot without failed units
  • Maintains expected behavior when MFR support is available

@github-actions

github-actions Bot commented May 28, 2026

Copy link
Copy Markdown

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

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.

3 participants