L4T Multimedia API Reference28.1 Release |
Use the following procedure to set up the cross-compilation environment for Multimedia API on the host system.
Install the CUDA cross-platform toolkit on the host system with the following commands:
$ sudo dpkg --add-architecture arm64 $ sudo apt-get update $ sudo dpkg -i cuda-repo-<distro>_<version>_amd64.deb $ sudo apt-get update $ sudo apt-get install cuda-cross-aarch64
https://developer.nvidia.com/embedded/downloads
Decompress the package and export rootfs path with the following command:
$ export TARGET_ROOTFS=<PATH_OF_TEGRA_DRIVER_PACKAGE>/Linux_for_Tegra/rootfs
$ export PATH=$PATH:<CROSS_COMPILER_PATH>/bin
$ export TEGRA_ARMABI=aarch64-linux-gnu $ cd ${TARGET_ROOTFS}/usr/lib/ $ sudo ln -sf ${TEGRA_ARMABI}/crt1.o crt1.o $ sudo ln -sf ${TEGRA_ARMABI}/crti.o crti.o $ sudo ln -sf ${TEGRA_ARMABI}/crtn.o crtn.o $ cd ${TEGRA_ARMABI} $ sudo ln -sf libv4l2.so.0 libv4l2.so $ sudo ln -sf tegra-egl/libEGL.so.1 libEGL.so $ sudo ln -sf tegra-egl/libGLESv2.so.2 libGLESv2.so $ sudo ln -sf tegra/libcuda.so.1.1 libcuda.so.1 $ sudo ln -sf ../../../lib/aarch64-linux-gnu/libdl.so.2 libdl.so
make
to cross-compile.