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

From RidgeRun Developer Wiki
 
(19 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.  
 
<syntaxhighlight lang="bash" style="background-color:cornsilk">
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]).
VERSION=32-1-0
 
TOOLCHAIN_SRC=kernel-gcc-6-4-tool-chain
Previous versions:
TOOLCHAIN_DIR=gcc-linaro-6.4.1-2017.08-x86_64_aarch64-linux-gnu
 
KERNEL_SRC=l4t-sources-32-1-0
* [[Compiling_Jetson_Nano_source_code_L4T_32.2.1 | Compiling Jetson Nano source code L4T 32.2.1]]
KERNEL_DIR=kernel-4.9
* [[Compiling_Jetson_Nano_source_code_L4T_32.1 | Compiling Jetson Nano source code L4T 32.1]]
CC_PREFIX=aarch64-linux-gnu-
 
==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 ([https://docs.nvidia.com/jetson/archives/l4t-archived/l4t-3231/index.html#page/Tegra%2520Linux%2520Driver%2520Package%2520Development%2520Guide%2Fxavier_toolchain.html%23 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
 
<syntaxhighlight lang="bash">
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
</syntaxhighlight>
 
Execute the following commands to extract the toolchain:
<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>
</syntaxhighlight>


== Toolchain ==
===2. Download the kernel sources===
In order to compile the kernel sources you need to install the toolchain just running the next commands:  
You can download the kernel source files and then manually extract them. it is recommended to instead sync with git.
<pre>
 
cd ~
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:
mkdir -p toolchain_bin_$VERSION
cd toolchain_bin_$VERSION


# Reuse existing download, if any
<syntaxhighlight lang="bash">
if ! test -e ${TOOLCHAIN_SRC}.tar.gz; then
wget https://developer.download.nvidia.com/embedded/L4T/r32-3-1_Release_v1.0/Sources/T210/public_sources.tbz2
wget -O ${TOOLCHAIN_SRC}.tar.gz https://developer.nvidia.com/embedded/dlc/${TOOLCHAIN_SRC}
</syntaxhighlight>
tar -xf ${TOOLCHAIN_SRC}.tar.gz
Execute the following commands to extract the kernel:
fi
<syntaxhighlight lang="bash">
</pre>
tar -xvf public_sources.tbz2
cd Linux_for_Tegra/source/public
JETSON_NANO_KERNEL_SOURCE=$(pwd)
tar -xf kernel_src.tbz2
</syntaxhighlight>


== Downloading Kernel sources ==
===3. Compile kernel and dtb===
In this step you need to have installed JetPack 4.2 for nano boards.
Follow the steps:
<pre>
JETPACK=~/JetPack-L4T-4.2
cd ${JETPACK}/JetPack_4.2_Linux_P3448/Linux_for_Tegra/
./source_sync.sh


##
<syntaxhighlight lang="bash">
# When prompted, use: tegra-l4t-r32.1 as the tag (change accordingly)
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-
</pre>
TEGRA_KERNEL_OUT=$JETSON_NANO_KERNEL_SOURCE/build
== Compiling the Kernel sources ==
KERNEL_MODULES_OUT=$JETSON_NANO_KERNEL_SOURCE/modules
Once you have downloaded the kernel sources and you have installed the toolchain you will be able to start compiling the kernel sources.  
make -C kernel/kernel-4.9/ ARCH=arm64 O=$TEGRA_KERNEL_OUT LOCALVERSION=-tegra CROSS_COMPILE=${TOOLCHAIN_PREFIX} tegra_defconfig
<pre>
make -C kernel/kernel-4.9/ ARCH=arm64 O=$TEGRA_KERNEL_OUT LOCALVERSION=-tegra CROSS_COMPILE=${TOOLCHAIN_PREFIX} -j8 --output-sync=target zImage
JETPACK=~/JetPack-L4T-4.2
make -C kernel/kernel-4.9/ ARCH=arm64 O=$TEGRA_KERNEL_OUT LOCALVERSION=-tegra CROSS_COMPILE=${TOOLCHAIN_PREFIX} -j8 --output-sync=target modules
CROSS_COMPILE=${HOME}/toolchain_bin_${VERSION}/${TOOLCHAIN_DIR}/bin/$CC_PREFIX
make -C kernel/kernel-4.9/ ARCH=arm64 O=$TEGRA_KERNEL_OUT LOCALVERSION=-tegra CROSS_COMPILE=${TOOLCHAIN_PREFIX} -j8 --output-sync=target dtbs
KERNEL_OUT=${JETPACK}/JetPack_4.2_Linux_P3448/Linux_for_Tegra/sources/kernel/${KERNEL_DIR}/build
make -C kernel/kernel-4.9/ ARCH=arm64 O=$TEGRA_KERNEL_OUT LOCALVERSION=-tegra INSTALL_MOD_PATH=$KERNEL_MODULES_OUT modules_install
KERNEL_MODULES_OUT=${JETPACK}/JetPack_4.2_Linux_P3448/Linux_for_Tegra/rootfs
</syntaxhighlight>


cd ${JETPACK}/JetPack_4.2_Linux_P3448/Linux_for_Tegra/sources/kernel/${KERNEL_DIR}
==Flash Jetson NANO==
mkdir -p $KERNEL_OUT
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


# Create the .config file
NVIDIA_SDK_MANAGER contains the directory where NVIDIA SDK manager was installed. For example.
make ARCH=arm64 O=$KERNEL_OUT tegra_defconfig
<syntaxhighlight lang="bash">
make ARCH=arm64 O=$KERNEL_OUT menuconfig
export NVIDIA_SDK_MANAGER=$HOME/nvidia/nvidia_sdk/
</syntaxhighlight>
===Select DTB and directory based on Jetson Nano module type===


# Build the kernel and DTBs
====Production module (P3448-0020)====
make ARCH=arm64 O=$KERNEL_OUT CROSS_COMPILE=${CROSS_COMPILE} -j4
<syntaxhighlight lang="bash">
</pre>
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>


= Flashing Jetson Nano completely including FS =
====Devkit module (P3448)====
With the next command you will be able to flash the kernel image, dtb and also file system.
<syntaxhighlight lang="bash">
<pre>
export DTB=tegra210-p3448-0000-p3449-0000-a02.dtb
# flash whole file system
JETPACK_4_3_P3448=${NVIDIA_SDK_MANAGER}/JetPack_4.3_Linux_P3448/Linux_for_Tegra
sudo ./flash.sh jetson-nano-qspi-sd mmcblk0p1
</syntaxhighlight>
</pre>
Make sure the Jetson Nano is in recovery mode


=Flash custom DTB on the Jetson Nano=
===Copy kernel, device tree and modules into jetpack===
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==
<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>


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


* Generate the encrypted DTB:
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/)
<pre>
Apply this patch to avoid losing the changes added to the device tree.
cp sources/kernel/kernel-4.9/build/arch/arm64/boot/dts/tegra210-p3448-0000-p3449-0000-a02.dtb kernel/dtb/
sudo ./create-jetson-nano-sd-card-image.sh -o sd-blob.img -s 4G -r 200
# The above command will generate the encrypted dtb on the following path:
# ${JETPACK}/JetPack_4.2_Linux_P3448/Linux_for_Tegra/bootloader/signed/tegra210-p3448-0000-p3449-0000-a02.dtb.encrypt
</pre>


* Flash the encrypted DTB to the DTB partition:
====Create patch file====
<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.
Patch: fix_dtb_lost.patch
sudo dd if=tegra210-p3448-0000-p3449-0000-a02.dtb.encrypt of=/dev/<DTB_PARTITION>
<syntaxhighlight lang="diff">
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
</syntaxhighlight>


#Verify which is your JETSON NANO DTB partition
====Apply the patch====
nvidia@nvidia:~$ ls -al /dev/disk/by-partlabel
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
<syntaxhighlight lang="bash">
sudo reboot
cd ${JETPACK_4_3_P3448}
</pre>
sudo patch -p 1 < fix_dtb_lost.patch
</syntaxhighlight>


=Flash Custom Kernel Image =
===Flash memory===
In order to replace the kernel image you need to copy the '''Image''' file to the Jetson nano to the directory /boot/
Make sure the Jetson NANO is in recovery mode.
send the custom kernel image binary to the Jetson Nano:
<pre>
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 production module====
<pre>
<syntaxhighlight lang="bash">
cd ~/
sudo ./flash.sh jetson-nano-emmc mmcblk0p1
sudo cp Image /boot/
</syntaxhighlight>
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 =
====Flash Devkit module====
In order to clone a SDcard Image with all the partitions required by the Jetson Nano run the following command:
<syntaxhighlight lang="bash">
<pre>
sudo ./flash.sh jetson-nano-qspi-sd mmcblk0p1
sudo dd if=/dev/mmcblk0 of=sdimage-jetson-nano.img bs=4M
</syntaxhighlight>
</pre>
 
====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.


To flash the SDcard with the previous content run the following command:
<syntaxhighlight lang="bash">
cd ${JETPACK_4_3_P3448}
# Copy device tree generated
cp $JETSON_NANO_KERNEL_SOURCE/build/arch/arm64/boot/dts/${DTB} kernel/dtb/
</syntaxhighlight>


<pre>
=====Flash production 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-emmc mmcblk0p1
</syntaxhighlight>
 
=====Flash Devkit module DTB=====
<syntaxhighlight lang="bash">
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