Layer | Example | Description |
---|---|---|
Product | myProduct, myProduct_eu, myProduct_eu_fr, j2, sdk | The product layer defines a complete specification of a shipping product, defining which modules to build and how to configure them. You might offer a device in several different versions based on locale, for example, or on features such as a camera. 产品层定义了一个商业产品的完整特征,比如编译哪个模块,怎么配置它们。 |
Device | myDevice, myDevice_eu, myDevice_eu_lite | The device layer represents the physical layer of plastic on the device. For example, North American devices probably include QWERTY keyboards whereas devices sold in France probably include AZERTY keyboards. Peripherals typically connect to the device layer. 设备层代表设备的物理层。比如,北美的设备包含一个QWERTY键盘,而法国的设备有一个AZERTY键盘。 |
Board | sardine, trout, goldfish | The board layer represents the bare schematics of a product. You may still connect peripherals to the board layer. |
Arch | arm (arm5te) (arm6), x86, 68k | The arch layer describes the processor running on your board. 这个层次描述了运行在board上的处理器。 |
三、编译Android平台 本节描述了如何编译Android的默认版本。你如果学会怎么编译通用版本,就很容易知道怎么修改自己的定制版本了。 1、设备代码 首先,运行一下build/envsetup.sh这个脚本,这里面定义了一些必要的变量和函数。 % cd $TOP % . build/envsetup.sh # pick a configuration using choosecombo % choosecombo % make -j4 PRODUCT-generic-user 你也可以用eng来代替user。 % make -j4 PRODUCT-generic-eng 2、清除 执行% m clean
清除你创建的二进制文件,你也可以执行% m clobber
来清除所有的二进制文件。后面这个命令相当于删除out目录。 3、加速重编译 有时,你需要重新编译整个系统,这时,应该定义USE_CCACHE环境变量: % export USE_CCACHE=1 这样做,会强制编译系统ccache编译缓存工具,这个工具可以减少重编译的时间。ccache这个二进制文件在//prebuilt/...下,你自己的系统中不需要安装。 4、常见问题 下面的错误很可能是由于JAVA版本过时引起的。 device Dex: core UNEXPECTED TOP-LEVEL ERROR: java.lang.NoSuchMethodError: method java.util.Arrays.hashCode with signature ([Ljava.lang.Object;)I was not found. at com.google.util.FixedSizeList.hashCode(FixedSizeList.java:66) at com.google.rop.code.Rop.hashCode(Rop.java:245) at java.util.HashMap.hash(libgcj.so.7) [...] dx是一个JAVA程序,它使用JAVA1.5编译的,确保你的JAVA版本高于1.5。 四、编译Android的内核 本节介绍了怎么编译Android的默认内核。你如果学会编译通用的内核,自然也就会定制了。 先进入到设备目录(/home/joe/android/device)来建立变量: % . build/envsetup.sh % partner_setup generic 再进入到内核目录/home/joe/android/kernel
.
Checking Out a Branch
The default branch is always android
. To check out a different branch, execute the following:
% git checkout --track -b android-mydevice origin/android-mydevice //Branch android-mydevice set up to track remote branch % refs/remotes/origin/android-mydevice. //Switched to a new branch "android-mydevice"
To simplify code management, give your local branch the same name as the remote branch it is tracking (as illustrated in the snippet above). Switch between branches by executing % git checkout <branchname>
.
Verifying Location
Find out which branches exist (both locally and remotely) and which one is active (marked with an asterisk) by executing the following:
% git branch -a android * android-mydevice origin/HEAD origin/android origin/android-mydevice origin/android-mychipset
To only see local branches, omit the -a
flag.
编译内核时,运行% make -j4 五、编译变量
| This is the default flavor. A plain
|
|
This is the flavor intended to be the final release bits.
|
|
The same as
|
如果编译完一种风格后,再编译另外一种的话,应该在两次make之间运行 make installclean
来保证不会冲突。也可以运行make clean,但再编译时需要的时间更长一些。
转载地址:http://blog.csdn.net/a345017062/article/details/6096809