Skip to content

Commit

Permalink
Fix L4T reporting issue
Browse files Browse the repository at this point in the history
  • Loading branch information
jetsonhacks committed Jul 5, 2018
1 parent 75affba commit e9e0bb0
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
2 changes: 1 addition & 1 deletion buildAndPackageOpenCV.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ done

CMAKE_INSTALL_PREFIX=$INSTALL_DIR

source scripts/jetson_variables
source scripts/jetson_variables.sh

# Print out the current configuration
echo "Build configuration: "
Expand Down
2 changes: 1 addition & 1 deletion buildOpenCV.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ done

CMAKE_INSTALL_PREFIX=$INSTALL_DIR

source scripts/jetson_variables
source scripts/jetson_variables.sh

# Print out the current configuration
echo "Build configuration: "
Expand Down
14 changes: 12 additions & 2 deletions scripts/jetson_variables → scripts/jetson_variables.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ if [ -f /sys/module/tegra_fuse/parameters/tegra_chip_id ]; then
esac
JETSON_DESCRIPTION="NVIDIA Jetson $JETSON_BOARD"
fi
export JETSON_BOARD

# NVIDIA Jetson version
# reference https://devtalk.nvidia.com/default/topic/860092/jetson-tk1/how-do-i-know-what-version-of-l4t-my-jetson-tk1-is-running-/
Expand All @@ -54,7 +55,7 @@ if [ -f /etc/nv_tegra_release ]; then

# Load release and revision
JETSON_L4T_RELEASE=$(echo $JETSON_L4T_STRING | cut -f 1 -d ',' | sed 's/\# R//g' | cut -d ' ' -f1)
JETSON_L4T_REVISION=$(echo $JETSON_L4T_STRING | cut -f 2 -d ',' | sed 's/\ REVISION: //g' | cut -d. -f1)
JETSON_L4T_REVISION=$(echo $JETSON_L4T_STRING | cut -f 2 -d ',' | sed 's/\ REVISION: //g' )
# unset variable
unset JETSON_L4T_STRING

Expand All @@ -65,13 +66,17 @@ if [ -f /etc/nv_tegra_release ]; then
# https://developer.nvidia.com/embedded/jetpack-archive
if [ "$JETSON_BOARD" = "TX2i" ] ; then
case $JETSON_L4T in
"28.2.1")
JETSON_JETPACK="3.2.1" ;;
"28.2")
JETSON_JETPACK="3.2" ;;
*)
JETSON_JETPACK="UNKNOWN" ;;
esac
elif [ "$JETSON_BOARD" = "TX2" ] ; then
case $JETSON_L4T in
"28.2.1")
JETSON_JETPACK="3.2.1" ;;
"28.2")
JETSON_JETPACK="3.2" ;;
"28.1")
Expand All @@ -84,7 +89,7 @@ if [ -f /etc/nv_tegra_release ]; then
elif [ "$JETSON_BOARD" = "TX1" ] ; then
case $JETSON_L4T in
"28.2")
JETSON_JETPACK="3.2" ;;
JETSON_JETPACK="3.2 or 3.2.1" ;;
"28.1")
JETSON_JETPACK="3.1" ;;
"24.2.1")
Expand Down Expand Up @@ -134,6 +139,11 @@ else
JETSON_OPENCV="NOT INSTALLED"
fi

export JETSON_BOARD
export JETSON_CUDA
export JETSON_JETPACK
export JETSON_L4T

# TODO Add enviroments variables:
# - UID -> https://devtalk.nvidia.com/default/topic/996988/jetson-tk1/chip-uid/post/5100481/#5100481
# - GCID, BOARD, EABI
Expand Down

0 comments on commit e9e0bb0

Please sign in to comment.