Skip to content

Commit

Permalink
Display NVIDIA license before syncing source
Browse files Browse the repository at this point in the history
  • Loading branch information
Arun-Prasad-V committed Jul 9, 2024
1 parent 71c0a61 commit f06ede7
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions scripts/patch-realsense-ubuntu-L4T.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,35 @@ exec 2> /dev/null
con_dev=$(ls /dev/video* | wc -l)
exec 2>&3

function DisplayNvidiaLicense {
patches_revison=$1

# verify that curl is installed
if ! which curl > /dev/null ; then
echo "curl is not installed."
echo "curl can be installed by 'sudo apt-get install curl'."
exit 1
fi

license_path="https://developer.nvidia.com/embedded/l4t/r35_release_v1.0/release/tegra_software_license_agreement-tegra-linux.txt"
if [ "5.0.2" = ${patches_revison} ]; then
license_path="https://developer.nvidia.com/embedded/l4t/r35_release_v1.0/release/tegra_software_license_agreement-tegra-linux.txt"
fi

if [ "6.0" = ${patches_revison} ]; then
license_path="https://developer.download.nvidia.com/embedded/L4T/r36_Release_v3.0/release/Tegra_Software_License_Agreement-Tegra-Linux.txt"
fi

echo -e "\nPlease notice: This script will download the kernel source (from nv-tegra, NVIDIA's public git repository) which is subject to the following license:\n\n${license_path}\n"

license="$(curl -L -s ${license_path})\n\n"

## display the page ##
echo -e "${license}"

read -t 30 -n 1 -s -r -e -p 'Press any key to continue (or wait 30 seconds..)'
}

if [ $con_dev -ne 0 ];
then
echo -e "\e[32m"
Expand Down Expand Up @@ -111,6 +140,10 @@ if [ "6.0" = "$PATCHES_REV" ]; then
TEGRA_TAG="jetson_36.3"
fi
cp ./scripts/Tegra/$TEGRA_SOURCE_SYNC_SH ${sdk_dir}/Tegra

# Display NVIDIA license
DisplayNvidiaLicense "$PATCHES_REV"

#Download NVIDIA source, disregard errors on module tag sync
./Tegra/$TEGRA_SOURCE_SYNC_SH -k ${TEGRA_TAG} || true
if [ "6.0" = "$PATCHES_REV" ]; then
Expand Down

0 comments on commit f06ede7

Please sign in to comment.