没有合适的资源?快使用搜索试试~ 我知道了~
Android_User's_Guide.pdf
需积分: 9 1 下载量 130 浏览量
2019-07-27
13:28:40
上传
评论
收藏 332KB PDF 举报
温馨提示
imx8为Nxp的音视频开发平台,该文档介绍针对imx8的linux、android移植指南文档
资源推荐
资源详情
资源评论
1 Overview
This document describes how to build Android Pie 9.0
platform for the i.MX 6 and i.MX 7 series devices. It provides
instructions for:
• Configuring a Linux
®
OS build machine.
• Downloading, patching, and building the software
components that create the Android™ system image.
• Building from sources and using pre-built images.
• Copying the images to boot media.
• Hardware/software configurations for programming the
boot media and running the images.
For more information about building the Android platform,
see source.android.com/source/building.html.
2
Preparation
The minimum recommended system requirements are as
follows:
• 16 GB RAM
• 300 GB hard disk
NXP Semiconductors
Document Number: AUG
User's Guide
Rev. P9.0.0_2.2.0-ga, 07/2019
Android™ User's Guide
Contents
1 Overview....................................................................1
2 Preparation................................ ................................ 1
3 Building the Android platform for i.MX...................2
4 Running the Android Platform with a
Prebuilt Image........................................................... 8
5 Programming Images.............................................. 12
6 Booting................................ ................................... 16
7 Android Platform Update........................................22
8 Customized Configuration............. ......................... 23
9 Revision History......................... ............................ 24
2.1 Setting up your computer
To build the Android source files, use a computer running the Linux OS. The Ubuntu 16.04 64bit version and openjdk-8-jdk
is the most tested environment for the Android Pie 9.0 build.
After installing the computer running Linux OS, check whether all the necessary packages are installed for an Android build.
See "Setting up your machine" on the Android website source.android.com/source/initializing.html.
In addition to the packages requested on the Android website, the following packages are also needed:
$ sudo apt-get install uuid uuid-dev
$ sudo apt-get install zlib1g-dev liblz-dev
$ sudo apt-get install liblzo2-2 liblzo2-dev
$ sudo apt-get install lzop
$ sudo apt-get install git-core curl
$ sudo apt-get install u-boot-tools
$ sudo apt-get install mtd-utils
$ sudo apt-get install android-tools-fsutils
$ sudo apt-get install openjdk-8-jdk
$ sudo apt-get install device-tree-compiler
$ sudo apt-get install gdisk
$ sudo apt-get install m4
$ sudo apt-get install libz-dev
NOTE
If you have trouble installing the JDK in Ubuntu, see How to install misc JDK in Ubuntu
for Android build.
Configure git before use. Set the name and email as follows:
• git config --global user.name "First Last"
• git config --global user.email "first.last@company.com"
2.2
Unpacking the Android release package
After you set up a computer running Linux OS, unpack the Android release package by using the following commands:
$ cd ~ # or any other directory you like
$ tar xzvf imx-p9.0.0_2.2.0-ga.tar.gz
3
Building the Android platform for i.MX
3.1 Getting Android source code (Android/kernel/U-Boot)
The i.MX Android release source code consists of three parts:
• NXP i.MX public source code, which is maintained in CodeAurora Forum repository.
• AOSP Android public source code, which is maintained in android.googlesource.com.
• NXP i.MX Android proprietary source code package, which is maintained in www.NXP.com.
To generate the i.MX Android release source code build environment, follow the steps below. Assume you had i.MX
Android proprietary source code package imx-p9.0.0_2.2.0-ga.tar.gz under the ~/. directory.
$ mkdir ~/bin
$ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
$ export PATH=${PATH}:~/bin
$ source ~/imx-p9.0.0_2.2.0-ga/imx_android_setup.sh
Building the Android platform for i.MX
Android™ User's Guide, Rev. P9.0.0_2.2.0-ga, 07/2019
2 NXP Semiconductors
# By default, the imx_android_setup.sh script will create the source code build environment
in the folder ~/android_build
# ${MY_ANDROID} will be refered as the i.MX Android source code root directory in all i.MX
And
roid release documentation.
$ export MY_ANDROID=~/android_build
3.2 Building Android images
Building the Android image is performed when the source code has been downloaded (Section 3.1) and patched (Section
3.2).
Commands lunch <buildName-buildType> to set up the build configuration and make to start the build process are
executed.
The build configuration command lunch can be issued with an argument <Build name>-<Build type> string, such as lunch
sabresd_6dq-userdebug, or can be issued without the argument presenting a menu of selection.
The Build Name is the Android device name found in the directory ${MY_ANDROID}/device/fsl/. The following table lists
the i.MX build names.
Table 1. Build names
Build name Description
sabreauto_6q i.MX 6Quad/6DualLite/6QuadPlus SABRE-AI Board
sabresd_6dq i.MX 6Quad/6DualLite/6QuadPlus SABRE-SD Board and SABRE Platform
sabresd_6sx i.MX 6SoloX SABRE-SD Board
sabresd_7d i.MX 7Dual SABRE-SD Board
evk_7ulp i.MX 7ULP EVKB-SD Board
The build type is used to specify what debug options are provided in the final image. The following table lists the build types.
Table 2. Build types
Build type Description
user Production ready image, no debug
userdebug Production ready image similar with "user" but with root access and debug
tools
eng Development image with debug tools
Android build steps are as follows:
1. Change to the top level build directory.
$ cd ${MY_ANDROID}
2. Set up the environment for building. This only configures the current terminal.
$ source build/envsetup.sh
3. Execute the Android lunch command. In this example, the setup is for the production image of i.MX 6Quad SABRE
Board/Platform device with user type.
$ lunch sabresd_6dq-userdebug
4. Execute the make command to generate the image.
$ make 2>&1 | tee build-log.txt
Building the Android platform for i.MX
Android™ User's Guide, Rev. P9.0.0_2.2.0-ga, 07/2019
NXP Semiconductors 3
When the make command is complete, the build-log.txt file contains the execution output. Check for any errors.
For BUILD_ID & BUILD_NUMBER changing, update build_id.mk in your ${MY_ANDROID} directory. For details, see
the i.MX Android Frequently Asked Questions.
For i.MX 6DualLite SABRE-SD, i.MX 6Quad SABRE-SD, and i.MX 6QuadPlus SABRE-SD boards, the same build
configuration is used. They share the same kernel/system/recovery images with the exception of the U-Boot image. The
following outputs are generated by default in ${MY_ANDROID}/out/target/product/sabresd_6dq:
• root/: root file system (including init, init.rc). Mounted at /.
• system/: Android system binary/libraries. Mounted at /system.
• data/: Android data area. Mounted at /data.
• recovery/: root file system when booting in "recovery" mode. Not used directly.
• dtbo-imx6q.img: Board's device tree binary for i.MX 6Quad 1 GHz SABRE-SD.
• dtbo-imx6q-ldo.img: Board's device tree binary for i.MX 6Quad 1.2 GHz SABRE-SD.
• dtbo-imx6qp.img: Board's device tree binary for i.MX 6QuadPlus 1 GHz SABRE-SD.
• dtbo-imx6qp-ldo.img: Board's device tree binary for i.MX 6QuadPlus 1.2 GHz SABRE-SD.
• dtbo-imx6dl.img: Board's device tree binary for i.MX 6DualLite SABRE-SD.
• vbmeta-imx6q.img: Android Verify boot metadata image for dtbo-imx6q.img.
• vbmeta-imx6q-ldo.img: Android Verify boot metadata image for dtbo-imx6q-ldo.img.
• vbmeta-imx6qp.img: Android Verify boot metadata image for dtbo-imx6qp.img.
• vbmeta-imx6qp-ldo.img: Android Verify boot metadata image for dtbo-imx6qp-ldo.img.
• vbmeta-imx6dl.img: Android Verify boot metadata image for dtbo-imx6dl.img.
• ramdisk.img: ramdisk image generated from "root/". Not used directly.
• system.img: EXT4 image generated from "system/". It can be programmed to "SYSTEM" partition on SD/eMMC card
with "dd".
• recovery-imx6q.img: EXT4 image for i.MX 6Quad 1 GHz SABRE-SD, which is generated from "recovery/". Can be
programmed to the "RECOVERY" partition on SD/eMMC card with "dd".
• recovery-imx6q-ldo.img: EXT4 image for i.MX 6Quad 1.2 GHz SABRE-SD, which is generated from "recovery/".
Can be programmed to the "RECOVERY" partition on SD/eMMC card with "dd".
• recovery-imx6qp.img: EXT4 image for i.MX 6QuadPlus 1 GHz SABRE-SD, which is generated from "recovery/". Can
be programmed to the "RECOVERY" partition on SD/eMMC card with "dd".
• recovery-imx6qp-ldo.img: EXT4 image for i.MX 6QuadPlus 1.2 GHZ SABRE-SD, which is generated from
"recovery/". Can be programmed to the "RECOVERY" partition on SD/eMMC card with "dd".
• recovery-imx6dl.img: EXT4 image for i.MX 6DualLite SABRE-SD, which is generated from "recovery/". Can be
programmed to the "RECOVERY" partition on SD/eMMC card with "dd".
• partition-table.img: GPT partition table image, used for 8 GB SD card.
• partition-table-14GB.img: GPT partition table image, used for 16 GB SD card.
• partition-table-28GB.img: GPT partition table image, used for 32 GB SD card.
• u-boot-imx6q.imx: U-Boot image with no padding for i.MX 6Quad 0.8/1 GHz SABRE-SD.
• u-boot-imx6q-ldo.imx: U-Boot image with no padding for i.MX 6Quad 1.2 GHz SABRE-SD.
• u-boot-imx6qp.imx: U-Boot image with no padding for i.MX 6QuadPlus 1 GHz SABRE-SD.
• u-boot-imx6qp-ldo.imx: U-Boot image with no padding for i.MX 6QuadPlus 1.2 GHz SABRE-SD.
• u-boot-imx6dl.imx: U-Boot image with no padding for i.MX 6DualLite SABRE-SD.
• u-boot-imx6dl-sabresd-uuu.imx: U-Boot image used by UUU for i.MX 6DualLite SABRE-SD. It is not flashed to
MMC.
• u-boot-imx6q-ldo-sabresd-uuu.imx: U-Boot image used by UUU for i.MX 6Quad 1.2 GHz SABRE-SD. It is not
flashed to MMC.
• u-boot-imx6q-sabresd-uuu.imx: U-Boot image used by UUU i.MX 6Quad 0.8/1 GHz SABRE-SD. It is not flashed to
MMC.
• u-boot-imx6qp-ldo-sabresd-uuu.imx: U-Boot image used by UUU for i.MX 6QuadPlus 1.2 GHz SABRE-SD. It is not
flashed to MMC.
• u-boot-imx6qp-sabresd-uuu.imx: U-Boot image used by UUU for i.MX 6QuadPlus 1 GHz SABRE-SD. It is not
flashed to MMC.
• vendor.img: Vendor image, which holds platform binaries, mounted at /vendor.
• boot.img: A composite image, which includes the kernel Image, ramdisk, and boot parameters.
Building the Android platform for i.MX
Android™ User's Guide, Rev. P9.0.0_2.2.0-ga, 07/2019
4 NXP Semiconductors
剩余24页未读,继续阅读
资源评论
davidmgj
- 粉丝: 0
- 资源: 6
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功