| Line 56: | Line 56: | ||
Now you are all set up to customize and build your own kernel. |
Now you are all set up to customize and build your own kernel. |
||
==Customizing the kernel== |
|||
===Recomendation=== |
|||
Create a default user to access the board. |
|||
===JetPack 6.X === |
|||
* Inside Linux_for_Tegra directory, create default user with: |
|||
1. Install pre-requisites |
|||
<syntaxhighlight lang="bash"> |
<syntaxhighlight lang="bash"> |
||
sudo apt install build-essential bc |
|||
sudo ./tools/l4t_create_default_user.sh -u <username> -p <password> -n <hostname> |
|||
</syntaxhighlight> |
</syntaxhighlight> |
||
for example: |
|||
2.Install the toolchain from Jetson Linux release page. From the Tools tab, download '''Bootlin Toolchain gcc'''. |
|||
<syntaxhighlight lang="bash"> |
<syntaxhighlight lang="bash"> |
||
mkdir $HOME/l4t-gcc |
|||
sudo ./tools/l4t_create_default_user.sh -u nvidia -p nvidia -n nvidia |
|||
cd $HOME/l4t-gcc |
|||
tar xf <toolchain_archive> |
|||
</syntaxhighlight> |
|||
3. Set environment variable for cross-compilation. |
|||
<syntaxhighlight lang="bash"> |
|||
export CROSS_COMPILE=$HOME/l4t-gcc/aarch64--glibc--stable-2022.08-1/bin/aarch64-buildroot-linux-gnu- |
|||
</syntaxhighlight> |
|||
4. Go to source directory. |
|||
<syntaxhighlight lang="bash"> |
|||
cd <INSTALL_DIR>/Linux_for_Tegra/source |
|||
</syntaxhighlight> |
</syntaxhighlight> |
||
Revision as of 17:13, 18 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:
sudo 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. Install pre-requisites
sudo apt install build-essential bc
2.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>
3. Set environment variable for cross-compilation.
export CROSS_COMPILE=$HOME/l4t-gcc/aarch64--glibc--stable-2022.08-1/bin/aarch64-buildroot-linux-gnu-
4. Go to source directory.
cd <INSTALL_DIR>/Linux_for_Tegra/source
