Compile android source and kernel for emulator in Debian
2013-06-23 14:23
701 查看
1、download the android source code
Reference from
follow the reference:
Create the dir and export the PATH
Download the repo
Repo init the code version you want
finally sync the codes
if try to stop the repo, just try
and continue the repo
after download, must enter "repo sync" to check the code again.
2、download the kernel
Reference from
click the kernel/common, there would be a instruction on the top:
Reference from
http://source.android.com/source/downloading.html
follow the reference:
Create the dir and export the PATH
$ mkdir ~/bin $ PATH=~/bin:$PATH
Download the repo
$ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo $ chmod 775 ~/bin/repo
Repo init the code version you want
$ repo init -u https://android.googlesource.com/platform/manifest -b android-4.0.1_r1
finally sync the codes
$ repo sync // better way $ repo sync -j16
if try to stop the repo, just try
Ctrl + z
and continue the repo
$ repo sync // or $ repo sync -j16
after download, must enter "repo sync" to check the code again.
2、download the kernel
Reference from
https://android.googlesource.com/
click the kernel/common, there would be a instruction on the top:
git clone https://android.googlesource.com/kernel/common[/code]
the version for emulatorgit clone https://android.googlesource.com/kernel/goldfish[/code]
3、Compile the source code
1) check the build environmenthttp://source.android.com/source/initializing.html
2) compile$ cd ~/Android/source_code/ $ make // or $ make -j4
3) there would be the files in the following dir$ ls out/host/linux-x86/bin/ | grep emulator emulator emulator64-arm emulator64-mips emulator64-x86 emulator-arm emulator-mips emulator_renderer emulator-ui emulator-x86 $ ls out/target/product/generic/ | grep img ramdisk.img system.img userdata.img
4、 Compile the kernel$ cd goldfish/ $ ls
but there is no files now.
checkout for the real codes.$ git checkout android-goldfish-2.6.29 master origin/linux-goldfish-3.0-wip android-goldfish-3.4 origin/android-goldfish-2.6.29 origin/master HEAD origin/android-goldfish-3.4 linux-goldfish-3.0-wip origin/HEAD
choose the version you want$ git checkout android-goldfish-2.6.29 Checking out files: 100% (26821/26821), done. Branch android-goldfish-2.6.29 set up to track remote branch android-goldfish-2.6.29 from origin. 切换到一个新分支 'android-goldfish-2.6.29'
then$ ls arch CREDITS drivers include Kbuild MAINTAINERS net samples sound block crypto firmware init kernel Makefile README scripts usr COPYING Documentation fs ipc lib mm REPORTING-BUGS security virt
compile the kernel
1) crrect the Mafile$ vim Makefile //correct the following messenge #ARCH ?= $(SUBARCH) ARCH ?= arm CROSS_COMPILE ?= arm-none-linux-gnueabi-
2) make menuconfig$ make menuconfig >> Save an Alternate Configuration File
3) make
TIPS : there would be error without libnucurses$ sudo apt-get install libncurses5 libncurses5-dev // in AMD64 $ sudo apt-get install libncurses5 libncurses5-dev $ sudo apt-get install ia32-libs $ sudo apt-get install lib32ncurses5 lib32ncurses5-dev
相关文章推荐
- Android: Simplified source code for parsing and working with XML data and web services in Android
- Milestone/A853/XT702/umts_sholes Compile your own Android ROM and Customize your own linux kernel
- Step by Step tutorial howto compile kernel in Debian 5.0 (Lenny)
- Support for EAP-SIM and EAP-AKA in Android.
- Compile Assimp Open Source Library For Android Compile Assimp Open Source Library For Android
- Dowload and compile android source code implemented by qualcomm
- Linux系统下(deepin for debian 6.4.0-2) 配置ruby and rails 环境
- Is there any way to define a min and max value for edittext in android?
- Build CornerStone for ICS and run in emulator
- how to compile kernel in android ?
- (编译适用于ARM的linux内核并进行QEMU仿真)Compile Linux kernel 3.2 for ARM and emulate with QEMU
- Configure Javadoc and Source Code for JRE in Eclipse JDT
- Atlas Control Toolkit and Source Code for the Build-in Asp.Net 2.0 Providers
- Compile env setup for Android source
- PhoneGap: open source development framework for building cross-platform mobile apps, Build apps in HTML and JavaScript
- Android: How to download the latest zip Android Source Code easily and using it in Intellij
- Enable ip rule in kernel for Android ICS
- 【Android】提示Note: This element has no attached source and the Javadoc could not be found in the attac
- Build or Compile Linphone from Source for iPhone and iPad
- [React Native] Writing Platform-Specific Components for iOS and Android in React Native