L4T Multimedia API Reference

32.3.1 Release

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Setting Up Cross-Platform Support
The following samples do not yet support cross-compilation:
  • 04_video_dec_trt
  • backend
  • frontend

This section describes how to set up the cross-compilation environment for Multimedia API on the host system. It uses the following terms:

  • Host system means the x86 based server where you are going to do cross-compilation.
  • Jetson board means the target board where your samples will run.

The following steps should be executed on your Jetson board:

  1. 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.

  2. Still on the Jetson board, set up Samba to mount the target rootfs from your host system:
    • Install and start Samba with the following commands:
       $ sudo apt-get install samba
       $ sudo passwd root
       $ sudo smbpasswd -a root
    • Add the following configurations to /etc/samba/smb.conf.
       comment= Rootfs for Tegra
       path = /
       browseable = yes
       read only = yes
       valid user = root
    • Enter:
       $ sudo service smbd restart
      This 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.
  3. Create symbolic links with the following commands:
     $ 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:

  1. Mount and export the target rootfs on your Jetson board with the following commands:
     $ cd $HOME
     $ mkdir -p jetson
     $ sudo mount -t cifs -o "username=root,password=nvidia" // jetson
     $ export TARGET_ROOTFS=$HOME/jetson
    The username must be root and the password is set previously when you install Samba. The is the IP address of your Jetson board.
  2. 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.

  3. Navigate to the directory for a sample and run make to cross-compile.