This section describes how to set up the cross-compilation environment for Multimedia API on the host system. It uses the following terms:
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:
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
.
.raw
image with the following commands: $ cd $HOME $ mkdir -p jetson $ sudo mount -t ext4 clone.img.raw jetson $ export TARGET_ROOTFS=$HOME/jetson
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
make
to cross-compile.