Catch jetson nvidia device tree

This commit is contained in:
Nicolas Mowen 2025-11-23 08:39:10 -07:00
parent 4c3ee68615
commit 94be756792

View File

@ -130,8 +130,13 @@ def get_soc_type() -> Optional[str]:
"""Get the SoC type from device tree."""
try:
with open("/proc/device-tree/compatible") as file:
soc = file.read().split(",")[-1].strip("\x00")
return soc
content = file.read()
# Check for Jetson devices
if "nvidia" in content:
return None
return content.split(",")[-1].strip("\x00")
except FileNotFoundError:
logger.debug("Could not determine SoC type from device tree")
return None