(若是使用下載明遠智睿的虛擬機,請直接跳到 下載源碼並解壓 這一節)
在這裏建議用戶使用64bit的ubuntu12.04的操做系統,已經真機編譯驗證過。java
登錄htttp://www。myzr。Com。cn的下載專區,下載jdk-6u45-linux-x64.bin文件
$ cd /usr
$ sudo mkdir java
$ cd java
$ sudo cp ~ /jdk-6u45-linux-x64.bin ./
$ sudo chmod 777 ./jdk-6u45-linux-x64.bin
$ sudo ./jdk-6u45-linux-x64.bin
$ sudo gedit /etc/profile
增長如下環境變量
export JAVA_HOME=/usr/java/jdk1.6.0_45
export JRE_HOME=$JAVA_HOME/jre
export CLASSPATH=$JAVA_HOME/lib:$JRE_HOME/lib:$CLASSPATH
export PATH=$JAVA_HOME/bin:$PATH:$JRE_HOME/bin
$ source /etc/profile
$ java –version
(看到版本爲1.6.0_45就表示成功)python
$ sudo apt-get install git gnupg flex bison gperf build-essential zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown libxml2-utils xsltproc zlib1g-dev:i386
$ sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
$ sudo apt-get install gcc:i386 linux-libc-dev:i386
$ sudo apt-get install uuid uuid-dev
$ sudo apt-get install zlib1g-dev liblz-dev
$ sudo apt-get install liblzo2-2 liblzo2-dev
$ sudo apt-get install uuid-dev:i386
$ sudo apt-get install liblzo2-dev:i386
$ sudo ln -sf /lib/i386-linux-gnu/libuuid.so.1 /usr/lib/libuuid.solinux
登錄htttp://www。myzr。Com。cn下載專區下載Android4.2源碼
Android4.2的源碼包:myzr_android4_2_2_1_1_0.tar.bz2android
$ mkdir ~/myandroid
$ cd ~
$ tar -jxvf myzr_android4_2_2_1_1_0.tar.bz2 –C ~/myandroidgit
$ export ARCH=arm
$ export CROSS_COMPILE=~/myandroid/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin/arm-eabi- $ export PATH=~/myandroid/bootable/bootloader/uboot-imx/tools:$PATHubuntu
$ cd ~/myandroid/bootable/bootloader/uboot-imx
$ make distclean
$ make mx6q_sabresd_android_config
$ makemarkdown
$ cd ~/myandroid/kernel_imx
$ make imx6_android_defconfig
$ make uImagecurl
$ cd ~/myandroid
$ source build/envsetup.sh
$ lunch sabresd_6dq-eng (此爲調試版本,發佈版本改爲lunch sabresd_6dq-usr)
$ make bootimageflex
$ cd ~/myandroid
$ source build/envsetup.sh
$ lunch sabresd_6dq-eng (此爲調試版本,發佈版本改爲lunch sabresd_6dq-usr)
$ makeui