Jetson Linux API Reference

32.7.3 Release
Setting Up Cross-Platform Support

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.

Before proceeding, you must ensure that you can build samples natively without issues 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.

The following steps are executed on your host system:

  1. Clone the target rootfs on your Jetson board to your host system.

    Follow the instructions "To clone a Jetson device and flash" under Basic Flashing Procedures in the Jetson Linux Driver Package Developer Guide to clone the target rootfs.

    These instructions yield two sparsed copies of the image. One has a name you specified, such as clone.img; the other has the same name with the suffix .raw.

  2. Mount the .raw image with the following commands:
    $ cd $HOME
    $ mkdir -p jetson
    $ sudo mount -t ext4 clone.img.raw jetson
    $ export TARGET_ROOTFS=$HOME/jetson
    
  3. Export the path of cross-compiler tool chain with the following commands:

    $ export PATH=<CROSS_COMPILER_PATH>/bin:$PATH
    $ export CROSS_COMPILE=aarch64-linux-gnu-
    

    Replace <CROSS_COMPILER_PATH> with the actual path of your tool chain.

    You can download the prebuilt tool chain from the following website.

     https://developer.nvidia.com/embedded/downloads#?search=tool%20chain
    
  4. Navigate to the directory for a sample and run make to cross-compile.