Custom kernel selection on Xavier (Solved)


I have built a custom kernel on xavier (using same config as the primary kernel), but I don’t know how or where to an entry for this kernel so that I can select it during boot. I no longer get the U-boot menu to select the kernel to boot from. I also realized that there’s no exlinux.conf file under /boot.

The developer guide that’s provided with the JetPack 4.0 EA has a mention about “how to build custom kernel” but doesn’t mention about configuring/booting with it. I saw mention of extlinux.conf in the “NVIDIA Driver Package Development Guide” under “Kernel Boot Time Optimization->Disable Console Over UART”.

Please let me know how to boot a custom kernel on Xavier.

Does it work just copy and replace the /boot/Image on the device?


Thanks for the reply. It should work but would it work with new initrd.img? It should match the kernel version.

Also, our company develops various kernel flavors with the help of in-house created patches applied to the NVIDIA L4T kernel. So, we will need the ability to select different kernels on a boot.

BTW, I have tried to replace extlinux.conf file taken from a TX2 but still the Uboot didn’t present me with the list of kernels to boot from.

Hi anish.aney,

Please take a look at “Jetson-Xavier Boot Flow” in . There is no u-boot stage now.

Hi Vickyy,

Yes, I realized it while going through the documentation. Is there any way to configure cboot to present list of available kernels to boot from? Will there be uboot component in the final release (as this is EA)?

kernel selection may be supported in upcoming release. uboot won’t be there even in following releases.

Hi vickyy,

Thank you for your reply. I hope the kernel selection is supported in future releases because that’s an easier to test custom kernels. Instead of constantly flashing the system if the new kernel fails to boot, kernel selection helps in recovering the system to NVIDIA’s 4.9.108-tegra kernel and continue working on the fixing of the bad image.

It’s alright if uboot is not part of the boot process. But kernel selection will definitely help us developers.

Thank you again.

I would like to support request to have a kernel selection menu added to the next version of Jatpack/bootloader.


Thanks a lot, albertr. I will also request it from my end.

We were also lamenting the lack of u-boot support here.

Where do you get the source for the xavier kernel ?

Hi danpollock,

The download center for Xavier has a link to download the source. It has u-boot, kernel source and few more source tarballs.

The git repositories are located here:

The Xavier kernel is kernel-4.9. You’ll also need a number of repositories for the various pieces of the device tree. The Jetpack contains a script,, that’s supposed to clone the repositories but it looks like this hasn’t been updated for Xavier yet.

Hi growe, The script was fixed. It will be working from the next release.

vickyy, can you publish the fixed script? On this thread or elsewhere on the forum?


If you replace SOURCE_INFO with what I have below you should be good to go until the next release officially updates


checking with
steps seem to be:

sudo apt install build-essential bc

~/Downloads/sources/public_sources/kernel/kernel-4.9$ make ARCH=arm64 O=$TEGRA_KERNEL_OUT tegra_defconfig
make[1]: Entering directory '/home/nvidia/kernel-out'
  HOSTCC  scripts/basic/fixdep
  GEN     ./Makefile

The next question is where do I :
“5. Replace Linux_for_Tera/kernel/Image with:
$TEGRA_KERNEL_OUT/arch/arm64/boot/Image” ?
What is that place where I need to d othe replace? is it a config file? or a folder where I am doing the step 4 make?

Put your Xavier system into recovery mode and then use from the Jetpack to flash the kernel.

sudo -r -k kernel -K  YOUR_KERNEL_ZIMAGE jetson-xavier mmcblk0p

If I use the patch, what shall I specify for the tag in the prompt below?

Please enter a tag to sync /home/hostpc/Downloads/Xavier/Linux_for_Tegra/sources/kernel/kernel-4.9 source to
(enter nothing to skip): 
Couldn't find tag 0
/home/hostpc/Downloads/Xavier/Linux_for_Tegra/sources/kernel/kernel-4.9 source sync to tag 0 failed!
Downloading default kernel/nvidia source...

Now it thrown multiple "source sync to tag 0 failed! on every element sync , because of the non specified tag, as it seems to me.
The answer has been found in the Documentation:

git tag -l tegra-l4t*

That is supposed to return some value that can be used as the tag.
However, that returns:

git tag -l tegra-l4t*
fatal: not a git repository (or any of the parent directories): .git

It is said In the Documentation:
“When prompted enter a ‘tag’ name, as provided in the release notes”
trying the return of

uname -a

the output is:


more reference found:
and it appears that the tag can be retrieved from
Shall I put the tag below?


trying with tegra-l4t-r31.0.2 as a tag
the latter tag seems fine, but the sync method doesnt result in the folder

well, I managed to flash the OS with newly built kernel, but that doesn’t help with making modules_prepare. Probably I can get a required module v4l2looback built at Host PC and then load it as a separate ko module to kernel somehow, though