Last active
June 6, 2023 04:32
-
-
Save rationalsa/803859153892a9278ad826aabb4276fe to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# run this script by executing: | |
# wget https://gist.githubusercontent.com/rationalsa/803859153892a9278ad826aabb4276fe/raw/jetson_nano_flash_bootloader.sh | |
# bash jetson_nano_flash_bootloader.sh | |
BSP=https://developer.nvidia.com/downloads/remetpack-463r32releasev73t210jetson-210linur3273aarch64tbz2 | |
VER=32.7.3 | |
SHA256=3e7c304b56c2c9f2ca865d560d22e8ab3d99d2e79d782342fb0fb1c4a5e7946e | |
BSP_FILENAME="l4t_$VER.tar.bz2" | |
BSP_DIR="l4t_$VER" | |
set -e | |
if [ ! -d "$BSP_DIR" ]; then | |
echo "It doesn't look like we have a copy of the BSP unpacked yet..." | |
if [ ! -f "$BSP_FILENAME" ]; then | |
echo "Downloading the L4T $VER BSP..." | |
wget "$BSP" -O "$BSP_FILENAME" | |
echo "Downloading done" | |
fi | |
if echo "$SHA256 $BSP_FILENAME" | sha256sum -c &> /dev/null ; then | |
echo "Checksum matched; the BSP archive is okay" | |
else | |
echo "Unexpected checksum, did the download fail?" | |
exit 1 | |
fi | |
echo "Unpacking the BSP..." | |
tar xf "$BSP_FILENAME" | |
mv Linux_for_Tegra "$BSP_DIR" | |
fi | |
echo | |
echo "This will flash the bootloader to a Jetson Nano 4GB or 2GB devkit in recovery mode" | |
echo "This won't work correctly on a production Jetson Nano module with an eMMC" | |
echo "If you're using a production Jetson Nano module, press Ctrl+C to cancel" | |
echo | |
echo "To put your Jetson Nano devkit in recovery mode:" | |
echo " * bridge pins FC_REC and GND on the pin header underneath the Jetson Nano module" | |
echo " * apply power" | |
echo " * connect your Jetson Nano to your computer using a micro USB cable" | |
echo | |
read -p "Press enter when ready" | |
echo | |
echo "Enter your password if prompted for sudo access" | |
cd "$BSP_DIR" | |
sudo ./flash.sh jetson-nano-qspi mmcblk0p1 | |
echo "All done" | |
echo "If you've installed a jumper to the FC_REC pin, remember to remove it" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment