Difference between revisions of "Nvidia Jetson: Flashing Custom Firmware"

From Humanoid Robots Wiki
Jump to: navigation, search
Line 1: Line 1:
= Developing Custom Firmware =  
+
= Flashing Standard Firmware =
== For the Jetson Orin Nano ==
+
== SDKManager ==
 
+
SDKManager is available only on Linux, and can be installed here: https://developer.nvidia.com/sdk-manager
= Flashing =
+
# Start up the SDKManager
 +
# Put the Jetson into recovery mode. For the AGX, this can be done by pressing the recovery button while powering on the device. For the Nano and NX, however, a jumper will be required.
 +
# Connect the Target Jetson to the host device and ensure that the target device is recognized.
 +
# Follow the instructions on the application, choosing configurations as necessary.
 
   
 
   
  
 
+
= Flashing Custom Firmware (For Jetson 36.3) =
Notes:
+
# Repeat Steps 1 to 3 as mentioned in Flashing Standard Firmware.
- Current Design constraints:
+
# Proceed to the second step of the SDKManager, where the respective individual dependencies and Jetson Images are listed and are to be installed. Proceed with the installation.
  - Based off of the availability of parts in JLCPCB. Possibility of parts not being found or existing.
+
# When prompted to actually flash the Jetson, opt to skip. This will install the <code>nvidia</code> folder on your home directory, in which the <code>rootfs</code>, <code>kernel,</code> and <code>bootloader</code> are located.
  -
+
# Navigate to <code>nvidia</code> and <code>cd</code> through its subdirectories, until <code>Linux for Tegra</code> is reached.
 
+
# Inside <code>Linux for Tegra</code>, <code>cd</code> into the <code>sources</code> folder. It should be unpopulated with the exception of some bash scripts. Run the <code>source_sync.sh</code> script and when asked to specify the release of the downloadable sources, enter <code>jetson_36.3</code>. This will install the
- Flashing is done with the flash.sh script through the following command
 
$ sudo ./flash.sh <board> <rootdev>
 
where board is the actual board (Jetson-Nano-XX, etc.)
 
rootdev determines what type of device is being flahed. Use mmcblk0pc1 to flash a local storage device (eMMC or SD card)
 
- TO begin flashing, put the device into force recovery mode and then press reset.
 
- Run the flash script using the previous command specified.
 
 
 
Flash using a convenient script:
 
- To avoid having to specify the rootdev and the board configurations, can use the custom flashing script:
 
  -
 
 
 
Using GPIO Pins to program protocol:
 
- you can use the rasberry pi libraries to interface with the pins, configuring them to whatever layout that is needed.
 
  - Example: it is possible to direclty interface with the i2c system in the nano by using the linux terminal itself.
 
 
 
 
 
Current Game Plan:
 
- mess around with the programming of the GPIO pins: Figure out if there are ways to choose access teh data that the GPIO pins are Or Receiving.
 
Test if it is possible to reconfigure the pins on the jetson on the firmware side
 
 
 
Build Time:
 
- On a single Nvidia Nano, it takes about 45 mins - 1 hour to complete the build. The build is encrypted through RSA. The source is still accessible and every time changes are made to the source files and want ot be reflected, the build files have to be remade. Current goal (Figure out if there's a way to make specific build files to decrease development time).
 
 
 
 
 
 
 
Notes:
 
- General requirements to build Linux kernel still apply: e.g. `build-essentials`, `bc`, `libssl-dev`, etc
 
- Need to install `libssl-dev (depends on whether the certain packages are included when running the script)
 
 
 
 
 
Current Approaches to Flashing:
 
- Decompile an existing DTB file into DTS, make appropriate changes then recompile back.
 
- Take a flash image that already exists and flash back onto the jetson:
 
- Caveats: Ensure that the current Jetson is running on Jetpack 5+. If not, you will need to flash 5 on it before flashing it to six. There are instructions online that deal with this setup.
 
-
 

Revision as of 06:29, 28 August 2024

Flashing Standard Firmware

SDKManager

SDKManager is available only on Linux, and can be installed here: https://developer.nvidia.com/sdk-manager

  1. Start up the SDKManager
  2. Put the Jetson into recovery mode. For the AGX, this can be done by pressing the recovery button while powering on the device. For the Nano and NX, however, a jumper will be required.
  3. Connect the Target Jetson to the host device and ensure that the target device is recognized.
  4. Follow the instructions on the application, choosing configurations as necessary.


Flashing Custom Firmware (For Jetson 36.3)

  1. Repeat Steps 1 to 3 as mentioned in Flashing Standard Firmware.
  2. Proceed to the second step of the SDKManager, where the respective individual dependencies and Jetson Images are listed and are to be installed. Proceed with the installation.
  3. When prompted to actually flash the Jetson, opt to skip. This will install the nvidia folder on your home directory, in which the rootfs, kernel, and bootloader are located.
  4. Navigate to nvidia and cd through its subdirectories, until Linux for Tegra is reached.
  5. Inside Linux for Tegra, cd into the sources folder. It should be unpopulated with the exception of some bash scripts. Run the source_sync.sh script and when asked to specify the release of the downloadable sources, enter jetson_36.3. This will install the