Difference between revisions of "Nvidia Jetson: Flashing Custom Firmware"
| Line 27: | Line 27: | ||
# The configurations can be found within a <code>.config</code> file located within the same directory. Copy the contents and locate the <code>defconfig</code> file in <code>./arch/arm64/configs/</code>, overwriting it with the copied contents. | # The configurations can be found within a <code>.config</code> file located within the same directory. Copy the contents and locate the <code>defconfig</code> file in <code>./arch/arm64/configs/</code>, overwriting it with the copied contents. | ||
| + | == Building Custom Kernel and Installing Modules == | ||
| + | # Navigate back out to <code>sources</code>. | ||
| + | # Define the Cross-compilation toolchain with the commands <code>export CROSS_COMPILE=<toolchain-path>/bin/aarch64-buildroot-linux-gnu-</code>. If installation was done correctly as per the pre-requisites section, the command <code>export CROSS_COMPILE=$HOME/l4t-gcc/aarch64--glibc--stable-2022.08-1/bin/aarch64-buildroot-linux-gnu-</code> should work. | ||
| + | # Define the Cross-compilation toolchain with the commands <code>export CROSS_COMPILE_AARCH64_PATH=</code>, and <code>export CROSS_COMPILE_AARCH64=/bin/aarch64-buildroot-linux-gnu-</code>. (Potentially deprecated) | ||
| + | # Inside the sources, directory, make an output directory for built kernel files using <code>mkdir kernel_out</code>. | ||
| + | # Build the modules using the command <code>./nvbuild.sh -o kernel_out</code>. | ||
# | # | ||
Revision as of 23:04, 29 August 2024
Contents
Flashing Standard Firmware
SDKManager
SDKManager is available only on Linux, and can be installed here: https://developer.nvidia.com/sdk-manager
- 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)
Pre-requisites
- Please install required packages with the command
sudo apt install build-essential bc && sudo apt install build-essential bc.
Downloading the Toolchain
- Download the Toolchain binaries located in
https://developer.nvidia.com/embedded/jetson-linux. - From there,
mkdir $HOME/l4t-gcc,cd $HOME/l4t-gccand extract the installed toolchain into this newly created directory using thetarcommand.
Downloading the Kernel
- Follow steps 1 to 3 as mentioned in Flashing Standard Firmware.
- 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.
- When prompted to actually flash the Jetson, opt to skip. This will install the
nvidiafolder on your home directory, in which therootfs,kernel, andbootloaderare located. - Navigate to
nvidiaandcdthrough its subdirectories, untilLinux for Tegrais reached. - Inside
Linux for Tegra,cdinto thesourcesfolder. It should be unpopulated with the exception of some bash scripts. Run thesource_sync.shscript and when asked to specify the release tag of the downloadable sources, enterjetson_36.3. This will install the sources for the respective Jetson version as necessary. To find the release tag of future iterations of the Jetson firmware, please refer to its respective release notes. - Once sources have been synced, the
sourcesdirectory should now be populated with the required files.
Customizing Kernel
- Within
source, enter thekerneleventually navigate to thekernel-jammy-srcfolder and runmake menuconfig ARCH=arm64. This will bring up a UI with configurable drivers and peripherals. Select desired configurations and save. - The configurations can be found within a
.configfile located within the same directory. Copy the contents and locate thedefconfigfile in./arch/arm64/configs/, overwriting it with the copied contents.
Building Custom Kernel and Installing Modules
- Navigate back out to
sources. - Define the Cross-compilation toolchain with the commands
export CROSS_COMPILE=<toolchain-path>/bin/aarch64-buildroot-linux-gnu-. If installation was done correctly as per the pre-requisites section, the commandexport CROSS_COMPILE=$HOME/l4t-gcc/aarch64--glibc--stable-2022.08-1/bin/aarch64-buildroot-linux-gnu-should work. - Define the Cross-compilation toolchain with the commands
export CROSS_COMPILE_AARCH64_PATH=, andexport CROSS_COMPILE_AARCH64=/bin/aarch64-buildroot-linux-gnu-. (Potentially deprecated) - Inside the sources, directory, make an output directory for built kernel files using
mkdir kernel_out. - Build the modules using the command
./nvbuild.sh -o kernel_out.