Android Building Records

the following operation basic on google original source codes of android2.3.
====================================
build android:
refer to the android web site!
*http://source.android.com/source/downloading.html


1) download source codes.
2) install compile tools.
3) type"make -jN","N" is the double time of total numbers of cpu core.


====================================
build android sdk


basic on the step of build-android


1)type "make sdk -jN"


=====================================
module build


basic onf the step of build-android


1) source /build/envsetup.sh
*this is important!we can use lots of other commands after running this script.


2) e.g:
mmm frameworks/base/services/java


3) package the system image
make -jN


====================================
Kernel build


the dufault kernel image which was used by emulator is in the folder path:
"prebuild/android-arm/kernel/vmlinux-qemu"


*refer to : http://source.android.com/source/building-kernels.html


1) download linux kernel sources
1. mkdir kernel
2. cd kernel
3. e.g : git clone https://android.googlesource.com/kernel/goldfish.git
* after resolving done,the git clone seemed to be empty.
solution:
from :http://stackoverflow.com/questions/9004192/the-git-clone-is-empty-why-this-happens
-----------------------------------------
git branch -a
* master
 remotes/origin/HEAD -> origin/master
 remotes/origin/android-msm-2.6.35
 remotes/origin/master
-----------------------------------------
and then checkout the branch
-----------------------------------------
% git checkout android-msm-2.6.35
Checking out files: 100% (33866/33866), done.
Branch android-msm-2.6.35 set up to track remote branch android-msm-2.6.35 from origin.
Switched to a new branch 'android-msm-2.6.35'
------------------------------------------
4. export PATH=prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin:$PATH
$ export ARCH=arm
$ export SUBARCH=arm
$ export CROSS_COMPILE=arm-eabi-
$ make goldfish_defconfig
$ make


=============================================
emulator
refer to : http://bbs.chinaunix.net/thread-3647613-1-1.html
1. config the enviroment parameters
2. type "emulator -system system.img -data userdata.img -ramdisk ramdisk.img -kernel kernel/godifhs/arch/arm/boot/zImage"







评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值