C++ is available and quite common under Linux. Do you have a particular C++ standard? For example, C++11. Many of the compilers (mainly gcc
/g++
) have multiple standards available, and an option in compile switches to that standard.
List the libraries. Then list the functions linked against. That list can be checked off for the name of libraries under Linux that cover this. If not covered, then you’d have to write your own, or port the library. Being POSIX, chances are that a lot of the requirements will already be available in Linux, but perhaps file names will differ.
Note that some specialty instructions on x86_64/amd64 won’t exist on ARM 64-bit, e.g., SIMD or MMX, but ARM might have similar capabilities. Many programs don’t use those specialty instructions, so there is a good chance you won’t see these. If you do, then you have some porting ahead of you.
CMake is commonly used in Linux. Configuring probably will be related to the above comment on listing libraries.
Instead of cross compiling, at least at first, I suggest you set up an Orin with an external disk (for space and for moving between desktop and Orin). This wouldn’t mean a disk you have to set up for booting to, it could just be something mounted in a temp location to put your code in. Then add libraries and other content to the Jetson itself until you get the compile. Once that is done, you could clone the rootfs image of the Jetson and loopback mount it on your host PC. What this would give you is the sysroot with development headers and libraries that is portable among Linux desktop PCs when cross compiling. It also gives you a backup. The actual program being worked on would not need to be part of the clone since you would be using something like a USB external disk or similar while figuring out what libraries are needed.
Regarding graphics, I suggest on the Linux side you run this command on the Jetson to add a package:
sudo apt-get install mesa-utils
This adds the command “glxinfo
”. Running glxinfo
from the GUI will tell you a lot about the OpenGL abilities of the Jetson. On anything with an NVIDIA GPU you can usually do this to know if it is using the NVIDIA hardware acceleration:
glxinfo | egrep -i '(nvidia|version)'
I do not know if there is something similar on QNX or not. You might find yourself limited to OpenGLES.
For terms in what follows, L4T is what actually gets flashed to a Jetson, and this is in turn Ubuntu with NVIDIA drivers. JetPack/SDK Manager is just a GUI front end to the flash software, but you will find a given release of JetPack is tied to a given release of L4T (but JetPack lets you use alternate releases). To see your L4T release:
head -n 1 /etc/nv_tegra_release
Regarding GPU acceleration via CUDA, keep in mind that most CUDA applications expect a PCI-based discrete GPU (dGPU) with its own memory (VRAM). The method of detection quite often involves a PCI bus query. In Linux, this is usually via the nvidia-smi
application.
In L4T R35.x and earlier you cannot use nvidia-smi
for this purpose because the GPU is integrated (iGPU) directly to the memory controller. You cannot use the separate CUDA installation which is not via JetPack even if it is for 64-bit ARM. You would need to check the docs. Go to your specific L4T release here:
https://developer.nvidia.com/linux-tegra
You will also find some sample code. Keep in mind that JetPack running on a separate host PC can have flash deselected. This isn’t always obvious, but when installing that software, one does not flash. You would not put the Jetson in recovery mode. You would fully boot the Jetson, connect the network for ssh
access (either via the virtual USB wired networking or actual ethernet would work), and deselect the flash, but keep installation of things like sample software and CUDA enabled so it would install via ssh
to your selected login account. Check out the sample CUDA code and how it configures for the GPU without nvidia-smi
.
L4T R36.x changes a number of things. The first stable release of R36.x was just released, and this might be desirable (or it might not be). One thing this does is switch to a more recent mainline kernel, but the GPU is still an iGPU. There is a partial “surrogate” nvidia-smi
which I have not used, but it should have some partial ability to provide some of the information that this function would have for a dGPU. I don’t know the details, but you are advised to compare it to what you get from a desktop Linux system with the NVIDIA drivers. This includes configuring and running a sample CUDA application.
I think cameras and audio will be much the same, but you will perhaps run into device tree (firmware) edits that would not be needed on a desktop PC. Some devices, e.g., USB, are “plug-n-play”, and will be no different on the Jetson compared to a desktop PC. Other devices cannot self-describe, and those interfaces will likely require a device tree edit for the interface.