Installing CUDA Toolkit before upgrading ROOTFS


I am working with a Jetson Xavier NX, Jetson Linux 35.5.0 and JetPack 5.1.3.

I want to be able to generate a ROOTFS for my jetson with all my specific needs (specific libraries, recompiled kernel, add drivers and modified device tree).

I have been able to compile my kernel with new drivers and a new device tree. When I flash it on the Jetson I see that it works correctly.

In the last stage I need to install the CUDA Toolkit on the ROOTFS, since I have to cross compile and install a library that requires CUDA support on the ROOTFS.

I have not found any option to install CUDA Toolkit directly on the ROOTFS that is created with the script.

Does anyone know of another procedure other than using SDK Manager directly?

Thanks in advance!

I don’t know if this will help or not, but at least is probably of interest.

The rootfs image is created based almost entirely on “Linux_for_Tegra/rootfs/”. The default is a stock Ubuntu image which has then been updated with NVIDIA’s driver content. It is true that the flash target can overwrite some content in “/boot”, e.g., the kernel Image, device tree, and extlinux.conf can change during creation of the final image. However, most everything else remains verbatim.

If you have a Jetson set up the way you want, then most parts of this can be used directly in “Linux_for_Tegra/rootfs/”. An example is to clone, and then mount the clone via loopback over “rootfs/” (which leaves the original after you umount). There are so many different ways to do this.

Another method is to use rsync over ssh and to treat the “rootfs/” as a destination for backup of the Jetson to the host PC.

If you want to change some element which changes, then you need to look at docs for things like setting up a new kernel Image during flash, which is an extra step. Also, external media as a rootfs also changes things. But the basic case is simply to update “rootfs/”. Then all flashes will have that content.

Thank you for the additional information. As you mentioned, I will need to include more stages in the generation of my production image.
I believe it would be very interesting for future versions if it were possible to install the CUDA Toolkit directly onto the rootfs, as it would eliminate the need for using a cloned image for environment version control.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.