Skip to content
Build the Linux Kernel and Modules on board the NVIDIA Jetson Nano Developer Kit
Branch: master
Clone or download
Latest commit 7654a04 Jul 27, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
scripts Write README Jul 24, 2019
LICENSE Initial commit Apr 23, 2019 Update README Jul 27, 2019 Use menuconfig for kernel edits Apr 23, 2019 Use menuconfig for kernel edits Apr 23, 2019 Cleanup L4T version check Jul 21, 2019 Initial Commit Apr 23, 2019 Initial Commit Apr 23, 2019 Write README Jul 24, 2019
sample-extlinux.conf Write README Jul 24, 2019


Build the Linux Kernel and Modules on board the NVIDIA Jetson Nano Developer Kit

These scripts are for JetPack 4.2.1, L4T 32.2

Scripts to help build the 4.9.140 kernel and modules onboard the Jetson Nano Developer Kit Previous versions may be available in releases.

Note: The kernel source version must match the version of firmware flashed on the Jetson. For example, the source for the 4.9.140 kernel here is matched with L4T 32.2. This kernel compiled using this source tree may not work with newer versions or older versions of L4T

As of this writing, the "official" way to build the Jetson Nano kernel is to use a cross compiler on a Linux PC. This is an alternative which builds the kernel onboard the Jetson itself. These scripts will download the kernel source to the Jetson Nano, and then compile the kernel and selected modules. The newly compiled kernel can then be installed. We recommend a SD card size of 32GB, 64GB preferred.

The scripts should be run directly after flashing the Jetson, or copying the SD card image from a host PC. There are several scripts:

Downloads the kernel sources for L4T from the NVIDIA website, decompresses them and opens a graphical editor on the .config file. Note that this also sets the .config file to the current system, and also sets the local version to the current local version, i.e., -tegra

Compiles the kernel using make. The script commands make the kernel Image file. Installing the Image file on to the system is a separate step. Note that the make is limited to the Image and modules.

The other parts of the kernel build, such as building the device tree, require that the result be 'signed' and flashed from the the NVIDIA tools on a host PC.

Compiles the modules using make and then installs them.

Copies the Image file created by compiling the kernel to the /boot directory. Note that while developing you will want to be more conservative than this: You will probably want to copy the new kernel Image to a different name in the boot directory, and modify /boot/extlinux/extlinux.conf to have entry points at the old image, or the new image. This way, if things go sideways you can still boot the machine using the serial console.

You will want to make a copy of the original Image before the copy, something like:

$ cp /boot/Image $INSTALL_DIR/Image.orig
$ ./
$ echo "New Image created and placed in /boot" Edit the .config file located in /usr/src/kernel/kernel-4.9 This file must be present (from the script) before launching the file. Note that if you change the local version, you will need to make both the kernel and modules and install them. Removes all of the kernel sources and compressed source files. You may want to make a backup of the files before deletion.


Make sure to update the micro SD card

The script copies the Image to the current device. If you are building the kernel on an external device, for example a USB drive, you will probably want to copy the Image file over to the micro SD card in the micro SD's /boot directory. Special thanks to Raffaello Bonghi ( for jetson_easy scripts. Special thanks to Shreeyak ( for discussing alternatives to get source directly from NVIDIA git repositories. Special thanks to Dustin Franklin ( for how to correctly determine the correct L4T version. (

Sometimes it is useful to log the builds:

$ command 2>&1 | tee log.txt

so you can go back and catch errors.

Intended Use

The intended use of this repository is to help automate building known configurations of the kernel and build modules. You should use the kernel-4.9/scripts/config script to set the kernel configuration that you desire. See the 'rootOnUSB' repository on the JetsonHacksNano Github account for an example.

Release Notes

July, 2019

  • vL4T32.2
  • L4T 32.2 (JetPack 4.2.1)

June, 2019

  • vL4T32.1
  • L4T 32.1 (JetPack 4.2)
  • Initial Release
You can’t perform that action at this time.