Comparing Filesystem with Different Packages (Filesystem without TensorRT)

I am currently trying my best to compare a filesystem with TensorRT to one without TensorRT for the Nvidia Tx2

My purpose in doing this is to try to get TensorRT onto a Yocto Linux filesystem, by comparing the filesystem with and without TensorRT I’m hoping to drop in the TensorRT components.

I’m doing this by creating a directory that contains all the contents of a TensorRT filesystem (including all the proper symlinks, etc.) and one that has a full filesystem but does not contain TensorRT.

My current method is:
Run Jetpack 3.3 with all packages installed. Then run
sudo ./ --no-flash jetson-tx2 mmcblk0p1
sudo ./ -r /media/user/ec2ba5f0-8539-4a0b-bcdf-1ac661eefcf3
sudo cp -arv /media/user/ec2ba5f0-8539-4a0b-bcdf-1ac661eefcf3 /media/user/08c63454-0ee5-4dac-acd1-68c4734fbccc/with_TensorRT

Remove all Nvidia files and rerun without installing TensorRT and Multimedia API Package. Run the same flashing process, this time pointing to a without_TensorRT directory.
sudo ./ --no-flash jetson-tx2 mmcblk0p1
sudo ./ -r /media/user/ec2ba5f0-8539-4a0b-bcdf-1ac661eefcf3
sudo cp -arv /media/user/ec2ba5f0-8539-4a0b-bcdf-1ac661eefcf3 /media/user/08c63454-0ee5-4dac-acd1-68c4734fbccc/without_TensorRT

Perhaps worth noting is that the apply_binaries script produces a linking error as part of its output:
failed to create symbolic link ‘/media/user/ec2ba5f0-8539-4a0b-bcdf-1ac661eefcf3/lib/modules/4.4.38-tegra/build’: File exists
That may or may not be useful information.

Will this approach give me a representative filesystem that I can compare and use to inform my Yocto build, or am I missing something?

Will a similar approach still work if I switch to JetPack 4.0?

What additional information can I provide to add information/make this easier to answer?


Sorry that I’m not familiar with Yocto Linux build.
But I think there is some issues from CUDA driver.

TensorRT has strongly dependencies on the cuDNN, CUDA toolkit and CUDA driver version.
Only apply the different between w/o TensorRT may not able to meet the requirement.


Thank you for your response AastaLLL.

Do you know anyone who would know about this?

Just a thought on the topic. I suspect what you need is everything which isn’t part of the stock Ubuntu rootfs. The content is probably required for any GPU access. I think if I were to do this here is how I would start to experiment…

Create a temp location with basically a clone of your install which has TensorRT.

Go to a new directory with purely the sample rootfs (not even with in it. Use “find” to create the following lists, and as you find these names, switch over to temp clone and remove those files:

  • All device special files.
    find . -type c -print
    find . -type b -print
  • All regular files.
    find . -type f -print
  • All symbolic links.
    find . -type l -print
  • All sockets.
    find . -type s -print
  • Empty directories could be removed, but may not be worth the effort.

You can create a script to do both the find and the delete (the “find .” can have “.” replaced with a base directory…be very careful to not name something outside of your scratch areas since you will be running as root). You can use xargs if argument lists get too long, and you can use special arguments like “-0” to xargs and “-print0” in find if file names are confusing the script with things like spaces.

This should leave content which was added by either or supporting packages. There are dependencies, so don’t expect to run something like TensorRT without CUDA or GPU drivers. Those drivers may even have dependencies which were in the sample rootfs and which are now gone. It is worth special mention that the GPU driver works as a loadable module to the Xorg binary. Xorg with the same ABI will probably have to be added in even if you don’t use a GUI.

Some files you don’t need will be left in, e.g., the “/var” local repositories…you won’t have apt and so those are pointless.

Awesome, thank you very much! I’ll give this a shot and see where it takes me. Thank you for the great support and if I find anything interesting I’ll report it back here as I’m sure I’ll not be the only one that needs to understand how these components fit together.