(Created page with "=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== 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 === JetPack 6.2.1 === 1. Go to Jet...") |
|||
| (31 intermediate revisions by the same user not shown) | |||
| Line 5: | Line 5: | ||
==Getting the sources== |
==Getting the sources== |
||
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 |
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_RX.X.X_aarch64.tbz2 |
||
* Tegra_Linux_Sample-Root- |
* 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/ |
cp $HOME/Downloads/Jetson_Linux_RX.X.X_aarch64.tbz2 . |
||
cp $HOME/Downloads/Tegra_Linux_Sample-Root- |
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"> |
||
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- |
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. |
|||
=== CTI BSP === |
|||
Go to <INSTALL_DIR> directory |
|||
<syntaxhighlight lang="bash"> |
<syntaxhighlight lang="bash"> |
||
cd Linux_for_Tegra/source |
|||
cd <INSTALL_DIR> |
|||
./source_sync.sh -k -t <release_tag> |
|||
</syntaxhighlight> |
</syntaxhighlight> |
||
The release tag can be extracted from the release notes of the JetPack version. |
|||
1. Download BSP for Jeton Orin NX/Nano from CTI official page: [https://connecttech.com/product/boson-for-framos-carrier-board-for-nvidia-jetson-orin-nx/ CTI Boson BSP] |
|||
and download: '''Orin Nx / Nano L4T r36.4.4 BSP'''. |
|||
Downloaded file named: '''CTI-L4T-ORIN-NX-NANO-36.4.4-V001.tgz'''. |
|||
8.Return to "Linux_for_Tegra" directory and apply binaries. |
|||
<syntaxhighlight lang="bash"> |
<syntaxhighlight lang="bash"> |
||
cd ../ |
|||
cp $HOME/Downloads/CTI-L4T-ORIN-NX-NANO-36.4.4-V001.tgz Linux_for_Tegra |
|||
sudo ./apply_binaries.sh |
|||
</syntaxhighlight> |
</syntaxhighlight> |
||
Now you are all set up to customize and build your own kernel. |
|||
3. Extract the BSP |
|||
==Customizing the kernel== |
|||
===JetPack 6.X === |
|||
1. Go to source directory. |
|||
<syntaxhighlight lang="bash"> |
<syntaxhighlight lang="bash"> |
||
cd <INSTALL_DIR>/Linux_for_Tegra |
cd <INSTALL_DIR>/Linux_for_Tegra/source |
||
sudo tar -vxzf CTI-L4T-ORIN-NX-NANO-36.4.4-V001.tgz |
|||
</syntaxhighlight> |
</syntaxhighlight> |
||
2. Install pre-requisites |
|||
4. Run install script to install BSP files. |
|||
<syntaxhighlight lang="bash"> |
<syntaxhighlight lang="bash"> |
||
sudo apt install build-essential bc |
|||
cd CTI-L4T |
|||
sudo ./install.sh |
|||
</syntaxhighlight> |
</syntaxhighlight> |
||
3.Install the toolchain from Jetson Linux release page. From the Tools tab, download '''Bootlin Toolchain gcc'''. |
|||
6. Return to Linux_for_Tegra directory: |
|||
<syntaxhighlight lang="bash"> |
|||
cd .. |
|||
mkdir $HOME/l4t-gcc |
|||
cd $HOME/l4t-gcc |
|||
tar xf <toolchain_archive> |
|||
</syntaxhighlight> |
|||
====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. |
|||
7. Inside Linux_for_Tegra directory, create default user with: |
|||
<syntaxhighlight lang="bash"> |
<syntaxhighlight lang="bash"> |
||
export CROSS_COMPILE=$HOME/l4t-gcc/aarch64--glibc--stable-2022.08-1/bin/aarch64-buildroot-linux-gnu- |
|||
sudo ./tools/l4t_create_default_user.sh -u <username> -p <password> -n <hostname> |
|||
export KERNEL_HEADERS=$PWD/kernel/kernel-jammy-src |
|||
export KERNEL_OUTPUT=$PWD/kernel_out |
|||
</syntaxhighlight> |
</syntaxhighlight> |
||
for example: |
|||
3. Build the kernel. |
|||
<syntaxhighlight lang="bash"> |
<syntaxhighlight lang="bash"> |
||
make -C kernel |
|||
sudo ./tools/l4t_create_default_user.sh -u nvidia -p nvidia -n nvidia |
|||
</syntaxhighlight> |
</syntaxhighlight> |
||
4. Set install path. |
|||
== Flashing the board == |
|||
This section will specify how to flash the board to enable 2 FRAMOS IMX464 cameras. |
|||
<syntaxhighlight lang="bash"> |
|||
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: |
|||
export INSTALL_MOD_PATH=<INSTALL_DIR>/Linux_for_Tegra/rootfs/ |
|||
<syntaxhighlight lang="bash"> |
|||
Bus 001 Device 016: ID 0955:7323 NVIDIA Corp. APX |
|||
</syntaxhighlight> |
</syntaxhighlight> |
||
5. Install. |
|||
2. Flash with CTI's automated script inside Linux_for_Tegra directory: |
|||
<syntaxhighlight lang="bash"> |
|||
<syntaxhighlight lang="bash"> |
|||
sudo ./cti-flash |
|||
sudo -E make install -C kernel |
|||
cp $KERNEL_OUTPUT/arch/arm64/boot/Image <INSTALL_DIR>/Linux_for_Tegra/kernel/Image |
|||
</syntaxhighlight> |
</syntaxhighlight> |
||
==== Building the NVIDIA out-of-Tree Modules ==== |
|||
3. After executing the command, select the board. Choose 2. |
|||
1. Build nvidia-oot. |
|||
<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 |
|||
<syntaxhighlight lang="bash"> |
|||
make modules |
|||
</syntaxhighlight> |
</syntaxhighlight> |
||
4. Select configuration. Choose 4. |
|||
2. Set install path. |
|||
<syntaxhighlight lang="bash"> |
|||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
<syntaxhighlight lang="bash"> |
|||
============ Boson (NGX007) ============= |
|||
export INSTALL_MOD_PATH=<INSTALL_DIR>/Linux_for_Tegra/rootfs/ |
|||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
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> |
|||
5. Select module. Choose 1. |
|||
<syntaxhighlight lang="bash"> |
|||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
============= Module Type ============== |
|||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
1. orin-nx |
|||
2. orin-nano |
|||
3. Cancel (back to main) |
|||
Enter choice: 1 |
|||
</syntaxhighlight> |
|||
6. Select module mode. In this case, choose 1. |
|||
<syntaxhighlight lang="bash"> |
|||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
============= Module Mode ============== |
|||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
1. default |
|||
2. super-mode |
|||
3. Cancel (back to main) |
|||
Enter choice: 1 |
|||
</syntaxhighlight> |
</syntaxhighlight> |
||
3. Install. |
|||
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. |
|||
<syntaxhighlight lang="bash"> |
|||
== Capturing with FRAMOS IMX464 cameras == |
|||
sudo -E make modules_install |
|||
1. Open a terminal. Verify cameras were bound correctly with: |
|||
<syntaxhighlight lang="bash"> |
|||
sudo dmesg | grep imx464 |
|||
</syntaxhighlight> |
</syntaxhighlight> |
||
Should see something like: |
|||
==== Building the DTBs ==== |
|||
<syntaxhighlight lang="bash"> |
|||
[ 11.756067] imx464 9-001a: probing v4l2 sensor |
|||
1. Build DTBs: |
|||
[ 11.756129] imx464 9-001a: initializing mipi... |
|||
<syntaxhighlight lang="bash"> |
|||
[ 11.756418] imx464 9-001a: tegracam sensor driver:imx464_v2.0.6 |
|||
make dtbs |
|||
[ 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> |
||
2. Install: |
|||
2. Check for devices in '''/dev/'''. |
|||
<syntaxhighlight lang="bash"> |
|||
<syntaxhighlight lang="bash"> |
|||
ls /dev/video* |
|||
cp kernel-devicetree/platform/generic-dts/dtbs/* <INSTALL_DIR>/Linux_for_Tegra/kernel/dtb/ |
|||
</syntaxhighlight> |
|||
Should see something like: |
|||
<syntaxhighlight lang="bash"> |
|||
/dev/video0 /dev/video1 |
|||
</syntaxhighlight> |
|||
2. Run the following pipeline to get a stream preview: |
|||
<syntaxhighlight lang="bash"> |
|||
gst-launch-1.0 nvarguscamerasrc sensor-id=0 ! nvvidconv ! autovideosink |
|||
</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
