Mail_Android_Video_SW_DDK_Intergration_Guide_And_Codec_User_Manual中文翻译【chapter2】
Chapter 2 Build Tools and Installation
第2章 構建工具和安裝
This chapter lists the build tools. It also describes how to install
the Linux kernel source, the Android platfor, the OpenMAX IL core, and the libjpeg headers. it contains the following sections:
2.1 Tools on page 2-18
2.2 Linux kernel source on page 2-19
2.3 Android paltform on page 2-20
2.4 Installing the DDK on page 2-21
2.5 OpenMAX IL core on page 2-24
2.6 libjpeg headers on page 2-25
本章列出了構建工具。 它還描述了如何安裝Linux內核源代碼,Android平臺,OpenMAX IL內核以及libjpeg標頭。它包含以下部分:
2.1 工具 第2-18頁
2.2 Linux內核源代碼 第2-19頁
2.3 Android 平臺 第2-20頁
2.4 安裝DDK 第2-21頁
2.5 OpenMAX IL內核 第2-24頁
2.6 libjpeg標頭 第2-25頁
2.1 Tools
ARM recommends that you use the following tools and versions to build the DDK:
1.GNU tar
GNU tar version 1.14 or later is required to unpack the deliverables.
2.SCons
SCons version 2.3.0 or later is required. The deliverables have been tested using version 2.3.0.you can download SCons from http://www.scons.org
3.GCC for ARM v7 Linux
GNU toolchain,Sourcery G++ Lite for ARM GNU Linux version 2011.03-41.You can download the toolchain from http://www.mentor.com/embedded-software/sourcery-tools/sourcery-codebench/overview/
4.GCC for ARM v8 Linux
CNU toolchain,aarch64-linux-gnu version 4.8-2014.04. You can download the toolchain from http://releases.linaro.org/14/04/components/toolchain/binaries/
5.GNU Make
GNU Make version 3.81 is required to build the Linux kernel
objects.The Linux kernel objects use the Linux kernel build system from SCons.
6.Doxygen
Doxygen version 1.6.2 or later is required to generate source code documentation.
2.2 Linux kernel source
Android requires a Linux kernel source tree to build the kernel objects.You can download the mainline kernel source from http://kernel.org. You can download kernels with all Android patches applied from https://android.googlesource.com/
The required Linux kernel source tree version depends on your target platform.ARM has tested the software with the Linux kernel source tree versions 3.4,3.6,3.10,3.15,and 3.18.
2.2 Linux內核源碼
Android需要Linux內核源代碼樹來構建內核對象。您可以從http://kernel.org下載mainline內核源代碼。
您可以從https://android.googlesource.com/下載帶有所有Android補丁的內核。
所需的Linux內核源樹版本取決于您的目標平臺。ARM已使用Linux內核源樹版本3.4、3.6、3.10、3.15和3.18對軟件進行了測試。
2.3 Android platform
A fully built Android platform source tree is required to build the user-side components.The video driver supports Android 5.0.0_r2 and 6.0.0_r1. You can download the platform source from: http://source.android.com
2.3 Android平臺
需要完整的Android平臺源代碼樹來構建用戶端組件。視頻驅動程序支持Android 5.0.0_r2和6.0.0_r1。 您可以從以下位置下載平臺源:http://source.android.com。
2.4 installing the DDK
You must follow this set of instructions to install the DDK. These sections take you through the process of unpacking the deliverable,and downloading the additional required components,including patches.ARM recommends that you follow these steps in sequence. This section contains the following subsections:
2.4.1 Unpacking the deliverable on page 2-21
2.4.2 Downloading firmware on page 2-22
2.4.3 Downloading OpenMAX IL API headers on page 2-22
2.4安裝DDK
您必須按照以下說明安裝DDK。 這些小節將指導您完成可交付成果的包裝,并下載包括補丁程序在內的其他必需組件。ARM建議您按順序執行這些步驟。 本節包含以下小節:
2.4.1交付物品包裝 第2-21頁
2.4.2下載固件 第2-22頁
2.4.3下載OpenMAX IL API標頭 第2-22頁
2.4.1 Unpacking the deliverable
Extract the downloaded archive into the directory vendor/arm/v5xx of the Android source code tree.
tar -xzvf <download_name>.tgz
When you unpack the tarball,it unpacks into mali_video/driver as shown in the following figure.
mali_video/
--------documentation/
--------driver/
-------------android/
-------------bldsys/
-------------documentation/
-------------fw/
-------------instr/
-------------kernel/
-------------kwrap/
-------------libjpeg_hw/
-------------malisw/
-------------mem/
-------------omx_components/
-------------sconscript
-------------sconstruct
-------------test/
-------------tpi/
-------------utf/
-------------util/
Figure 2-1 mali_video/driver unpacked
2.4.1打開交付品的包裝
將下載的存檔解壓縮到Android源代碼樹的目錄vendor / arm / v5xx中。 tar -xzvf <下載名稱> .tgz 解壓縮tarball時,將其解壓縮到mali_video / driver中,如下圖所示。
mali_video/
--------documentation/
--------driver/
-------------android/
-------------bldsys/
-------------documentation/
-------------fw/
-------------instr/
-------------kernel/
-------------kwrap/
-------------libjpeg_hw/
-------------malisw/
-------------mem/
-------------omx_components/
-------------sconscript
-------------sconstruct
-------------test/
-------------tpi/
-------------utf/
-------------util/
圖 2-1 mali_video/driver unpacked
You must copy or move the driver directory into the Android tree as
vendor/arm/v5xx. The following figure shows the structure when you
copy or move the driver directory: aosp root/(Android open source
project root)
--------" Android folders"
--------vendor/
---------------arm/
--------------------v5xx/
-------------------------android/
-------------------------bldsys/
-------------------------documentation/
-------------------------fw/
-------------------------instr/
-------------------------kernel/
-------------------------kwrap/
-------------------------libjpeg_hw/
-------------------------malisw/
-------------------------mem/
-------------------------omx_components/
-------------------------sconscript
-------------------------sconstruct
-------------------------test/
-------------------------tpi/
-------------------------utf/
-------------------------util/
Figure 2-2 Android tree after adding the driver directory
您必須將驅動程序目錄作為vendor / arm / v5xx復制或移動到Android樹中。 下圖顯示了復制或移動驅動程序目錄時的結構:
aosp root/(Android open source project root)
--------" Android folders"
--------vendor/
---------------arm/
--------------------v5xx/
-------------------------android/
-------------------------bldsys/
-------------------------documentation/
-------------------------fw/
-------------------------instr/
-------------------------kernel/
-------------------------kwrap/
-------------------------libjpeg_hw/
-------------------------malisw/
-------------------------mem/
-------------------------omx_components/
-------------------------sconscript
-------------------------sconstruct
-------------------------test/
-------------------------tpi/
-------------------------utf/
-------------------------util/
圖 2-2 添加驅動程序目錄后的Android樹
2.4.2 Downloading firmware
Downloading the firmware archive and extract it into the same folder as the DDK deliverable.
2.4.2下載固件
下載固件檔案并將其解壓縮到與DDK可交付產品相同的文件夾中。
2.4.3 Downloading OpenMAX IL API headers
Particular versions of the OpenMAX IL API headers are required for the unit tests and the Android user-side components.
Table 2-1 OpenMAX IL API headers versions
OpenMAX IL API headers version Required for
| 1.2.0 | Unit tests |
The Khronos headers files must be downloaded from:
http://www.khronos.org/registry/omxil/
Table 2-2 OpenMAX IL API headers archive location OpenMAX IL API
header archive Extract to
| 1.2.0 | khronos/original/OMXIL/1.2.0 |
Download and unpack the header archives to the directories named in the table.The paths are relative to the v5xx directory.
Patching the OpenMAX IL headers
You must patch the OMX_Types.h for OpenMAX IL 1.2.0 and 1.1.2 to support 64-bit compilation.
The reason is that OMX_U32 and OMX_S32 are defined using the C type long. This is a 64-bit type when compiling for arm_v8.
1.1.2/OMX_Types.h
Change the type definitions of OMX_U32 and OMX_S32 to be (unsigned) int rather than (unsigned) long
1.2.0/OMX_Types.h
Change the type definitions of OMX_U32 and OMX_S32 to be (unsigned) int rather than (unsigned) long
If CONFIG_64BIT is defined, then type definition of OMX_PTR to be an (unsigned) long
Modify the type definition of OMX_STRING to be a OMX_PTR.
If CONFIG_64BIT is not set,then both OMX_PTR and OMX_STRING must retain their default definitions. By default CONFIG_64BIT is not set in the file.Use #ifdef to determine the correct behavior.
#ifdef CONFIG_64BIT
typedef unsigned long OMX_PTR;
typedef OMX_PTR OMX_STRING;
#else
typedef void* OMX_PTR;
typedef char *OMX_STRING;
#endif
Create the following symbolic links:
1.1.2/OMX
Creaete the symbolic link 1.1.2/OMX,that points to the 1.1.2 folder.
pushd khronos/original/OMXIL/1.1.2/
ln -s . OMX
popd
1.2.0/OMX
Create the symbolic link 1.2.0/OMX,that points to the 1.2.0 folder.
pushd khronos/original/OMXIL/1.2.0/
ln -s . OMX
popd
2.4.3下載OpenMAX IL API頭文件
單元測試和Android用戶端組件需要特定版本的OpenMAX IL API頭文件。
表 2-1 OpenMAX IL API 頭文件版本
OpenMAX IL API headers version Required for
| 1.2.0 | Unit tests |
必須從以下位置下載Khronos頭文件:
http://www.khronos.org/registry/omxil/
表2-2 OpenMAX IL API標頭存檔位置OpenMAX IL API
頭文件解壓縮到
| 1.2.0 | khronos/original/OMXIL/1.2.0 |
將頭文件下載并解壓縮到表中命名的目錄中。這些路徑是相對于v5xx目錄的。
修補OpenMAX IL頭文件
必須為OpenMAX IL 1.2.0和1.1.2修補OMX_Types.h,以支持64位編譯。
原因是使用C類型long定義了OMX_U32和OMX_S32。 為arm_v8編譯時,這是64位類型。
1.1.2/OMX_Types.h
將OMX_U32和OMX_S32的類型定義更改為(unsigned)int而不是(unsigned)long
1.2.0/OMX_Types.h
將OMX_U32和OMX_S32的類型定義更改為(unsigned)int而不是(unsigned)long
如果定義了CONFIG_64BIT,則OMX_PTR的類型定義為 (unsigned) long
將OMX_STRING的類型定義修改為OMX_PTR。
如果未設置CONFIG_64BIT,則OMX_PTR和OMX_STRING都必須保留其默認定義。 默認情況下,未在文件中設置CONFIG_64BIT。使用#ifdef確定正確的行為。
#ifdef CONFIG_64BIT
typedef unsigned long OMX_PTR;
typedef OMX_PTR OMX_STRING;
#else
typedef void* OMX_PTR;
typedef char *OMX_STRING;
#endif
Create the following symbolic links:
1.1.2/OMX
創建指向1.1.2文件夾的符號鏈接1.1.2 / OMX.
pushd khronos/original/OMXIL/1.1.2/
ln -s . OMX
popd
1.2.0/OMX
創建指向1.2.0文件夾的符號鏈接1.2.0 / OMX.
pushd khronos/original/OMXIL/1.2.0/
ln -s . OMX
popd
2.5 OpenMAX IL core
The purpose of the core is to expose the OMX components registered with the core to a client,in this case Android.The DDK includes a basic OpenMAX IL core along with Android integration code you can use.
The included core only supports ARM OMX components.If you need to support OMX components from other vendors,then you need to write a core or use an existing third party core.
2.5 OpenMAX IL 內核
內核的目的是向客戶端(在本例中為Android)公開向內核注冊的OMX組件。DDK包含基本的OpenMAX IL內核以及可使用的Android集成代碼。
包含內核僅支持ARMOMX組件。如果需要支持其他供應商的OMX組件,則需要編寫一個內核或使用現有的第三方內核。
2.6 libjpeg hearders
You must download and configure the libjpeg headers or use the Android pre-configured headers.
Obtain the source-code for libjpeg release v6b from the libjpeg website http://ijg.org
1.Unpack the jpegsrc.v6b.tar.gz file somewhere in your filesystem.
2.Create the folder thirdparty/libjpeg int the drive top-level folder.
3.Copy the libjpeg header files into thirdparty/libjpeg.
4.You must configure libjpeg,see http://ijg.org for details. Android has pre-configured headers in its source-tree as an
alternative to downloading and configuring explicitly for the ARM Mali Video Processor Android DDK.
2.6 libjpeg頭文件
您必須下載并配置libjpeg頭文件,或使用Android預先配置的頭文件。
從libjpeg網站http://ijg.org獲取libjpeg發行版v6b的源代碼
1.將jpegsrc.v6b.tar.gz文件解壓縮到文件系統中的某個位置。
2.在驅動器頂級文件夾中創建 thirdparty/ libjpeg文件夾。
3.將libjpeg頭文件復制到thirdparty / libjpeg中。
4.您必須配置libjpeg,有關詳細信息,請參見http://ijg.org。 Android在其源代碼樹中已預先配置了頭文件,以替代為ARM Mali視頻處理器Android DDK明確下載和配置。
總結
以上是生活随笔為你收集整理的Mail_Android_Video_SW_DDK_Intergration_Guide_And_Codec_User_Manual中文翻译【chapter2】的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 周志华西瓜书第三章学习笔记
- 下一篇: 【移动端】手机界面的设计尺寸