全部博文(2005)
分类: LINUX
2010-11-10 11:00:00
ubuntu 10.04和10.10上下载编译环境配置android2.2-froyo
===========================================
sudo apt-get install git-core
wget ; chmod +x repo; sudo mv repo /usr/local/bin/
mkdir android_gliethttp; cd android_gliethttp
repo init -u git://android.git.kernel.org/platform/manifest.git
repo init -u git://android.git.kernel.org/platform/manifest.git --mirror 创建mirror镜像
在.repo/manifest.xml加入kernel
repo sync
===========================================
sudo apt-get install bison default-jdk g++ zlib1g-dev flex gperf libncurses5-dev
make -j4
===========================================
使用jdk1.6编译android唯一的问题就是编译sdk的
build/tools/droiddoc/src/DroidDoc.java中DroidDoc类
引用的InvocationTargetException库时javadoc将不能通过,emulator和system.img这2个功能
都可以正常完成[luther.gliethttp],如下是jdk1.6编译sdk时提示的错误log信息:
Docs droiddoc: out/target/common/docs/services
javadoc: error - In doclet class DroidDoc, method start has thrown an exception java.lang.reflect.InvocationTargetException
com.sun.tools.javac.code.Symbol$CompletionFailure: class file for sun.util.resources.OpenListResourceBundle not found
1 error
make: *** [out/target/common/docs/services-timestamp] Error 45
解决方法:
其实对于我们china地区来说,使用如下源(ubuntu 8.04 LTS)会更快[luther.gliethttp]
deb hardy multiverse
deb-src hardy multiverse
deb hardy-updates multiverse
deb-src hardy-updates multiverse
===========================================
默认并没有kernel代码,需要单独clone,步骤为
1. 下载kernel的common版本
git clone git://android.git.kernel.org/kernel/common.git
2. 默认common的branch为
luther@gliethttp:~/common$ git branch -a
* android-2.6.27
remotes/origin/HEAD -> origin/android-2.6.27
remotes/origin/android-2.6.25
remotes/origin/android-2.6.27
remotes/origin/android-2.6.29
remotes/origin/android-2.6.32
remotes/origin/android-2.6.35
remotes/origin/android-2.6.36
remotes/origin/android-goldfish-2.6.27
remotes/origin/android-goldfish-2.6.29
我们可以直接切换到android支持的最新的kernel版本2.6.36,即
luther@gliethttp:~/common$ git checkout android-2.6.36
android-2.6.27
* android-2.6.36
remotes/origin/HEAD -> origin/android-2.6.27
remotes/origin/android-2.6.25
remotes/origin/android-2.6.27
remotes/origin/android-2.6.29
remotes/origin/android-2.6.32
remotes/origin/android-2.6.35
remotes/origin/android-2.6.36
remotes/origin/android-goldfish-2.6.27
remotes/origin/android-goldfish-2.6.29
好了,我们现在有了android最新的kernel源码了,
让我们先试试可不可以编译,拿最常用的s3c2410开刀.
git clean -xdf
make ARCH=arm s3c2410_defconfig
make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi-
一切完毕.
chinaunix网友2010-11-10 20:43:44
很好的, 收藏了 推荐一个博客,提供很多免费软件编程电子书下载: http://free-ebooks.appspot.com