/*************************************************************************
* I.MX6 Android 5.1.1 下载、编译
* 说明:
* 这里要提到的就是4.2版本,编译中断了,你接着编好像是没事的,但是这个
* 5.1.1版本貌似就得从头再编,这个有点郁闷。
*
* 2016-9-9 深圳 南山平山村 曾剑锋
************************************************************************/ 一、购买VPN(为什么要买VPN?因为要去和Google打交道):
https://www.expressvpn.xyz 二、下载参考文档:
http://www.nxp.com/zh-Hans/products/microcontrollers-and-processors/arm-processors/i.mx-applications-processors/i.mx-6-processors/i.mx6qp/i.mx-6duallite-processors-dual-core-3d-graphics-hd-video-arm-cortex-a9-core:i.MX6DL?fpsp=1&tab=Documentation_Tab 三、下载补丁包:
http://www.nxp.com/zh-Hans/products/software-and-tools/hardware-development-tools/sabre-development-system/sabre-platform-for-smart-devices-based-on-the-i.mx-6-series:RDIMX6SABREPLAT?fpsp=1&tab=Design_Tools_Tab 四、安装lib依赖:
sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z-dev ccache libgl1-mesa-dev libxml2-utils xsltproc unzip uuid uuid-dev zlib1g-dev liblz-dev liblzo2- liblzo2-dev lzop git-core curl u-boot-tools mtd-utils android-tools-fsutils 五、安装JDK:
sudo apt-get install openjdk--jdk 六、下载Android源代码:
$ cd ~
$ mkdir myandroid
$ mkdir bin
$ cd myandroid
$ curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
$ ~/bin/repo init -u https://android.googlesource.com/platform/manifest -b android-5.1.1_r1
$ ~/bin/repo sync # this command loads most needed repos. Therefore, it can take several hours to load.
$ cd ~/myandroid/prebuilts/gcc/linux-x86/arm
$ git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/armeabi-4.6
$ cd arm-eabi-4.6
$ git checkout android-4.4.3_r1 七、下载kernel:
$ cd ~/myandroid
$ git clone git://git.freescale.com/imx/linux-2.6-imx.git kernel_imx # the kernel repo is large. Therefore, this process can take a while.
$ cd kernel_imx
$ git checkout l5..1_2.1.0-ga 八、下载u-boot:
$ cd ~/myandroid/bootable
$ cd bootloader
$ git clone git://git.freescale.com/imx/uboot-imx.git uboot-imx
$ cd uboot-imx
$ git checkout l5..1_2.1.0-ga 九、在home目录解压补丁包:
. tar xvf IMX6_L5.1_2..0_AND_SOURCE_BSP.tar.gz
. cd android_L5..1_2.1.0-ga_core_source/code/
. tar xvf L5..1_2.1.0-ga.tar.gz
. source ~/android_L5..1_2.1.0-ga_core_source/code/L5..1_2.1.0-ga/and_patch.sh 十、开始打补丁,出现warning:
$ c_patch ~/android_L5..1_2.1.0-ga_core_source/code/L5..1_2.1.0-ga/ imx_L5..1_2.1.0-ga
......
Applying patch to hardware/broadcom/libbt
/home/zengjf/myandroid/hardware/broadcom/libbt/.git/rebase-apply/patch:: new blank line at EOF.
+
warning: line adds whitespace errors.
/home/zengjf/myandroid/hardware/broadcom/libbt/.git/rebase-apply/patch:: new blank line at EOF.
+
warning: line adds whitespace errors.
/home/zengjf/myandroid/hardware/broadcom/libbt/.git/rebase-apply/patch:: new blank line at EOF.
+
warning: line adds whitespace errors.
Applying patch to hardware/broadcom/wlan
Applying patch to packages/wallpapers/MusicVisualization
Applying patch to external/aac
Applying patch to external/tremolo
Applying patch to external/libpng
Applying patch to external/sonivox
Applying patch to packages/apps/DeskClock
*************************************************************
Success: Now you can build android code for FSL i.MX platform
************************************************************* 十一、编译:
. export JAVA_HOME=/usr/lib/jvm/java--openjdk-amd64/
. cd ~/myandroid
. source build/envsetup.sh
. lunch sabresd_6dq-user
. make >& | tee build-log.txt 十二、编译完成最后输出信息:
......
host C: libbz_32 <= external/bzip2/compress.c
host C: libbz_32 <= external/bzip2/decompress.c
host C: libbz_32 <= external/bzip2/bzlib.c
host StaticLib: libbz_32 (out/host/linux-x86/obj32/STATIC_LIBRARIES/libbz_intermediates/libbz.a)
Export includes file: bootable/recovery/applypatch/Android.mk -- out/host/linux-x86/obj32/EXECUTABLES/imgdiff_intermediates/export_includes
host Executable: imgdiff (out/host/linux-x86/obj32/EXECUTABLES/imgdiff_intermediates/imgdiff)
Notice file: bootable/recovery/applypatch/NOTICE -- out/host/linux-x86/obj/NOTICE_FILES/src//bin/imgdiff.txt
Notice file: external/bzip2/NOTICE -- out/host/linux-x86/obj/NOTICE_FILES/src//lib/libbz.a.txt
Install: out/host/linux-x86/bin/imgdiff
Import includes file: out/host/linux-x86/obj32/EXECUTABLES/bsdiff_intermediates/import_includes
host C: bsdiff <= external/bsdiff/bsdiff.c
external/bsdiff/bsdiff.c: In function 'main':
external/bsdiff/bsdiff.c::: warning: 'pos' may be used uninitialized in this function [-Wmaybe-uninitialized]
Export includes file: external/bsdiff/Android.mk -- out/host/linux-x86/obj32/EXECUTABLES/bsdiff_intermediates/export_includes
host Executable: bsdiff (out/host/linux-x86/obj32/EXECUTABLES/bsdiff_intermediates/bsdiff)
Install: out/host/linux-x86/bin/bsdiff
Construct recovery from boot
mkdir -p out/target/product/sabresd_6dq/obj/PACKAGING/recovery_patch_intermediates/
PATH=out/host/linux-x86/bin:$PATH out/host/linux-x86/bin/imgdiff out/target/product/sabresd_6dq/boot.img out/target/product/sabresd_6dq/recovery.img out/target/product/sabresd_6dq/obj/PACKAGING/recovery_patch_intermediates/recovery_from_boot.p
chunk : type start len
chunk : type start len
chunk : type start len
Construct patches for chunks...
patch is bytes (of )
patch is bytes (of )
patch is bytes (of )
chunk : normal ( , )
chunk : deflate ( , ) (null)
chunk : normal ( , )
Install system fs image: out/target/product/sabresd_6dq/system.img
out/target/product/sabresd_6dq/system.img+out/target/product/sabresd_6dq/obj/PACKAGING/recovery_patch_intermediates/recovery_from_boot.p maxsize= blocksize= total= reserve= #### make completed successfully (:: (hh:mm:ss)) #### zengjf@zengjf:~/myandroid$ 十三、磁盘空间占用情况:
zengjf@zengjf:~/myandroid$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 97G 87G .2G % /
none .0K .0K % /sys/fs/cgroup
udev .0G .0K .0G % /dev
tmpfs 395M 1.1M 394M % /run
none 5.0M 5.0M % /run/lock
none .0G 152K .0G % /run/shm
none 100M 52K 100M % /run/user
zengjf@zengjf:~/myandroid$ 十四、u-boot编译:
. 环境变量:
. export ARCH=arm
. export CROSS_COMPILE=~/myandroid/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin/arm-eabi-
. 编译:
. make mx6dlsabresdandroid_config
. make 十五、kernel编译:
. 环境变量:
. export PATH=~/myandroid/bootable/bootloader/uboot-imx/tools:$PATH
. export ARCH=arm
. export CROSS_COMPILE=~/myandroid/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin/arm-eabi-
. 编译:
. make imx_v7_android_defconfig
. make uImage LOADADDR=0x10008000 十六、boot.img编译:
. cd ~/myandroid
. source build/envsetup.sh
. lunch sabresd_6dq-user
. make bootimage 十七、.bashrc环境变量
......
export JAVA_HOME=/usr/lib/jvm/java--openjdk-amd64/
export PATH=$PATH:$HOME/bin:$JAVA_HOME/bin
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 export out=~/myandroid/out/target/product/sabresd_6dq
export uboot=~/myandroid/bootable/bootloader/uboot-imx
export kernel=~/myandroid/kernel_imx
export win=/mnt/hgfs/ftp_root
......

I.MX6 Android 5.1.1 下载、编译的更多相关文章

  1. 【Android 系统开发】下载 编译 Android源代码 和 Android kernel源代码

    下载Android源码简要流程 : a. 获取repo文件: curl http://commondatastorage.googleapis.com/git-repo-downloads/repo ...

  2. Android 11 源码下载+编译教程

    下载AOSP源码 这里我使用的是外国语大学的镜像执行的下载,Mac系统的话,一定要在区分大小姐的磁盘下执行 repo init -u https://mirrors.bfsu.edu.cn/git/A ...

  3. Android源码的下载和编译

    由于公司会安排我做硬解码这块,所以最近一直想研究一下Android源码,可是Android源码的下载真的挺麻烦的(可能是我第一次下载),参照网上的方法,没有一个可行的,现在就将我的下载过程和大家分享一 ...

  4. 【Android 系统开发】CyanogenMod 13.0 源码下载 编译 ROM 制作 ( 手机平台 : 小米4 | 编译平台 : Ubuntu 14.04 LTS 虚拟机)

                 分类: Android 系统开发(5)                                              作者同类文章X 版权声明:本文为博主原创文章 ...

  5. 【Android】用Cubism 2制作自己的Live2D——android sdk样本的下载与Android studio编译!

    前言- 在浏览Live2d说明书的时候我无意中发现了一个有趣的东西,就是android sdk中居然自带动态壁纸!那就让我们来试试吧,说明书此页的网址连接——中文版||日文版 Android开发所必需 ...

  6. gradle-4.1-all.zip离线包下载 极速 android studio2.3 3.0编译必备

    http://download.csdn.net/download/yongheng289/10039982 gradle-4.1-all.zip离线包下载 极速 android studio2.3 ...

  7. 下载 编译 Android源代码 和 Android kernel源代码

    下载Android源码简要流程 : a. 获取repo文件: curl http://commondatastorage.googleapis.com/git-repo-downloads/repo ...

  8. android内核源码下载和编译

    1.下载编译 新建kernel目录 ~/srcAndroid/src4.4.4_r1/kernel目录下,输入命令: seven@ThinkPad:~/srcAndroid/src4.4.4_r1/k ...

  9. I.MX6 Android 5.1 纯Linux、U-Boot编译

    /***************************************************************************** * I.MX6 Android 5.1 纯 ...

随机推荐

  1. AC日记——栈 洛谷 P1044

    题目背景 栈是计算机中经典的数据结构,简单的说,栈就是限制在一端进行插入删除操作的线性表. 栈有两种最重要的操作,即pop(从栈顶弹出一个元素)和push(将一个元素进栈). 栈的重要性不言自明,任何 ...

  2. hdu - 2667 Proving Equivalences(强连通)

    http://acm.hdu.edu.cn/showproblem.php?pid=2767 求至少添加多少条边才能变成强连通分量.统计入度为0的点和出度为0的点,取最大值即可. #include & ...

  3. 深入V8引擎-Time核心方法之mac篇

    由于底层逻辑实现不同操作系统区别很大,所以干脆分篇来说. 主要讲一下Time.TimeTicks两个类里面对于时间戳的实现,其余的运算符重载.边缘工具方法就不看了,先是Time. Time 类本身的说 ...

  4. T1230 元素查找 codevs

    http://codevs.cn/problem/1230/  题目描述 Description 给出n个正整数,然后有m个询问,每个询问一个整数,询问该整数是否在n个正整数中出现过. 输入描述 In ...

  5. RED HAT 7 性能监控工具

    https://access.redhat.com/documentation/zh-CN/Red_Hat_Enterprise_Linux/7/html/Performance_Tuning_Gui ...

  6. Tomcat服务器解析“GET /JavaWebDemo1/1.jsp HTTP/1.1”

    (2)服务器收到http请求报文,返回http响应报文 Tomcat服务器解析“GET /JavaWebDemo1/1.jsp HTTP/1.1” Tomcat服务器解析“GET /JavaWebDe ...

  7. 转: 环信联合创始人:App主流反垃圾服务难点和技术实现全解析

    转:http://science.china.com.cn/2016-03/24/content_8659834.htm 发布时间: 2016-03-24 13:15:02  |  来源: 全球财经网 ...

  8. centos 7 卸載 mysql

    跟網上文章,安裝了一個mysqlwget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm 記下卸載過程: 首先执行查看命令 ...

  9. Cg入门8:Vertex Shader - 更好的数据组织方式struct

    数据结构的使用:与C语言语法一样 參数的传递:參数匹配的是映射的语义的类型 输入输出:採用结构体,输入输出相应的參数的in和out可省略.函数的參数结构体就是输入參数集,函数的返回结构体就是输出參数集 ...

  10. Android Studio——gradle同步出错:MALFORMED

    Android Studio之前使用本地的gradle-2.10,而后创建新的工程总是报错,信息如下: Gradle sync failed: MALFORMED 而后在File->Projec ...