查看“MYZR-RK3288-EK314 ANDROID5.1 编译手册”的源代码
←
MYZR-RK3288-EK314 ANDROID5.1 编译手册
跳转至:
导航
、
搜索
因为以下原因,您没有权限编辑本页:
您所请求的操作仅限于该用户组的用户使用:
用户
您可以查看与复制此页面的源代码。
=安装ubuntu12.04(install ubuntu12.04)= (如果使用下载明远智睿的虚拟机,请直接跳到 下载源码并解压 这一节)<br> <span style="background:#CCCCCC">(if virtual machine downloaded from MYZR is going to be used,please skip to the section"download source code and decompress"</span><br> 在这里建议用户使用64bit的ubuntu12.04的操作系统,已经真机编译验证过。<br> <span style="background:#CCCCCC">here it is recommended to users to use operating system of 64bit ubuntu12.04 of which has been proven in compilation by real machine</span><br> =安装openjdk1.7(install openjdk1.7)= 运行一下命令安装openjdk1.7<br> <span style="background:#CCCCCC">execute command to install openjdk1.7</span><br> sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"<br> sudo apt-get update<br> sudo apt-get install openjdk-7-jdk<br> $ sudo gedit /etc/profile<br> 增加以下环境变量<br> <span style="background:#CCCCCC">add the following environment variables</span><br> export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64/<br> export JRE_HOME=$JAVA_HOME/jre<br> export CLASSPATH=$JAVA_HOME/lib:$JRE_HOME/lib:$CLASSPATH<br> export PATH=$JAVA_HOME/bin:$PATH:$JRE_HOME/bin<br> $ source /etc/profile<br> $ java –version<br> (看到版本为1.7.0_121就表示成功)<br> <span style="background:#CCCCCC">(when version 1.7.0_121 is seen,which represent a success)</span><br> [[文件:my-rk32-ek314_android_2.1.1.png]]<br> =安装编译Android系统所需要的库(install libraries needed to compile Android system)= (详细信息,请看网站http://source.android.com/source/initializing.html)<br> <span style="background:#CCCCCC">( for detailed information, please visit http://source.android.com/source/initializing.html))</span><br> 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 \ g++-multilib mingw32 tofrodos gcc-multilib ia32-libs \ python-markdown libxml2-utils xsltproc zlib1g-dev:i386 \ lzop libssl1.0.0 libssl-dev<br> [[文件:my-rk32-ek314_android_3.1.1.png]]<br> =下载源码并解压源码(download source code and decompress)= ==下载源码(download source code)== 登陆http://www.myzr.com.cn下载专区下载Android5.1源码<br> <span style="background:#CCCCCC">login downloads in http://www.myzr.com.cn to download source code of Android5.1</span><br> Android5.1.1的分卷压缩解压后的源码包:rk32-myzr_android5.1_20180328.tar.bz2<br> <span style="background:#CCCCCC">source code package of Android5.1 sub-volume compression decompressed is :</span><br> ==解压源码(decompress source code)== $ mkdir ~/rk3288-myzr<br> $ tar jxvf rk32-myzr_android5.1_20180328.tar.bz2 -C ~/rk3288-myzr/<br> [[文件:my-rk32-ek314_android_5.1.1.png]]<br> =编译源码(Android系统)(compile source code(Android system))= ==设置环境变量(set environment variables)== $ export ARCH=arm<br> $ export CROSS_COMPILE=~/rk3288-myzr/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin/arm-eabi-<br> [[文件:my-rk32-ek314_android_6.1.1.png]]<br> $ ${CROSS_COMPILE}gcc -v<br> [[文件:my-rk32-ek314_android_6.1.2.png]]<br> ==编译uboot(compile uboot)== *进入U-BOOT代码目录<br> <span style="background:#CCCCCC">enter U-BOOT code directory</span><br> $ cd ~/rk3288-myzr/u-boot/<br> *设置配置文件<br> <span style="background:#CCCCCC">set up configuration file</span><br> $ make rk3288_defconfig<br> *编译<br> <span style="background:#CCCCCC">compile</span><br> $ make<br> [[文件:my-rk32-ek314_android_6.2.1.png]]<br> *目标文件<br> <span style="background:#CCCCCC">target file</span><br> [[文件:my-rk32-ek314_android_6.2.2.png]]<br> ==编译kernel(compile kernetl)== 不同的显示屏类型对于不同的镜像,在下表中列出。<br> <span style="background:#CCCCCC">different display types for different images are listed in the following table.</span><br> {| class="wikitable" |- !span style="color:#FFFFFF;background:#000080"|评估板型号<br>(evaluation board model no.) !span style="color:#FFFFFF;background:#000080"|LCD !span style="color:#FFFFFF;background:#000080"|配置<br>(configuration) |- |rowspan=3|MY-RK3288-EK314 |LVDS(1024X600) |rk3288-myzr_rh568_lvds.img |- |HDMI(1920X1080) |rk3288-myzr_rh568_hdmi.img |- |EDP(1920X1080) |rk3288-myzr_rh568_edp.img |} *进入内核代码目录<br> <span style="background:#CCCCCC">enter kernel code directory</span><br> $ cd ~/rk3288-myzr/kernel/<br> *清除内核配置<br> <span style="background:#CCCCCC">clear kernel configuration</span><br> $ make distclean<br> [[文件:my-rk32-ek314_android_6.3.1.png]]<br> *设置配置文件<br> <span style="background:#CCCCCC">set up configuration file</span><br> $ make rk3288-myzr_defconfig<br> [[文件:my-rk32-ek314_android_6.3.2.png]]<br> *编译(以LVDS为例)<br> <span style="background:#CCCCCC">compile(for example: LVDS)</span><br> $ make -j8 rk3288-myzr_rh568_lvds.img<br> 说明:截图中使用了8线程编译。<br> <span style="background:#CCCCCC">instruction:8 threads compilation is used in the screenshots</span><br> [[文件:my-rk32-ek314_android_6.3.3.png]]<br> *编译完成<br> <span style="background:#CCCCCC">complete compilation</span><br> [[文件:my-rk32-ek314_android_6.3.4.png]]<br> *目标文件<br> <span style="background:#CCCCCC">target file</span><br> kernel.img和resource.img即为编译得到的目标文件,使用ls命令可查看文件信息。<br> <span style="background:#CCCCCC">Kernel.img and resource.img are the compiled target files. Use the ls command to view the file information.</span><br> $ ls <br> [[文件:my-rk32-ek314_android_6.3.5.png]]<br> ==编译android源码(compile android code)== *设置android环境变量<br> <span style="background:#CCCCCC">set android environment variables</span><br> $ cd ~/rk3288-myzr/<br> $ source build.sh<br> [[文件:my-rk32-ek314_android_6.4.1.png]]<br> *设置android版本配置<br> <span style="background:#CCCCCC">set android version configuration</span><br> $ lunch rk3288_box-userdebug <br> [[文件:my-rk32-ek314_android_6.4.2.png]]<br> *编译<br> <span style="background:#CCCCCC">compile</span><br> $ make -j16<br> 说明:截图中使用了16线程编译。<br> <span style="background:#CCCCCC">instruction:16 threads compilation is used in the screenshots</span><br> [[文件:my-rk32-ek314_android_6.4.3.png]]<br> *编译完成<br> <span style="background:#CCCCCC">complete compilation</span><br> [[文件:my-rk32-ek314_android_6.4.4.png]]<br> *目标文件<br> <span style="background:#CCCCCC">target file</span><br> boot.img,misc.img,kernel.img,resource.img,recovery.img,system.img即为编译得到的目标文件,使用ls命令可查看文件信息。<br> <span style="background:#CCCCCC">boot.img,misc.img,kernel.img,resource.img,recovery.img,system.img are the compiled target files. Use the ls command to view the file information.</span><br> $ ./mkimage.sh<br> $ ls rockdev/Image-rk3288_box/<br> [[文件:my-rk32-ek314_android_6.4.5.png]]<br> =打包批量文件relase_android_update.img(pack relase_android_update.img)= ==编译打包工具(compile packaging tools)== 注意:如果编译了rk2918_tools.tar.bz2,就不需要重新编译了,可以跳过这个步骤。<br> <span style="background:#CCCCCC">Note: If you have compiled rk2918_tools.tar.bz2, you do not need to recompile. You can skip this step.</span><br> 默认复制rk2918_tools.tar.bz2到目录~/rk3288-myzr/rockdev下<br> <span style="background:#CCCCCC">copy rk2918_tools.tar.bz2 to directory ~/rk3288-myzr/rockdev by default</span><br> $ cd ~/rk3288-myzr/rockdev<br> $ tar jxf rk2918_tools.tar.bz2<br> $ cd rk2918_tools/<br> $ make -j4<br> $ sudo cp afptool img_unpack img_maker mkkrnlimg /usr/local/bin/<br> [[文件: my-rk32-ek314build_7.1.1.jpg]]<br> ==新建文件夹和复制镜像(new folder and copy image)== rockdev/Image-rk3288_box/的文件对应烧写工具Image\android文件夹中,rk3288box-3.10-uboot-ubuntu.parameter.txt重命名为parameter,RK3288UbootLoader_V2.30.10.bin对应RKLoader.bin,update-script和recover-script在烧写工具里面复制。package-file的内容重新按对应的文件重命名,如下:<br> <span style="background:#CCCCCC">The file of "rockdev/Image-rk3288_box/" corresponds to the file of "Image\android", rk3288box-3.10-uboot-android.parameter.txt is renamed to parameter, RK3288UbootLoader_V2.30.10.bin corresponds to RKLoader.bin, update-script and The recover-script is copied by the burning tool. The contents of the package-file are renamed according to the corresponding file, as follows:</span><br> [[文件: my-rk32-ek314_android_7.1.1.png]]<br> $ mkdir -p rockdev/android/Image <br> $ cd rockdev/android/Image/ <br> $ cp ~/rk3288-myzr/rockdev/Image-rk3288_box/* ./ <br> $ rm pc* <br> $ $ ls <br> [[文件: my-rk32-ek314_android_7.1.2.png]]<br> ==打包relase_android_update.img文件(pack relase_android_update.img)== $ afptool -pack . ../update.img <br> $ img_maker -rk32 RKLoader.bin update.img relase_android_update.img<br> [[文件: my-rk32-ek314_android_7.1.3.png]]<br>
返回至
MYZR-RK3288-EK314 ANDROID5.1 编译手册
。
导航菜单
个人工具
登录
命名空间
页面
讨论
变种
视图
阅读
查看源代码
查看历史
更多
搜索
[-_-]
NXP平台:
MYZR-IMX6-EK200
MYZR-IMX6-EK200(EN)
MYZR-IMX6-EK314
MYZR-IMX6-EK314(EN)
MYZR-IMX6-EK336
MYZR-IMX6-EK336(EN)
MYZR-IMX6-EK140
MYZR-IMX6-EK140(EN)
MYZR-IMX6-EK140P
MYZR-IMX6-EK140P(EN)
MYZR-IMX8M-EK300
MYZR-IMX8M-EK300(EN)
MYZR-IMX8M-EVK
MYZR-IMX8Mmini-EK240
MYZR-IMX8Mmini-EK240(EN)
MYZR-IMX28-EK142
MYZR-IMX28-EK142(EN)
MYZR-LS1012A-EK200
MYZR-LS1012A-EK200(EN)
Rockchip平台:
MYZR-RK3288-EK314
MYZR-RK3288-EK314(EN)
MYZR-RK3399-EK314
MYZR-RK3399-EK314(EN)
Allwinner平台:
MYZR-R16-EK166
MYZR-R16-EK166(EN)
Microchip平台:
MYZR-SAMA5-EK200
MYZR-SAMA5-EK200(EN)
网关产品:
GW200
GW300
GW310/GW311
ST平台:
MYZR-STM32-EK152
所有页面
工具
链入页面
相关更改
特殊页面
页面信息