From ProventusNova DeveloperWiki
 
(30 intermediate revisions by the same user not shown)
Line 5: Line 5:


==Getting the sources==
==Getting the sources==
In this wiki we will use as an example JetPack version 6.2.1 (L4T 36.4.4). You can find the desired JetPack version from
You can find the desired JetPack version from [https://developer.nvidia.com/embedded/jetson-linux-archive Jetson Linux Archives].
=== JetPack 6.2.1 ===


1. Go to JetPack 6.2.1 release Page: [https://developer.nvidia.com/embedded/jetson-linux-r3644 NVIDIA Jetson Linux 36.4.4] and download “L4T Driver Package (BSP)” and “Sample Root filesystem”.
1. Go to JetPack's version release page and download “L4T Driver Package (BSP)” and “Sample Root filesystem”.


2. You should see this two files:
2. You should see this two files with the following names, where '''XXX''' specifies the version for L4T:
* Jetson_Linux_R36.4.4_aarch64.tbz2
* Jetson_Linux_RX.X.X_aarch64.tbz2
* Tegra_Linux_Sample-Root-Filesystem_R36.4.4_aarch64.tbz2
* Tegra_Linux_Sample-Root-Filesystem_RX.X.X_aarch64.tbz2


3. Create a directory for installing JetPack. Referred to as <INSTALL_DIR>. For example:
3. Create a directory for installing JetPack. Referred to as <INSTALL_DIR>. For example:
Line 24: Line 23:


<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
cp $HOME/Downloads/Jetson_Linux_R36.4.4_aarch64.tbz2 .
cp $HOME/Downloads/Jetson_Linux_RX.X.X_aarch64.tbz2 .
cp $HOME/Downloads/Tegra_Linux_Sample-Root-Filesystem_R36.4.4_aarch64.tbz2 .
cp $HOME/Downloads/Tegra_Linux_Sample-Root-Filesystem_RX.X.X_aarch64.tbz2 .
</syntaxhighlight>
</syntaxhighlight>


5. Extract "L4T Driver Package" tarball:
5. Extract "L4T Driver Package" tarball:
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
sudo tar -vjxf Jetson_Linux_R36.4.4_aarch64.tbz2
tar -vjxf Jetson_Linux_RX.X.X_aarch64.tbz2
</syntaxhighlight>
</syntaxhighlight>


Line 38: Line 37:


<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
sudo tar -C Linux_for_Tegra/rootfs/ -vxjf Tegra_Linux_Sample-Root-Filesystem_R36.4.4_aarch64.tbz2
sudo tar -C Linux_for_Tegra/rootfs/ -vxjf Tegra_Linux_Sample-Root-Filesystem_RX.X.X_aarch64.tbz2
</syntaxhighlight>
</syntaxhighlight>


7. Go into "Linux_for_Tegra/source" directory and extract the kernel sources.
<syntaxhighlight lang="bash">
cd Linux_for_Tegra/source
./source_sync.sh -k -t <release_tag>
</syntaxhighlight>

The release tag can be extracted from the release notes of the JetPack version.


4. Apply binaries.
8.Return to "Linux_for_Tegra" directory and apply binaries.
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
cd ../
cd Linux_for_Tegra
sudo ./apply_binaries.sh
sudo ./apply_binaries.sh
</syntaxhighlight>
</syntaxhighlight>


Now you are all set up to customize and build your own kernel.
6. Return to Linux_for_Tegra directory:
cd ..


==Customizing the kernel==
7. Inside Linux_for_Tegra directory, create default user with:

===JetPack 6.X ===
1. Go to source directory.
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
cd <INSTALL_DIR>/Linux_for_Tegra/source
sudo ./tools/l4t_create_default_user.sh -u <username> -p <password> -n <hostname>
</syntaxhighlight>
</syntaxhighlight>

for example:
2. Install pre-requisites
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
sudo apt install build-essential bc
sudo ./tools/l4t_create_default_user.sh -u nvidia -p nvidia -n nvidia
</syntaxhighlight>
</syntaxhighlight>


3.Install the toolchain from Jetson Linux release page. From the Tools tab, download '''Bootlin Toolchain gcc'''.
== Flashing the board ==
<syntaxhighlight lang="bash">
This section will specify how to flash the board to enable 2 FRAMOS IMX464 cameras.
mkdir $HOME/l4t-gcc
1. Connect NVMe m.2 card on one of the m.2 slots. Put the board in recovery mode. You can check if the board is in recovery mode with '''lsusb'''. Should see something like:
cd $HOME/l4t-gcc
<syntaxhighlight lang="bash">
tar xf <toolchain_archive>
Bus 001 Device 016: ID 0955:7323 NVIDIA Corp. APX
</syntaxhighlight>
</syntaxhighlight>


2. Flash with CTI's automated script inside Linux_for_Tegra directory:
<syntaxhighlight lang="bash">
sudo ./cti-flash
</syntaxhighlight>


====Building the Jetson Linux Kernel====
3. After executing the command, select the board. Choose 2.


1. Go into <INSTALL_DIR>/Linux_for_Tegra/source directory.
<syntaxhighlight lang="bash">
~~~~~~~~~~~~~~~~~~~~~~~~~~~
CTI FLASH
~~~~~~~~~~~~~~~~~~~~~~~~~~~
1. Photon (NGX002/NGX003)
2. Boson (NGX007)
3. Boson for Orin (NGX020)
4. Boson22 for Orin (NGX021)
5. Hadron (NGX012)
6. Rudi NX (NGX006/NGX010)
7. Polaris (NGX015)
8. Hadron-GMSL (NGX018)
9. Lepton (NGX022)
10. Hadron Dual MIPI (NGX024/NGX027)
11. Essential EdgeAI (NGX026)
12. Uses (NGX926)
x. Exit
Enter choice: 2


2. Set environment variable for cross-compilation, kernel-headers and kernel-output.
<syntaxhighlight lang="bash">
export CROSS_COMPILE=$HOME/l4t-gcc/aarch64--glibc--stable-2022.08-1/bin/aarch64-buildroot-linux-gnu-
export KERNEL_HEADERS=$PWD/kernel/kernel-jammy-src
export KERNEL_OUTPUT=$PWD/kernel_out
</syntaxhighlight>
</syntaxhighlight>


3. Build the kernel.
4. Select configuration. Choose 4.
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
make -C kernel
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
============ Boson (NGX007) =============
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1. Base
2. Base + FSM IMX296 (3cam)
3. Base + FSM IMX464 (3cam)
4. Base + FSM IMX464 (2cam)
5. Base + FSM IMX565 (3cam)
6. Base + FSM IMX565 (2cam)
7. Base + FSM IMX568 (2cam)
8. Base + FSM IMX568 (3cam)
9. Base + FSM IMX585 (3cam)
10. Base + FSM IMX585 (2cam)
11. Base + FSM IMX662 (3cam)
12. Base + FSM IMX662 (2cam)
13. Base + FSM IMX676 (3cam)
14. Base + FSM IMX676 (2cam)
15. Base + FSM IMX678 (3cam)
16. Base + FSM IMX678 (2cam)
17. Cancel (back to main menu)
Enter choice: 4
</syntaxhighlight>
</syntaxhighlight>

5. Select module. Choose 1.
4. Set install path.
<syntaxhighlight lang="bash">

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<syntaxhighlight lang="bash">
============= Module Type ==============
export INSTALL_MOD_PATH=<INSTALL_DIR>/Linux_for_Tegra/rootfs/
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1. orin-nx
2. orin-nano
3. Cancel (back to main)
Enter choice: 1
</syntaxhighlight>
</syntaxhighlight>

6. Select module mode. In this case, choose 1.
5. Install.
<syntaxhighlight lang="bash">

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<syntaxhighlight lang="bash">
============= Module Mode ==============
sudo -E make install -C kernel
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cp $KERNEL_OUTPUT/arch/arm64/boot/Image <INSTALL_DIR>/Linux_for_Tegra/kernel/Image
1. default
2. super-mode
3. Cancel (back to main)
Enter choice: 1
</syntaxhighlight>
</syntaxhighlight>


==== Building the NVIDIA out-of-Tree Modules ====
7. Wait for flashing to be complete.
8. Connect a mouse and keyboard with USB to the board, connect HDMI monitor. Reboot the board. You should see in your monitor Ubuntu login.
9. Log in into the '''nvidia''' user created in the steps before.


1. Build nvidia-oot.
== Capturing with FRAMOS IMX464 cameras ==


<syntaxhighlight lang="bash">
1. Open a terminal. Verify cameras were bound correctly with:
make modules
<syntaxhighlight lang="bash">
sudo dmesg | grep imx464
</syntaxhighlight>
</syntaxhighlight>

Should see something like:

<syntaxhighlight lang="bash">
2. Set install path.
[ 11.756067] imx464 9-001a: probing v4l2 sensor

[ 11.756129] imx464 9-001a: initializing mipi...
<syntaxhighlight lang="bash">
[ 11.756418] imx464 9-001a: tegracam sensor driver:imx464_v2.0.6
export INSTALL_MOD_PATH=<INSTALL_DIR>/Linux_for_Tegra/rootfs/
[ 11.790754] tegra-camrtc-capture-vi tegra-capture-vi: subdev imx464 9-001a bound
[ 11.830176] imx464 9-001a: Detected imx464 sensor
[ 11.833758] imx464 10-001a: probing v4l2 sensor
[ 11.833832] imx464 10-001a: initializing mipi...
[ 11.834253] imx464 10-001a: tegracam sensor driver:imx464_v2.0.6
[ 11.867769] tegra-camrtc-capture-vi tegra-capture-vi: subdev imx464 10-001a bound
[ 11.884400] imx464 10-001a: Detected imx464 sensor
</syntaxhighlight>
</syntaxhighlight>


3. Install.
2. Check for devices in '''/dev/'''.

<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
ls /dev/video*
sudo -E make modules_install
</syntaxhighlight>
</syntaxhighlight>

Should see something like:
==== Building the DTBs ====
<syntaxhighlight lang="bash">

/dev/video0 /dev/video1
1. Build DTBs:
<syntaxhighlight lang="bash">
make dtbs
</syntaxhighlight>
</syntaxhighlight>

2. Run the following pipeline to get a stream preview:
2. Install:
<syntaxhighlight lang="bash">

gst-launch-1.0 nvarguscamerasrc sensor-id=0 ! nvvidconv ! autovideosink
<syntaxhighlight lang="bash">
cp kernel-devicetree/platform/generic-dts/dtbs/* <INSTALL_DIR>/Linux_for_Tegra/kernel/dtb/
</syntaxhighlight>
</syntaxhighlight>


===JetPack 5.X ===
Switch between 0 and 1 in '''sensor-id''' to choose the camera to capture.

= Need Further Support? =

'''📞 Book Consultation Call:''' [https://proventusnova.com/contact-us/ Show Calendar!]

'''📩 Contact Via Email:''' [mailto:support@proventusnova.com support@proventusnova.com]

'''🌐 Visit Our Website:''' [https://proventusnova.com ProventusNova.com]

Latest revision as of 23:38, 19 November 2025

Jetson Linux BSP and Kernel Source setup

Keywords: NVIDIA Jetson, JetPack

Description

This wiki pages shows how to get sources for any JetPack version for NVIDIA platform. Download board support package (BSP), sample root file system and kernel sources for kernel customization.

Getting the sources

You can find the desired JetPack version from Jetson Linux Archives.

1. Go to JetPack's version release page and download “L4T Driver Package (BSP)” and “Sample Root filesystem”.

2. You should see this two files with the following names, where XXX specifies the version for L4T:

  • Jetson_Linux_RX.X.X_aarch64.tbz2
  • Tegra_Linux_Sample-Root-Filesystem_RX.X.X_aarch64.tbz2

3. Create a directory for installing JetPack. Referred to as <INSTALL_DIR>. For example:

 
INSTALL_DIR = build
mkdir $INSTALL_DIR
cd $INSTALL_DIR

4. Copy both files to <INSTALL_DIR>

 
cp $HOME/Downloads/Jetson_Linux_RX.X.X_aarch64.tbz2 .
cp $HOME/Downloads/Tegra_Linux_Sample-Root-Filesystem_RX.X.X_aarch64.tbz2 .

5. Extract "L4T Driver Package" tarball:

 
tar -vjxf Jetson_Linux_RX.X.X_aarch64.tbz2

You should see a new directory called Linux_for_tegra in <INSTALL_DIR> directory.

6. Extract "Sample Root Filesystem" into Linux_for_tegra/rootfs

 
sudo tar -C Linux_for_Tegra/rootfs/ -vxjf Tegra_Linux_Sample-Root-Filesystem_RX.X.X_aarch64.tbz2

7. Go into "Linux_for_Tegra/source" directory and extract the kernel sources.

 
cd Linux_for_Tegra/source
./source_sync.sh -k -t <release_tag>

The release tag can be extracted from the release notes of the JetPack version.

8.Return to "Linux_for_Tegra" directory and apply binaries.

 
cd ../
sudo ./apply_binaries.sh

Now you are all set up to customize and build your own kernel.

Customizing the kernel

JetPack 6.X

1. Go to source directory.

 
cd <INSTALL_DIR>/Linux_for_Tegra/source

2. Install pre-requisites

 
sudo apt install build-essential bc

3.Install the toolchain from Jetson Linux release page. From the Tools tab, download Bootlin Toolchain gcc.

 
mkdir $HOME/l4t-gcc
cd $HOME/l4t-gcc
tar xf <toolchain_archive>


Building the Jetson Linux Kernel

1. Go into <INSTALL_DIR>/Linux_for_Tegra/source directory.

2. Set environment variable for cross-compilation, kernel-headers and kernel-output.

 
export CROSS_COMPILE=$HOME/l4t-gcc/aarch64--glibc--stable-2022.08-1/bin/aarch64-buildroot-linux-gnu-
export KERNEL_HEADERS=$PWD/kernel/kernel-jammy-src
export KERNEL_OUTPUT=$PWD/kernel_out

3. Build the kernel.

 
make -C kernel

4. Set install path.

 
export INSTALL_MOD_PATH=<INSTALL_DIR>/Linux_for_Tegra/rootfs/

5. Install.

 
sudo -E make install -C kernel
cp $KERNEL_OUTPUT/arch/arm64/boot/Image <INSTALL_DIR>/Linux_for_Tegra/kernel/Image

Building the NVIDIA out-of-Tree Modules

1. Build nvidia-oot.

 
make modules


2. Set install path.

 
export INSTALL_MOD_PATH=<INSTALL_DIR>/Linux_for_Tegra/rootfs/

3. Install.

 
sudo -E make modules_install

Building the DTBs

1. Build DTBs:

 
make dtbs

2. Install:

 
cp kernel-devicetree/platform/generic-dts/dtbs/* <INSTALL_DIR>/Linux_for_Tegra/kernel/dtb/

JetPack 5.X

Need Further Support?

📞 Book Consultation Call: Show Calendar!

📩 Contact Via Email: support@proventusnova.com

🌐 Visit Our Website: ProventusNova.com