九鼎创展论坛中文版English
登录 | 立即注册 设为首页收藏本站 切换到宽版
查看: 5143|回复: 2
打印 上一主题 下一主题

Building the System

[复制链接]
跳转到指定楼层
楼主
发表于 2011-11-15 15:46:10 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
本帖最后由 jjj 于 2011-11-15 15:57 编辑

The basic sequence of build commands is as follows:

Initialize
Initialize the environment with the envsetup.sh script. Note that replacing "source" with a single dot saves a few characters, and the short form is more commonly used in documentation.
  1. $ source build/envsetup.sh
复制代码
or
  1. $ . build/envsetup.sh
复制代码

Choose a Target
Choose which target to build with lunch. The exact configuration can be passed as an argument, e.g.
  1. $ lunch full-eng
复制代码
The example above refers to a complete build for the emulator, with all debugging enabled.
If run with no arguments lunch will prompt you to choose a target from the menu.
All build targets take the form BUILD-BUILDTYPE, where the BUILD is a codename referring to the particular feature combination:
Build name Device Notes
full emulator fully configured with all languages, apps, input methods
full_maguro maguro full build running on Galaxy Nexus GSM/HSPA+ ("maguro")
full_panda panda full build running on PandaBoard ("panda")

and the BUILDTYPE is one of the following:
Buildtype Use
user limited access; suited for production
userdebug like "user" but with root access and debuggability; preferred for debugging
eng development configuration with additional debugging tools

Build the Code
Build everything with make. GNU make can handle parallel tasks with a -jN argument, and it's common to use a number of tasks N that's between 1 and 2 times the number of hardware threads on the computer being used for the build. E.g. on a dual-E5520 machine (2 CPUs, 4 cores per CPU, 2 threads per core), the fastest builds are made with commands between make -j16 and make -j32.
  1. $ make -j4
复制代码


回复

使用道具 举报

沙发
 楼主| 发表于 2011-11-16 14:10:07 | 只看该作者
最新的版本已经同步下来了,如何利用repo切换分支呢?
  1. repo forall -c "git checkout -b android-4.0.1_r1 android-4.0.1_r1"
复制代码
用以上命令即可实现切换到android-4.0.1_r1,如果你仅对git熟悉,而对repo不熟悉,可以
直接使用repo forall -c "git xxx“,是不是很简单
回复 支持 反对

使用道具 举报

板凳
 楼主| 发表于 2011-11-16 15:25:29 | 只看该作者
android 4.0.1_r1版本源码中仅支持GSM/HSPA+ Galaxy Nexus设备,即maguro
ti的panda只在master分支支持,且功能不完整
Nexus S(crespo)和Nexus S 4G(crespo4g)仅在gingerbread分支完整支持
Nexus One(passion) 已经标明不再支持
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|手机版|小黑屋|深圳市九鼎创展科技官方论坛 ( 粤ICP备11028681号-2  

GMT+8, 2024-5-17 14:34 , Processed in 0.019237 second(s), 17 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表