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.1.2Android user-side components
1.2.0Unit 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.1.2khronos/original/OMXIL/1.1.2
1.2.0khronos/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.1.2Android user-side components
1.2.0Unit tests

必须从以下位置下载Khronos头文件:
http://www.khronos.org/registry/omxil/

表2-2 OpenMAX IL API标头存档位置OpenMAX IL API
头文件解压缩到

1.1.2khronos/original/OMXIL/1.1.2
1.2.0khronos/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明确下载和配置。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
DDKWizard is a so-called project creation wizard that allows you to create projects that use the DDKBUILD scripts from OSR (also available in the download section from this site). The wizard will give you several options to configure your project prior to the creation. Have a look at figure 1. Figure 2: Project creation dialog (click to enlarge) Instead of forcing you to use a subset of options and specific DDKs this wizard lets you choose what you want. Of course the template files are predefined and so is the content of the project(s) within certain limits. However, I tried to choose the best options that I could think of and provide a way to create quickly and easily the DDKBUILD project you want. This means that I tried to leave out those things that may limit your choice lateron and add other options that will give you the flexibility to change options quickly long after the project was created. DDKWizard adds a new subfolder in the project creation wizard - see figure 2 - and presents all supported project types there. Currently these are Driver, Empty Driver, Native Application, Win32 console application and Win32 DLL. In either case you just choose the type of project to create, give the name of the project and/or solution as well as other options (at the bottom) and you are being presented the wizard dialog (see figure 1). From the wizard dialog you choose the DDKBUILD script you want to use, the DDK or multiple DDKs as well as the other options. If you are curious about the Property Sheet feature, please download the manual and read the respective section there. Compatibility DDKWizard (1.2.0a) has been tested on the following configurations: Visual Studio Professional .NET with WNET DDK and DDKBUILD.CMD on Windows 2003 Server R2 Standard Visual Studio Professional .NET 2003 with WNET DDK and DDKBUILD.CMD on Windows 2003 Server R2 Standard Visual C++ 2005 Express with WNET DDK and DDKBUILD.CMD on Windows 2003 Server R2 Standard Visual Studio 2005 Professional with WNET DDK and DDKBUILD.CMD on Windows 2003 Server R2 Standard Visual Studio 2008 Professional with WNET DDK and DDKBUILD.CMD on Windows XP From this list one can deduce that it is supposed to also run if you got the respective "non-Express" Visual C++ version. Also if there has been some Visual C++ .NET 2003 Express DDKWizard is prepared for it. Download You could go watch the demo or download right away: Manual: contains the detailed description of how to configure DDKBUILD and use DDKWizard. If you are unsure whether you should download and install DDKWizard grab this file and skim over it. Download: ddkwiz_manual.pdf (~513kB, 2009-12-05@20-11-55, downloaded 31666 times) Installer (incl. manual) of DDKWizard 1.3.0a: this is the setup program which will install DDKWizard along with the manual on your computer and register it with Visual Studio. Download: ddkwizard_setup.exe (~557kB, 2009-12-05@20-12-37, downloaded 72787 times) DDKBUILD.CMD: Stable version 7.4/r60 of OSRs DDKBUILD NT script version. Feedback for this version can be sent to me directly. Download: ddkbuild_cmd.zip (~12kB, 2009-11-28@04-38-36, downloaded 20707 times) DDKBUILD.BAT (obsoleted by the above!): Version 6.12 of OSRs DDKBUILD batch script version. Download: ddkbuild_bat.zip (~6kB, 2008-03-21@15-59-07, downloaded 17226 times) Trunk version of DDKBUILD.CMD The version from trunk is available as well. Please note that this is not necessarily the same version as offered in the ZIP archive above. It may be in a better shape (e.g. reported bugs fixed) or slightly worse (e.g. new feature that is not yet stable). So use this version only if you want to test the latest development version and are able to provide feedback. Here is the link to the prettier ViewVC URL: ddkbuild/trunk - SVN clients get read-only access here. License All projects created by DDKWizard can be put under whatever license you like to put them. The scripts and HTML files which contain the DDKWizard logic are subject to the zlib license starting with version 1.2.0, before it was released under the GPL v2 from 1991. The zlib license is a lot more liberal and allows just about any kind of use for the script and "user interface" part of DDKWizard. The DDKBUILD scripts are mirrored with the permission of OSR. I will try to keep it synchronized at all times. Everything else Contact me here and also visit my blog and my website. Note that I usually announce new versions of DDKWizard and DDKBUILD on my blog - you also might want to subscribe to the RSS feed for DDKWizard and DDKBUILD. This page will be extended whenever I deem it necessary.

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

水笙赵

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值