RDKEMW-15146 : Introduce mechanism to unlock debug service - read /opt/swupdate.conf - #205
Conversation
Introduce isSecureDbgSrvUnlocked API and replace the condition checks of buildType and deviceType with this API
There was a problem hiding this comment.
Pull request overview
This PR introduces additional gating logic for “secure debug services” so that firmware download override behavior (e.g., state red and swupdate.conf override URL selection) is only allowed when debug access is considered unlocked.
Changes:
- Add a new RFC key (
RFC_DEVICETYPE) and helper (getDeviceTypeRFC()) to retrieve device type (“test”/“prod”/“unknown”). - Introduce
isSecureDbgSrvUnlocked()to decide whether secure debug services are unlocked based on build type, debug-service RFC, device-type RFC, and a LABSIGNED flag from device properties. - Update
GetServURL()to useisSecureDbgSrvUnlocked()instead of the prior(build != PROD) || dbgServicescheck for enabling override behavior.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| src/rfcInterface/rfcinterface.c | Adds getDeviceTypeRFC() helper to read device type from RFC. |
| src/include/rfcinterface.h | Adds RFC_DEVICETYPE definition and getDeviceTypeRFC() declaration. |
| src/deviceutils/device_api.h | Declares new isSecureDbgSrvUnlocked() API and documents its intent. |
| src/deviceutils/device_api.c | Implements isSecureDbgSrvUnlocked() and uses it to gate override behavior in GetServURL(). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
For unit tests to be successful, adding ../src/rfcInterface/rfcinterface.c as a Source, for referencing getDeviceTypeRFC API code access
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Reason for change: to enable debug services, only if the build variant is labSigned and device is test type or if the build type is dev
Test Procedure: Flash the image and check for enabling secure debug services (Firmware download override)
Risks: Low