編譯環境:ubuntu10.04 1.安裝java 下載jdk-1_5_0_22-linux-i586.bin 安裝./jdk-1_5_0_22-linux-i586.bin 會產生jdk1.5.0_22目錄,將此目錄移至/usr/local/下 2.添加環境變數 export JAVA_HOME=/usr/local/jdk1.5.0_22 export JAVA_FONTS=$JAVA_HOME/jre/lib/fonts(不知道幹什麼用的) export JRE_HOME=$JAVA_HOME/jre(不知道幹什麼用的) export JAVA_PATH=$JAVA_HOME/bin: $JRE_HOME/bin export CLASSPATH=.: $JAVA_HOME/lib: $JRE_HOME/lib: $CLASSPATH: $JAVA_HOME/lib/dt.jar: $JAVA_HOME/lib/tools.jar(不知道幹什麼用的) export ANDROID_JAVA_HOME=$JAVA_HOME(不知道幹什麼用的) export PATH=$JAVA_PATH: $PATH 3.安裝必要的工具(以Ubuntu為例) $sudo apt-get install build-essential(最新) $sudo apt-get install zlib1g-dev(最新) $sudo apt-get install flex(安裝) $sudo apt-get install libncurses-dev(安裝) $sudo apt-get install libx11-dev(最新) $sudo apt-get install gperf(安裝) $sudo apt-get install bison(安裝) PS:最新為不需要安裝但是編譯Android所必須的工具 4.開始編譯 source build/envsetup.sh choosecombo 1 1 6 3 ============================================ PLATFORM_VERSION_CODENAME=REL PLATFORM_VERSION=1.6 TARGET_PRODUCT=msm7625_qrd_evt1 TARGET_BUILD_VARIANT=eng TARGET_SIMULATOR=false TARGET_BUILD_TYPE=release TARGET_ARCH=arm HOST_ARCH=x86 HOST_OS=linux HOST_BUILD_TYPE=release BUILD_ID=Donut ============================================ make -j4(-j4是指開四個線程,速度會快一些) import sha unzipping target target-files... WARNING: Failed to load max image sizes; will not enforce image size limits. warning: no radio image in input target_files; not flashing radio failed to reconstruct target deflate chunk 2 [(null)]; treating as normal Construct patches for 3 chunks... patch 0 is 207 bytes (of 1904650) patch 1 is 218299 bytes (of 159983) patch 2 is 151 bytes (of 1799) chunk 0: normal ( 0, 1904650) 207 chunk 1: deflate ( 1904650, 415279) 218299 (null) chunk 2: normal ( 2319929, 455) 151 done. make kernelconfig 出現以上,編譯成功!~ |