L4T Multimedia API Reference32.1 Release |
This section describes how to set up the cross-compilation environment for Multimedia API on the host system. It uses the following terms:
The following steps should be executed on your Jetson board:
If you have not already set up a complete compilation environment on your Jetson board, please do so now. For more information, see Building and Running.
Before proceeding, you must ensure you can build samples natively without issues on your Jetson board.
$ sudo apt-get install samba $ sudo passwd root $ sudo smbpasswd -a root
/etc/samba/smb.conf
. [root] comment= Rootfs for Tegra path = / browseable = yes read only = yes valid user = root
$ sudo service smbd restartThis step ensures you can mount the target rootfs from your host system, which also ensures the sample can link everything needed through the mount node.
$ cd /usr/lib/ $ sudo ln -sf aarch64-linux-gnu/crt1.o crt1.o $ sudo ln -sf aarch64-linux-gnu/crti.o crti.o $ sudo ln -sf aarch64-linux-gnu/crtn.o crtn.o $ cd /usr/lib/aarch64-linux-gnu/ $ sudo ln -sf ../../../lib/aarch64-linux-gnu/libdl.so.2 libdl.so
The following steps are executed on your host system:
$ cd $HOME $ mkdir -p jetson $ sudo mount -t cifs -o "username=root,password=nvidia" //10.19.225.125/root jetson $ export TARGET_ROOTFS=$HOME/jetsonThe username must be root and the password is set previously when you install Samba. The 10.19.225.125 is the IP address of your Jetson board.
Export the path of cross-compiler tool chain with the following command:
$ export PATH=$PATH:<CROSS_COMPILER_PATH>/bin $ export CROSS_COMPILE=aarch64-unknown-linux-gnu-
Replace <CROSS_COMPILER_PATH>
with the correct path of your tool chain.
You can download the prebuilt tool chain from the following website, or you can use your own cross-compiler. Because this release is tested with version GCC 4.8.5, NVIDIA recommends using that version.
https://developer.nvidia.com/embedded/downloads
make
to cross-compile.