Skip to content

Commit

Permalink
api: add more tegra devices to modern device tree detection in `get_m…
Browse files Browse the repository at this point in the history
…odel`
  • Loading branch information
theofficialgman committed Jun 1, 2024
1 parent 028edcc commit d737921
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions api
Original file line number Diff line number Diff line change
Expand Up @@ -3134,10 +3134,20 @@ get_model() { # populates the model and jetson_model variables with information
# nvidia, in their official L4T (Linux for Tegra) releases 32.X and 34.X, set a distinct tegra family in the device tree /proc/device-tree/compatible
if [[ -e "/proc/device-tree/compatible" ]]; then
CHIP="$(tr -d '\0' < /proc/device-tree/compatible)"
if [[ ${CHIP} =~ "tegra186" ]]; then
jetson_model="tegra-x2"
if [[ ${CHIP} =~ "tegra20" ]]; then
jetson_model="tegra-2"
elif [[ ${CHIP} =~ "tegra30" ]]; then
jetson_model="tegra-3"
elif [[ ${CHIP} =~ "tegra114" ]]; then
jetson_model="tegra-4"
elif [[ ${CHIP} =~ "tegra124" ]]; then
jetson_model="tegra-k1-32"
elif [[ ${CHIP} =~ "tegra132" ]]; then
jetson_model="tegra-k1-64"
elif [[ ${CHIP} =~ "tegra210" ]]; then
jetson_model="tegra-x1"
elif [[ ${CHIP} =~ "tegra186" ]]; then
jetson_model="tegra-x2"
elif [[ ${CHIP} =~ "tegra194" ]]; then
jetson_model="xavier"
elif [[ ${CHIP} =~ "tegra234" ]]; then
Expand Down

0 comments on commit d737921

Please sign in to comment.