mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-12-07 22:05:44 +03:00
Catch jetson nvidia device tree
This commit is contained in:
parent
4c3ee68615
commit
94be756792
@ -130,8 +130,13 @@ def get_soc_type() -> Optional[str]:
|
|||||||
"""Get the SoC type from device tree."""
|
"""Get the SoC type from device tree."""
|
||||||
try:
|
try:
|
||||||
with open("/proc/device-tree/compatible") as file:
|
with open("/proc/device-tree/compatible") as file:
|
||||||
soc = file.read().split(",")[-1].strip("\x00")
|
content = file.read()
|
||||||
return soc
|
|
||||||
|
# Check for Jetson devices
|
||||||
|
if "nvidia" in content:
|
||||||
|
return None
|
||||||
|
|
||||||
|
return content.split(",")[-1].strip("\x00")
|
||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
logger.debug("Could not determine SoC type from device tree")
|
logger.debug("Could not determine SoC type from device tree")
|
||||||
return None
|
return None
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user