L4T Multimedia API Reference

28.1 Release

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
multimedia_api/ll_samples/CROSS_COMPILE_SUPPORT.md
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2016, 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 Use the following procedure to set up the cross-compilation environment for
32 Multimedia API on the host system.
33 
34 1. Install the CUDA cross-platform toolkit on the host system with the following
35  commands:
36 
37  $ sudo dpkg --add-architecture arm64
38  $ sudo apt-get update
39  $ sudo dpkg -i cuda-repo-<distro>_<version>_amd64.deb
40  $ sudo apt-get update
41  $ sudo apt-get install cuda-cross-aarch64
42 
43  @note Only cuda-8.x supports cross-platform development for aarch64 (arm64).
44 
45 2. Download the <L4T Sample Root Filesystem> from the following website:
46 
47  https://developer.nvidia.com/embedded/downloads
48 
49 3. Decompress the package and export rootfs path with the following command:
50 
51  $ export TARGET_ROOTFS=<PATH_OF_TEGRA_DRIVER_PACKAGE>/Linux_for_Tegra/rootfs
52 
53  @note The sample 11_camera_object_identification and backend do not support
54  cross-compilation in this release.
55 
56 4. Export the path of cross-compiler tool chain with the following command:
57 
58  $ export PATH=$PATH:<CROSS_COMPILER_PATH>/bin
59 
60 5. Create symbolic links with the following commands:
61 
62  $ export TEGRA_ARMABI=aarch64-linux-gnu
63  $ cd ${TARGET_ROOTFS}/usr/lib/
64  $ sudo ln -sf ${TEGRA_ARMABI}/crt1.o crt1.o
65  $ sudo ln -sf ${TEGRA_ARMABI}/crti.o crti.o
66  $ sudo ln -sf ${TEGRA_ARMABI}/crtn.o crtn.o
67  $ cd ${TEGRA_ARMABI}
68  $ sudo ln -sf libv4l2.so.0 libv4l2.so
69  $ sudo ln -sf tegra-egl/libEGL.so.1 libEGL.so
70  $ sudo ln -sf tegra-egl/libGLESv2.so.2 libGLESv2.so
71  $ sudo ln -sf tegra/libcuda.so.1.1 libcuda.so.1
72  $ sudo ln -sf ../../../lib/aarch64-linux-gnu/libdl.so.2 libdl.so
73 
74 6. Enter the sample directories and run `make` to cross-compile.