MYZR-IMX6 Android-4.4.2 Build Manual

来自明远智睿的wiki
Admin讨论 | 贡献2018年7月24日 (二) 08:59的版本 (创建页面,内容为“<div> = Install ubuntu12.04= (If virtual machine downloaded from MYZR is going to be used,please skip to the section"download source code and decompress").<br> He...”)

(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)
跳转至: 导航搜索

Install ubuntu12.04

(If virtual machine downloaded from MYZR is going to be used,please skip to the section"download source code and decompress").
Here it is recommended to users to use operating system of 64bit ubuntu12.04 of which has been proven in compilation by real machine.

Install JDK1.6 SE

Login in downloads of http://www.myzr.com.cn, to download 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
Add the following environment variables
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
(When version 1.6.0_45 is seen,which represent a success)

Install libraries needed to compile Android system

For detailed information, please visit [http://source.android.com/source/initializing.html http://source.android.com/source/initializing.html]
$ 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 uuid uuid-dev
$ sudo apt-get install zlib1g-dev liblz-dev
$ sudo apt-get install liblzo2-2 liblzo2-dev
$ sudo add-apt-repository ppa:git-core/ppa
$ sudo apt-get update
$ sudo apt-get install git-core curl

Download source code and decompress

Download source code

Login downloads in http://www.myzr.com.cn to download source code of Android4.2
Source code package of Android4.4 sub-volume compression decompressed is :

Decompress source code

$ mkdir ~/myandroid
$ cd ~
$ tar -jxvf myzr_android-4.4.2_r1.tar.bz2 –C ~/myandroid

Compile source code(Android system)

Set environment variables

$ 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:$PATH

Compile uboot

$ cd ~/myandroid/bootable/bootloader/uboot-imx
$ make distclean
$ make mx6q_sabresd_android_config (quadruple core configuration)
or $ make mx6dl_sabresd_android_config (dual core tile configuration)
or $ make mx6solo_sabresd_android_config (single core configuration)
$ make

Compile kernel

$ cd ~/myandroid/kernel_imx
$ make imx6_android_defconfig
$ make uImage

Compile bootimg (uImagel and ramdisk)

$ cd ~/myandroid
$ source build/envsetup.sh
$ lunch sabresd_6dq-user (this is release version,debug version is changed to be lunch sabresd_6dq-eng)
$ make bootimage

Compile system

$ cd ~/myandroid
$ source build/envsetup.sh
$ lunch sabresd_6dq-user (this is release version,debug version is changed to be lunch sabresd_6dq-eng)
$ make

Note: u-boot.bin generated is in the directory of ~/myandroid/bootable/bootloader/uboot-imx,boot.img and recovery.img and system.img are in the directory of ~/myandroid/out/target/product/sabresd_6dq