Jetson Nano/Development/Building the Kernel from Source: Difference between revisions

From RidgeRun Developer Wiki
mNo edit summary
 
(20 intermediate revisions by 5 users not shown)
Line 1: Line 1:
<noinclude>
<noinclude>
{{JetsonNano/Head|previous=Introduction/Getting_Started|next=GStreamer/Accelerated_Elements|keywords=jetson nano kernel, DTB, build, compile, flashing, clone,clonning the image,compiling the kernel,downloading the kernel source,downloading the kernel,kernel source,source code|title=How to build NVIDIA Jetson Nano kernel|description=This page provides the steps to compile,build and flashing the kernel,DTBs and to clone a sdcard image}}
{{JetsonNano/Head|previous=Development/Getting_into_the_Board|next=GStreamer/Accelerated_Elements|metakeywords=jetson nano kernel, DTB, build, compile, flashing, clone, cloning the image, compiling the kernel, downloading the kernel source, downloading the kernel, kernel source, source code|title=How to build NVIDIA Jetson Nano kernel|metadescription=This page provides the steps to compile, build and flashing the kernel, DTBs and to clone a sdcard image}}
</noinclude>
</noinclude>


Line 7: Line 7:
-->
-->


= Compiling the kernel sources =
== Introduction ==
==Dependencies==
The first step is to install some important dependencies, make sure you have installed this before compile the kernel sources.
<pre>
sudo apt install build-essential bc bzip2 xz-utils git-core vim-common
</pre>


== Environment variables ==
This wiki page contains instructions to download and build kernel source code for Jetson Nano, several parts of this wiki were based in the document: [https://docs.nvidia.com/jetson/archives/l4t-archived/l4t-3231/index.html NVIDIA Tegra Linux Driver Package Development Guide 32.3.1].
These environment variables are used to compile the kernel and belong to the L4T 32.1 release.  
<pre>
VERSION=32-1-0
TOOLCHAIN_SRC=kernel-gcc-6-4-tool-chain
TOOLCHAIN_DIR=gcc-linaro-6.4.1-2017.08-x86_64_aarch64-linux-gnu
KERNEL_SRC=l4t-sources-32-1-0
KERNEL_DIR=kernel-4.9
CC_PREFIX=aarch64-linux-gnu-
</pre>


== Toolchain ==
L4T 32.3.1 is used by [https://developer.nvidia.com/embedded/jetpack JetPack 4.3] (You can get more information from [https://developer.nvidia.com/embedded/jetpack-archive jetpack-archive]).
In order to compile the kernel sources you need to install the toolchain just running the next commands:  
<pre>
cd ~
mkdir -p toolchain_bin_$VERSION
cd toolchain_bin_$VERSION


# Reuse existing download, if any
Previous versions:
if ! test -e ${TOOLCHAIN_SRC}.tar.gz; then
wget -O ${TOOLCHAIN_SRC}.tar.gz https://developer.nvidia.com/embedded/dlc/${TOOLCHAIN_SRC}
tar -xf ${TOOLCHAIN_SRC}.tar.gz
fi
</pre>


== Downloading Kernel sources ==
* [[Compiling_Jetson_Nano_source_code_L4T_32.2.1 | Compiling Jetson Nano source code L4T 32.2.1]]
In this step you need to have installed JetPack 4.2 for nano boards.  
* [[Compiling_Jetson_Nano_source_code_L4T_32.1 | Compiling Jetson Nano source code L4T 32.1]]
<pre>
JETPACK=~/JetPack-L4T-4.2
cd ${JETPACK}/JetPack_4.2_Linux_P3448/Linux_for_Tegra/
./source_sync.sh


##
==Build Kernel==
# When prompted, use: tegra-l4t-r32.1 as the tag (change accordingly)
##
</pre>
== Compiling the Kernel sources ==
Once you have downloaded the kernel sources and you have installed the toolchain you will be able to start compiling the kernel sources.
<pre>
JETPACK=~/JetPack-L4T-4.2
CROSS_COMPILE=${HOME}/toolchain_bin_${VERSION}/${TOOLCHAIN_DIR}/bin/$CC_PREFIX
KERNEL_OUT=${JETPACK}/JetPack_4.2_Linux_P3448/Linux_for_Tegra/sources/kernel/${KERNEL_DIR}/build
KERNEL_MODULES_OUT=${JETPACK}/JetPack_4.2_Linux_P3448/Linux_for_Tegra/rootfs


cd ${JETPACK}/JetPack_4.2_Linux_P3448/Linux_for_Tegra/sources/kernel/${KERNEL_DIR}
Follow these instructions to build and install the kernel image and device tree.
mkdir -p $KERNEL_OUT


# Create the .config file
===1. Download and install the Toolchain===
make ARCH=arm64 O=$KERNEL_OUT tegra_defconfig
NVIDIA recommends using the Linaro 7.3.1 2018.05 toolchain for L4T 32.3 ([https://docs.nvidia.com/jetson/archives/l4t-archived/l4t-3231/index.html#page/Tegra%2520Linux%2520Driver%2520Package%2520Development%2520Guide%2Fxavier_toolchain.html%23 Toolchain])
make ARCH=arm64 O=$KERNEL_OUT menuconfig


# Build the kernel and DTBs
Download the pre-built toolchain binaries from: http://releases.linaro.org/components/toolchain/binaries/7.3-2018.05/aarch64-linux-gnu/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu.tar.xz
make ARCH=arm64 O=$KERNEL_OUT CROSS_COMPILE=${CROSS_COMPILE} -j4
</pre>


= Flashing Jetson Nano completely including FS =
<syntaxhighlight lang="bash">
With the next command you will be able to flash the kernel image, dtb and also file system.  
wget http://releases.linaro.org/components/toolchain/binaries/7.3-2018.05/aarch64-linux-gnu/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu.tar.xz
<pre>
</syntaxhighlight>
# flash whole file system
 
sudo ./flash.sh jetson-nano-qspi-sd mmcblk0p1
Execute the following commands to extract the toolchain:
</pre>
<syntaxhighlight lang="bash">
mkdir $HOME/l4t-gcc
cd $HOME/l4t-gcc
tar xf gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu.tar.xz
</syntaxhighlight>
 
===2. Download the kernel sources===
You can download the kernel source files and then manually extract them. it is recommended to instead sync with git.
 
In a browser, navigate to: https://developer.nvidia.com/embedded/downloads. Locate and download the L4T Sources for your release. (L4T Sources 32.3.1 2019/12/17) or run the command below:
 
<syntaxhighlight lang="bash">
wget https://developer.download.nvidia.com/embedded/L4T/r32-3-1_Release_v1.0/Sources/T210/public_sources.tbz2
</syntaxhighlight>
Execute the following commands to extract the kernel:
<syntaxhighlight lang="bash">
tar -xvf public_sources.tbz2
cd Linux_for_Tegra/source/public
JETSON_NANO_KERNEL_SOURCE=$(pwd)
tar -xf kernel_src.tbz2
</syntaxhighlight>
 
===3. Compile kernel and dtb===
Follow the steps:
 
<syntaxhighlight lang="bash">
cd $JETSON_NANO_KERNEL_SOURCE
TOOLCHAIN_PREFIX=$HOME/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-
TEGRA_KERNEL_OUT=$JETSON_NANO_KERNEL_SOURCE/build
KERNEL_MODULES_OUT=$JETSON_NANO_KERNEL_SOURCE/modules
make -C kernel/kernel-4.9/ ARCH=arm64 O=$TEGRA_KERNEL_OUT LOCALVERSION=-tegra CROSS_COMPILE=${TOOLCHAIN_PREFIX} tegra_defconfig
make -C kernel/kernel-4.9/ ARCH=arm64 O=$TEGRA_KERNEL_OUT LOCALVERSION=-tegra CROSS_COMPILE=${TOOLCHAIN_PREFIX} -j8 --output-sync=target zImage
make -C kernel/kernel-4.9/ ARCH=arm64 O=$TEGRA_KERNEL_OUT LOCALVERSION=-tegra CROSS_COMPILE=${TOOLCHAIN_PREFIX} -j8 --output-sync=target modules
make -C kernel/kernel-4.9/ ARCH=arm64 O=$TEGRA_KERNEL_OUT LOCALVERSION=-tegra CROSS_COMPILE=${TOOLCHAIN_PREFIX} -j8 --output-sync=target dtbs
make -C kernel/kernel-4.9/ ARCH=arm64 O=$TEGRA_KERNEL_OUT LOCALVERSION=-tegra INSTALL_MOD_PATH=$KERNEL_MODULES_OUT modules_install
</syntaxhighlight>
 
==Flash Jetson NANO==
This guide assumes that the user already has sdk-manager installed. This link contains details about how to install sdk-manager: https://developer.nvidia.com/nvidia-sdk-manager https://docs.nvidia.com/sdk-manager/download-run-sdkm/index.html
 
NVIDIA_SDK_MANAGER contains the directory where NVIDIA SDK manager was installed. For example.
<syntaxhighlight lang="bash">
export NVIDIA_SDK_MANAGER=$HOME/nvidia/nvidia_sdk/
</syntaxhighlight>
===Select DTB and directory based on Jetson Nano module type===
 
====Production module (P3448-0020)====
<syntaxhighlight lang="bash">
export DTB=tegra210-p3448-0002-p3449-0000-b00.dtb
JETPACK_4_3_P3448=${NVIDIA_SDK_MANAGER}/JetPack_4.3_Linux_P3448-0020/Linux_for_Tegra
</syntaxhighlight>
 
====Devkit module (P3448)====
<syntaxhighlight lang="bash">
export DTB=tegra210-p3448-0000-p3449-0000-a02.dtb
JETPACK_4_3_P3448=${NVIDIA_SDK_MANAGER}/JetPack_4.3_Linux_P3448/Linux_for_Tegra
</syntaxhighlight>
Make sure the Jetson Nano is in recovery mode
 
===Copy kernel, device tree and modules into jetpack===
 
<syntaxhighlight lang="bash">
cd ${JETPACK_4_3_P3448}
# Copy kernel generated
cp $JETSON_NANO_KERNEL_SOURCE/build/arch/arm64/boot/Image kernel/
# Copy device tree generated
cp $JETSON_NANO_KERNEL_SOURCE/build/arch/arm64/boot/dts/${DTB} kernel/dtb/
</syntaxhighlight>


=Flash custom DTB on the Jetson Nano=
===Apply root filesystem patch===
With the next command you will be able to flash only the device tree, excluding kernel image and filesystem, just make sure to put the board in recovery mode.
<pre>
#flash just DTB
cd ${JETPACK}/JetPack_4.2_Linux_P3448/Linux_for_Tegra/
cp sources/kernel/kernel-4.9/build/arch/arm64/boot/dts/tegra210-p3448-0000-p3449-0000-a02.dtb kernel/dtb/
sudo ./flash.sh -r -k DTB jetson-nano-qspi-sd mmcblk0p1
</pre>


==Flash DTB from the Jetson device itself==
With the default root file system, the changes in the device tree are lost when the board is powered off. This is a known issue (https://devtalk.nvidia.com/default/topic/1072091/jetson-nano/how-to-modify-the-dts-file-for-jetson-nano-board/)
Apply this patch to avoid losing the changes added to the device tree.


The DTB file needs to be placed into a specific partition and signed as encrypted.
====Create patch file====


* Generate the encrypted DTB:
Patch: fix_dtb_lost.patch
<pre>
<syntaxhighlight lang="diff">
cp sources/kernel/kernel-4.9/build/arch/arm64/boot/dts/tegra210-p3448-0000-p3449-0000-a02.dtb kernel/dtb/
diff --git a/rootfs/opt/nvidia/l4t-bootloader-config/nv-l4t-bootloader-config.sh b/rootfs/opt/nvidia/l4t-bootloader-config/nv-l4t-bootloader-config.sh
sudo ./create-jetson-nano-sd-card-image.sh -o sd-blob.img -s 4G -r 200
index 921efc2..fe60093 100755
# The above command will generate the encrypted dtb on the following path:
--- a/rootfs/opt/nvidia/l4t-bootloader-config/nv-l4t-bootloader-config.sh
# ${JETPACK}/JetPack_4.2_Linux_P3448/Linux_for_Tegra/bootloader/signed/tegra210-p3448-0000-p3449-0000-a02.dtb.encrypt
+++ b/rootfs/opt/nvidia/l4t-bootloader-config/nv-l4t-bootloader-config.sh
</pre>
@@ -123,7 +123,7 @@ t210ref_update_qspi_check () {
                        # need to update QSPI
                        return 0
                elif (( "${sys_maj_rev}" == "${qspi_maj_rev}" )); then
-                      if (( "${sys_min_rev}" >= "${qspi_min_rev}" )); then
+                      if (( "${sys_min_rev}" > "${qspi_min_rev}" )); then
                                # sys_rel == qspi_rel
                                # sys_maj_rev == qspi_maj_rev
                                # sys_min_rev >= qspi_min_rev
</syntaxhighlight>


* Flash the encrypted DTB to the DTB partition:
====Apply the patch====
<pre>
# Pull the SD card out of the Nano and put into your Linux machine
sudo dd if=${JETPACK}/JetPack_4.2_Linux_P3448/Linux_for_Tegra/bootloader/signed/tegra210-p3448-0000-p3449-0000-a02.dtb.encrypt of=/dev/<DTB_PARTITION>
# This will program the DTB file into the DTB partition. Use the "ls -al /dev/disk/by-partlabel" command on your Linux host machine to check for the NANO SD card DTB partition.
# Put the SD card back in the Nano and reboot


#Also, you could transfer the tegra210-p3448-0000-p3449-0000-a02.dtb.encrypt file to the nano board and flash it from the Nano board itself.
<syntaxhighlight lang="bash">
sudo dd if=tegra210-p3448-0000-p3449-0000-a02.dtb.encrypt of=/dev/<DTB_PARTITION>
cd ${JETPACK_4_3_P3448}
sudo patch -p 1 < fix_dtb_lost.patch
</syntaxhighlight>


#Verify which is your JETSON NANO DTB partition
===Flash memory===
nvidia@nvidia:~$ ls -al /dev/disk/by-partlabel
Make sure the Jetson NANO is in recovery mode.
total 0
drwxr-xr-x 2 root root 320 jun 21 08:16 .
drwxr-xr-x 8 root root 160 jun 21 08:16 ..
lrwxrwxrwx 1 root root  15 jun 21 08:16 APP -> ../../mmcblk0p1
lrwxrwxrwx 1 root root  16 jun 21 08:16 BMP -> ../../mmcblk0p13
lrwxrwxrwx 1 root root  15 jun 21 08:16 BPF -> ../../mmcblk0p6
lrwxrwxrwx 1 root root  15 jun 21 08:16 BPF-DTB -> ../../mmcblk0p7
lrwxrwxrwx 1 root root  16 jun 21 08:16 DTB -> ../../mmcblk0p10    # This is the DTB PARTITION WERE THE ENCRYPTED DTB FILE SHOULD BE FLASHED
lrwxrwxrwx 1 root root  15 jun 21 08:16 EBT -> ../../mmcblk0p4
lrwxrwxrwx 1 root root  16 jun 21 08:16 EKS -> ../../mmcblk0p12
lrwxrwxrwx 1 root root  15 jun 21 08:16 FX -> ../../mmcblk0p8
lrwxrwxrwx 1 root root  16 jun 21 08:16 LNX -> ../../mmcblk0p11
lrwxrwxrwx 1 root root  15 jun 21 08:16 RP1 -> ../../mmcblk0p3
lrwxrwxrwx 1 root root  16 jun 21 08:16 RP4 -> ../../mmcblk0p14
lrwxrwxrwx 1 root root  15 jun 21 08:16 TBC -> ../../mmcblk0p2
lrwxrwxrwx 1 root root  15 jun 21 08:16 TOS -> ../../mmcblk0p9
lrwxrwxrwx 1 root root  15 jun 21 08:16 WB0 -> ../../mmcblk0p5


#Reboot board
====Flash production module====
sudo reboot
<syntaxhighlight lang="bash">
</pre>
sudo ./flash.sh jetson-nano-emmc mmcblk0p1
</syntaxhighlight>


=Flash Custom Kernel Image =
====Flash Devkit module====
In order to replace the kernel image you need to copy the '''Image''' file to the Jetson nano to the directory /boot/
<syntaxhighlight lang="bash">
send the custom kernel image binary to the Jetson Nano:
sudo ./flash.sh jetson-nano-qspi-sd mmcblk0p1
<pre>
</syntaxhighlight>
NANO_IP=10.251.101.144
scp sources/kernel/kernel-4.9/build/arch/arm64/boot/Image nvidia@<$NANO_IP>:
</pre>


Then in the Jetson Nano board replace the file as: 
====Flash device tree only====
<pre>
This command flashes only the device tree, excluding the kernel image and filesystem. Make sure the Jetson NANO is in recovery mode.
cd ~/
sudo cp Image /boot/
sudo mv /lib/modules/4.9.140-tegra/ /lib/modules/4.9.140
sudo reboot
</pre>
Reboot the system after replacing the Image is important.


= SDcard Image Clone =
<syntaxhighlight lang="bash">
In order to clone a SDcard Image with all the partitions required by the Jetson Nano run the following command:
cd ${JETPACK_4_3_P3448}
<pre>
# Copy device tree generated
sudo dd if=/dev/mmcblk0 of=sdimage-jetson-nano.img bs=4M
cp $JETSON_NANO_KERNEL_SOURCE/build/arch/arm64/boot/dts/${DTB} kernel/dtb/
</pre>
</syntaxhighlight>


To flash the SDcard with the previous content run the following command:
=====Flash production module DTB=====
<syntaxhighlight lang="bash">
sudo ./flash.sh -r -k DTB jetson-nano-emmc mmcblk0p1
</syntaxhighlight>


<pre>
=====Flash Devkit module DTB=====
sudo dd if=sdimage-jetson-nano.img of=/dev/mmcblk0 bs=1M
<syntaxhighlight lang="bash">
</pre>
sudo ./flash.sh -r -k DTB jetson-nano-qspi-sd mmcblk0p1
</syntaxhighlight>


<noinclude>
<noinclude>
{{JetsonNano/Foot|Introduction/Getting_Started|GStreamer/Accelerated_Elements}}
{{JetsonNano/Foot|Development/Getting_into_the_Board|GStreamer/Accelerated_Elements}}
</noinclude>
</noinclude>
[[Category:JetsonNano]][[Category:Jetson]]
[[Category:JetsonNano]][[Category:Jetson]]

Latest revision as of 12:30, 8 May 2024



Previous: Development/Getting_into_the_Board Index Next: GStreamer/Accelerated_Elements





Introduction

This wiki page contains instructions to download and build kernel source code for Jetson Nano, several parts of this wiki were based in the document: NVIDIA Tegra Linux Driver Package Development Guide 32.3.1.

L4T 32.3.1 is used by JetPack 4.3 (You can get more information from jetpack-archive).

Previous versions:

Build Kernel

Follow these instructions to build and install the kernel image and device tree.

1. Download and install the Toolchain

NVIDIA recommends using the Linaro 7.3.1 2018.05 toolchain for L4T 32.3 (Toolchain)

Download the pre-built toolchain binaries from: http://releases.linaro.org/components/toolchain/binaries/7.3-2018.05/aarch64-linux-gnu/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu.tar.xz

wget http://releases.linaro.org/components/toolchain/binaries/7.3-2018.05/aarch64-linux-gnu/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu.tar.xz

Execute the following commands to extract the toolchain:

mkdir $HOME/l4t-gcc
cd $HOME/l4t-gcc
tar xf gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu.tar.xz

2. Download the kernel sources

You can download the kernel source files and then manually extract them. it is recommended to instead sync with git.

In a browser, navigate to: https://developer.nvidia.com/embedded/downloads. Locate and download the L4T Sources for your release. (L4T Sources 32.3.1 2019/12/17) or run the command below:

wget https://developer.download.nvidia.com/embedded/L4T/r32-3-1_Release_v1.0/Sources/T210/public_sources.tbz2

Execute the following commands to extract the kernel:

tar -xvf public_sources.tbz2
cd Linux_for_Tegra/source/public
JETSON_NANO_KERNEL_SOURCE=$(pwd)
tar -xf kernel_src.tbz2

3. Compile kernel and dtb

Follow the steps:

cd $JETSON_NANO_KERNEL_SOURCE
TOOLCHAIN_PREFIX=$HOME/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-
TEGRA_KERNEL_OUT=$JETSON_NANO_KERNEL_SOURCE/build
KERNEL_MODULES_OUT=$JETSON_NANO_KERNEL_SOURCE/modules
make -C kernel/kernel-4.9/ ARCH=arm64 O=$TEGRA_KERNEL_OUT LOCALVERSION=-tegra CROSS_COMPILE=${TOOLCHAIN_PREFIX} tegra_defconfig
make -C kernel/kernel-4.9/ ARCH=arm64 O=$TEGRA_KERNEL_OUT LOCALVERSION=-tegra CROSS_COMPILE=${TOOLCHAIN_PREFIX} -j8 --output-sync=target zImage
make -C kernel/kernel-4.9/ ARCH=arm64 O=$TEGRA_KERNEL_OUT LOCALVERSION=-tegra CROSS_COMPILE=${TOOLCHAIN_PREFIX} -j8 --output-sync=target modules
make -C kernel/kernel-4.9/ ARCH=arm64 O=$TEGRA_KERNEL_OUT LOCALVERSION=-tegra CROSS_COMPILE=${TOOLCHAIN_PREFIX} -j8 --output-sync=target dtbs
make -C kernel/kernel-4.9/ ARCH=arm64 O=$TEGRA_KERNEL_OUT LOCALVERSION=-tegra INSTALL_MOD_PATH=$KERNEL_MODULES_OUT modules_install

Flash Jetson NANO

This guide assumes that the user already has sdk-manager installed. This link contains details about how to install sdk-manager: https://developer.nvidia.com/nvidia-sdk-manager https://docs.nvidia.com/sdk-manager/download-run-sdkm/index.html

NVIDIA_SDK_MANAGER contains the directory where NVIDIA SDK manager was installed. For example.

export NVIDIA_SDK_MANAGER=$HOME/nvidia/nvidia_sdk/

Select DTB and directory based on Jetson Nano module type

Production module (P3448-0020)

export DTB=tegra210-p3448-0002-p3449-0000-b00.dtb
JETPACK_4_3_P3448=${NVIDIA_SDK_MANAGER}/JetPack_4.3_Linux_P3448-0020/Linux_for_Tegra

Devkit module (P3448)

export DTB=tegra210-p3448-0000-p3449-0000-a02.dtb
JETPACK_4_3_P3448=${NVIDIA_SDK_MANAGER}/JetPack_4.3_Linux_P3448/Linux_for_Tegra

Make sure the Jetson Nano is in recovery mode

Copy kernel, device tree and modules into jetpack

cd ${JETPACK_4_3_P3448}
# Copy kernel generated
cp $JETSON_NANO_KERNEL_SOURCE/build/arch/arm64/boot/Image kernel/
# Copy device tree generated
cp $JETSON_NANO_KERNEL_SOURCE/build/arch/arm64/boot/dts/${DTB} kernel/dtb/

Apply root filesystem patch

With the default root file system, the changes in the device tree are lost when the board is powered off. This is a known issue (https://devtalk.nvidia.com/default/topic/1072091/jetson-nano/how-to-modify-the-dts-file-for-jetson-nano-board/) Apply this patch to avoid losing the changes added to the device tree.

Create patch file

Patch: fix_dtb_lost.patch

diff --git a/rootfs/opt/nvidia/l4t-bootloader-config/nv-l4t-bootloader-config.sh b/rootfs/opt/nvidia/l4t-bootloader-config/nv-l4t-bootloader-config.sh
index 921efc2..fe60093 100755
--- a/rootfs/opt/nvidia/l4t-bootloader-config/nv-l4t-bootloader-config.sh
+++ b/rootfs/opt/nvidia/l4t-bootloader-config/nv-l4t-bootloader-config.sh
@@ -123,7 +123,7 @@ t210ref_update_qspi_check () {
                        # need to update QSPI
                        return 0
                elif (( "${sys_maj_rev}" == "${qspi_maj_rev}" )); then
-                       if (( "${sys_min_rev}" >= "${qspi_min_rev}" )); then
+                       if (( "${sys_min_rev}" > "${qspi_min_rev}" )); then
                                # sys_rel == qspi_rel
                                # sys_maj_rev == qspi_maj_rev
                                # sys_min_rev >= qspi_min_rev

Apply the patch

cd ${JETPACK_4_3_P3448}
sudo patch -p 1 < fix_dtb_lost.patch

Flash memory

Make sure the Jetson NANO is in recovery mode.

Flash production module

sudo ./flash.sh jetson-nano-emmc mmcblk0p1

Flash Devkit module

sudo ./flash.sh jetson-nano-qspi-sd mmcblk0p1

Flash device tree only

This command flashes only the device tree, excluding the kernel image and filesystem. Make sure the Jetson NANO is in recovery mode.

cd ${JETPACK_4_3_P3448}
# Copy device tree generated
cp $JETSON_NANO_KERNEL_SOURCE/build/arch/arm64/boot/dts/${DTB} kernel/dtb/
Flash production module DTB
sudo ./flash.sh -r -k DTB jetson-nano-emmc mmcblk0p1
Flash Devkit module DTB
sudo ./flash.sh -r -k DTB jetson-nano-qspi-sd mmcblk0p1


Previous: Development/Getting_into_the_Board Index Next: GStreamer/Accelerated_Elements