Linux: uses the standard /sys/firmware/devicetree/base instead of the outdated /proc/device-tree

This commit is contained in:
Carter Li
2026-01-20 09:11:47 +08:00
parent 927d44d919
commit a313fd1572
3 changed files with 12 additions and 8 deletions
+1 -1
View File
@@ -741,7 +741,7 @@ FF_MAYBE_UNUSED static void detectSocName(FFCPUResult* cpu)
// [x-vendor,x-model\0]*N
char content[512];
ssize_t length = ffReadFileData("/proc/device-tree/compatible", ARRAY_SIZE(content), content);
ssize_t length = ffReadFileData("/sys/firmware/devicetree/base/compatible", ARRAY_SIZE(content), content);
if (length < 4) return; // v,m\0
if (content[length - 1] != '\0') return; // must end with \0