Jetson Linux Multimedia API Reference

32.4.3 Release

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
multimedia_api/ll_samples/docs/CROSS_COMPILE_SUPPORT.md
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2016-2020, NVIDIA CORPORATION. All rights reserved.
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  * * Redistributions of source code must retain the above copyright
8  * notice, this list of conditions and the following disclaimer.
9  * * Redistributions in binary form must reproduce the above copyright
10  * notice, this list of conditions and the following disclaimer in the
11  * documentation and/or other materials provided with the distribution.
12  * * Neither the name of NVIDIA CORPORATION nor the names of its
13  * contributors may be used to endorse or promote products derived
14  * from this software without specific prior written permission.
15  *
16  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
17  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
20  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
21  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
22  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
23  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
24  * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27  */
28 
29 @page cross_platform_support Setting Up Cross-Platform Support
30 
31 This section describes how to set up the cross-compilation environment for
32 Multimedia API on the host system.
33 It uses the following terms:
34 - _Host system_ means the x86 based server where you are going to do cross-compilation.
35 
36 - _Jetson board_ means the target board where your samples will run.
37 
38 Before proceeding, you must ensure that you can build samples natively without
39 issues on your Jetson board.
40 If you have not already set up a complete compilation environment on your
41 Jetson board, please do so now. For more information, see @ref mmapi_build.
42 
43 The following steps are executed on your **host system**:
44 
45 1. Clone the target rootfs on your Jetson board to your host system.
46 
47  Follow the instructions "To clone a Jetson device and flash" under
48  [Basic Flashing Procedures](https://docs.nvidia.com/jetson/l4t/Tegra%20Linux%20Driver%20Package%20Development%20Guide/flashing.html#wwpID0E06I0HA)
49  in the _Jetson Linux Driver Package Developer Guide_
50  to clone the target rootfs.
51 
52  These instructions yield two sparsed copies of the image. One has a name
53  you specified, such as `clone.img`; the other has the same name
54  with the suffix `.raw`.
55 
56 2. Mount the `.raw` image with the following commands:
57 
58  $ cd $HOME
59  $ mkdir -p jetson
60  $ sudo mount -t ext4 clone.img.raw jetson
61  $ export TARGET_ROOTFS=$HOME/jetson
62 
63 3. Export the path of cross-compiler tool chain with the following commands:
64 
65  $ export PATH=<CROSS_COMPILER_PATH>/bin:$PATH
66  $ export CROSS_COMPILE=aarch64-linux-gnu-
67 
68  Replace `<CROSS_COMPILER_PATH>` with the actual path of your tool chain.
69 
70  You can download the prebuilt tool chain from the following website.
71 
72  https://developer.nvidia.com/embedded/downloads#?search=tool%20chain
73 
74 4. Navigate to the directory for a sample and run `make` to cross-compile.