fix(backend): detect RK3588 via device-tree compatible marker#150
Merged
Conversation
Contributor
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
andrescera
force-pushed
the
fix/rk3588-realdevice-marker
branch
from
July 16, 2026 20:28
e40f5d6 to
a8ef856
Compare
isRealDevice() only checked /proc/device-tree/model for "RK3588", which on a real Radxa ROCK 5B+ reads "Radxa ROCK 5B+" with no RK3588 substring, so the board was wrongly classified as emulated — disabling network-ingest and reporting gateways as down while their systemd units were active. Also check /proc/device-tree/compatible (the reliable marker, always carrying "rockchip,rk3588") via a new injectable readDeviceTreeCompatible probe, matched case-insensitively. The model check is kept as a fallback for boards whose model string names the SoC (e.g. Orange Pi 5+). Fail-safe swallow-on-reject semantics are unchanged.
andrescera
force-pushed
the
fix/rk3588-realdevice-marker
branch
from
July 16, 2026 21:03
a8ef856 to
4f33e57
Compare
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.
What
isRealDevice()(apps/backend/src/modules/system/device-detection.ts) nowalso reads
/proc/device-tree/compatible(case-insensitively matched for therk3588marker) in addition to the existing/proc/device-tree/modelcheck.Either match classifies the board as a real device. A new injectable
readDeviceTreeCompatibleprobe is added toDeviceDetectionDeps/defaultDeviceDetectionDeps, mirroringreadDeviceTreeModelexactly.Why
On a real, physical Radxa ROCK 5B+ (confirmed live over SSH),
isRealDevice()returned
falseand the device was treated as emulated. Root cause: theonly RK3588 check read
/proc/device-tree/model, which on this board reads:No
RK3588substring anywhere, so the check failed; the x86-DMI fallback pathdidn't match either, so detection fell through to
false. That directly caused:emulated mode" on a real device.
isRealDevice()-gated innetwork-ingest.ts) reporting "Service not running" even though the actualceralive-rtmp-gateway.serviceunit wasactive (running)./proc/device-tree/compatibleis the reliable, standard board-identificationmarker. On the same board it reads (NUL-separated on disk):
which reliably contains
rk3588. Themodelcheck is kept as abelt-and-suspenders fallback for boards whose model string does name the SoC
(e.g. Orange Pi 5+). The marker match was made case-insensitive so the lowercase
rockchip,rk3588(compatible) and uppercaseRK3588(model) both hit one codepath — this is strictly more permissive, and the fail-closed cases (
RK3399,RK3568, generic Rockchip) still fail since none containrk3588in any case.How to verify
A new regression test mirrors the exact field bug: model
"Radxa ROCK 5B+ \n"(no RK3588) with compatible
"radxa,rock-5b-plus\u0000rockchip,rk3588\u0000"resolves
true.Risks
Low, and additive:
isDevelopment/ x86-mini-PC DMI branches are untouched.readOptionalswallow-on-reject, so any read failure still degrades to""and never propagates or crashes boot.
identity still fails closed (covered by the existing
test.eachcases).