How do I load a new kernel?

Hello! I’m new to rebuilding kernels. I just followed the help given here, and was directed here to finish up. I was told to mention:

  • I’ve changed the Image, modifying a handful of features with =y
  • L4T release Orin NX # R35 (release), REVISION: 4.1, GCID: 33958178, BOARD: t186ref, EABI: aarch64, DATE: Tue Aug 1 19:57:35 UTC 2023
  • I want to keep the original kernel as a backup, and want to create an alternate boot entry for testing the new kernel.
  • I don’t want to flash the entire system to add the new kernel or modules.

We have the guidance for kernel customization in developer guide:
Kernel — Jetson Linux Developer Guide documentation

Please take a look and give it a try.

Hello, @DaneLLL ! I’ve followed these steps already:

mkdir ~/kernel
cd ~/kernel
export TEGRA_KERNEL_OUT=`pwd`

mkdir ~/modules
cd ~/modules
export TEGRA_MODULES_OUT=`pwd`

export TOP=/usr/src/linux-headers-5.10.120-tegra-ubuntu20.04_aarch64/kernel-5.10

cd ~
chmod +x
./ -h
./ -k -t jetson_35.4.1
sudo cp -r ~/sources/kernel/* /usr/src/linux-headers-5.10.120-tegra-ubuntu20.04_aarch64

cd $TOP

make O=$TEGRA_KERNEL_OUT tegra_defconfig
make O=$TEGRA_KERNEL_OUT nconfig
make O=$TEGRA_KERNEL_OUT -j 8 Image
make O=$TEGRA_KERNEL_OUT -j 8 modules

That finished successfully.

I need to… replace the kernel at this point? I don’t see anything in the documentation that you’ve linked that captures that step. I’ve never done anything like this, so if you have an ELI5, I’d really appreciate it.

If you only have minor modification to kernel image, you may replace


in the Orin NX system and reboot the device.

For reflashing the kernel partition, please do

  1. Follow Kernel Customization — Jetson Linux Developer Guide documentation
  2. Follow Flashing Support — Jetson Linux Developer Guide documentation

I’m trying something new, but also a bit more aligned with the official docs it would seem. They recommend using, so I modified that script to call nconfig and pass a suffix! (4.1 KB)

cd ~
./ -k -t jetson_35.4.1
cp sources

cd sources
./ -o $TEGRA_KERNEL_OUT -s cilium

This seems to have done the trick building the image, but I can’t seem to test it. I discovered kexec when asking for help back on the turing pi discord. This just hangs, though:

sudo kexec -l $TEGRA_KERNEL_OUT/arch/arm64/boot/Image
sudo kexec -e

Am I missing a step? Is there something else that needs to be passed to kexec to test out this Image? Or did I miss something on the Image build itself??

Please follow the steps in document and not to execute additional steps.The steps are validated and if you execute it one by one, it is supposed to work fine.

The steps mention swapping out files in Linux_for_Tegra. That’s what I did when flashing originally. I don’t want to flash the entire system…

I’m currently trying to modify the kernel in-place, essentially. Sorry if I seem dense, but unless the only solution is to re-flash the Orin, the docs you linked don’t answer my question.

If you only want to replace kernel file, then you can just replace /boot/Image on your device.

Hello, Wayne! I’ve rebuilt the Image with new flags using =y and =m. I have a directory with the new bits, but I’d like to test them before bricking my system 😕. Any suggestions?


Basically if you changed anything to “=m” in kernel config, it means you want to build it as kernel modules. In that case, if you don’t want to reflash the rootfs, you have to manually copy the new modules + dependencies file to your /lib/modules/<uname -r> directory on your jetson.

And jetson by default is using extlinux to boot. Which means there is a /boot/extlinux/extlinux.conf file. You can read the info there first.

It will tell where the kernel gets loaded. And if you want to recover from your new kernel which gets crashed easily, you can add a backup option in that file. After you add that, you can select which kernel to boot during boot by using UART serial console to interrupt UEFI bootloader.

I was able to kexec the new Image and modules!

I modified to run nconfig, append a suffix to LOCALVERSION, and to run modules_install. Updating Kernel of Nvidia Jetson · GitHub.

Now that it’s validated, I think I might just replace /boot/Image and cross my fingers 😅

Thanks for the pointers!

1 Like

Mmmmm, one more question. What are these files, and should I be recreating them? If I just swap the Image, am I going to have any wonkiness?

/boot$ ls


Generally you only need to swap “Image” and no need to care about the .sig file.

Sig files are only be used when security boot things are enabled.

Could we update to include my changes? (4.7 KB)