九鼎创展论坛

标题: Building the System [打印本页]

作者: jjj    时间: 2011-11-15 15:46
标题: Building the System
本帖最后由 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
复制代码



作者: jjj    时间: 2011-11-16 14:10
最新的版本已经同步下来了,如何利用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“,是不是很简单
作者: jjj    时间: 2011-11-16 15:25
android 4.0.1_r1版本源码中仅支持GSM/HSPA+ Galaxy Nexus设备,即maguro
ti的panda只在master分支支持,且功能不完整
Nexus S(crespo)和Nexus S 4G(crespo4g)仅在gingerbread分支完整支持
Nexus One(passion) 已经标明不再支持





欢迎光临 九鼎创展论坛 (http://bbs.9tripod.com/) Powered by Discuz! X3.2