The Ubuntu 64-bit server version was installed a few days ago to compile the Android system. When I got off work yesterday, compilation started smoothly. After work this morning, I found that the compilation was completed. Download the Android SDK and use emulator to load the compiled kernel. Summarize the entire process for future reference.
Preparation phase:
Install Ubuntu Linux.
1. Install git and curl:
Sudo apt-get install git-core
Sudo apt-get install curl
2. Use curl to retrieve the repo script
Http://android.git.kernel.org/repo>/usr/bin/repo
Depending on your network, you may need to set up a proxy to access the repo.
3. Modify the repo permission to allow the repo to run
Chmod + x/usr/bin/repo
4. Create a directory
/Home/android
5. Go to the android directory and obtain the main source code manifest file.
Repo init-u git: // android.git.kernel.org/platform/manifest.git
If you want to obtain the manifest file of the source code of a project, use the-B parameter.
For example, repo init-u git: // android.git.kernel.org/platform/manifest.git-B xxxbranch
6. Obtain the source code
Repo sync
7. install some software
Sudo apt-get install gunpg
Sudo apt-Get install flex
Sudo apt-Get install bison
Sudo apt-Get install gperf
Sudo apt-Get install build-essential
Sudo apt-Get install zlib1g-dev
Sudo apt-Get install gcc-multilib
Sudo apt-Get install g ++-multilib
Sudo apt-Get install libc6-dev-i386
Sudo apt-Get install lib32ncurses5-dev
Sudo apt-Get install ia32-libs
Sudo apt-Get install libx11-dev
Sudo apt-Get install lib32z-dev
8. Install JDK 6
Set java_home and classpath Environment Variables
9. Compile
In the android directory, make directly.
10. Install the android SDK and set the tools in the SDK directory to path.
Android update SDK
11. Create a virtual machine
Android create AVD-N selfandroidvd-T 1
12. Start the compiled kernel:
Set a new environment variable:
ANDROID_PRODUCT_OUT = home/android/out/target/product/generic
Export ANDROID_PRODUCT_OUT
Go to the/home/android/out/target/product/generic Directory and run
Emulator-system. img-data userdata. img-ramdisk. img
The compiled kernel can be started.
Compiling environment Configuration:
HP Z600 workstation, Intel4-core 6 GB memory
Ubuntu10.10 64-server
JDK1.6.0-23