【iMX6Q-Android6.0】---移植 iMX6Q android6.0 源码 史上最详细

移植 iMX6Q android6.0 源码 史上最详细

  • 一、开发环境
  • 二、准备工作
    • 1、下载 android6.0源码
  • 三、移植kernel
    • 1、进入 android6.0 源码根目录
    • 2、下载 kernel 源码
    • 3、进入 kernel_imx
    • 4、切换 kernel 分支
    • 5、确认 kernel
  • 四、移植 u-boot
    • 1、进入 bootable 目录
    • 2、创建 bootloader
    • 3、进入 bootloader
    • 4、下载 u-boot 源码
    • 5、进入 uboot-imx
    • 6、切换 u-boot分支
    • 7、确认 u-boot
  • 五、移植 iMX官方 补丁
    • 1、下载 iMX官方 补丁
    • 2、准备补丁
    • 3、打上补丁
  • 六、成功打上补丁

一、开发环境

开发环境:Ubuntu16
开发平台:iMX6Q Android6.0
安卓版本:android-6.0.1_r22
补丁版本:android_M6.0.1_2.1.0_source.tar.gz

二、准备工作

1、下载 android6.0源码

官方验证移植的是 android-6.0.1_r22 所以我们下载 android-6.0.1_r22

下载AOSP源码

三、移植kernel

1、进入 android6.0 源码根目录

cd ~/imx6q-android6.0

2、下载 kernel 源码

git clone https://source.codeaurora.org/external/imx/linux-imx kernel_imx

3、进入 kernel_imx

cd kernel_imx

4、切换 kernel 分支

git checkout m6.0.1_2.1.0-ga

切换分支会提示,不用理会即可!!!
切换分支会提示,不用理会即可!!!
切换分支会提示,不用理会即可!!!

Checking out files: 100% (50469/50469), done.
Note: checking out 'm6.0.1_2.1.0-ga'.You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:git checkout -b HEAD is now at 9f38c97... MLK-12946 media: pxp-v4l2: correct the 32 bpp pixel format passed to pxp

5、确认 kernel

最后一个节点应该是

commit 9f38c97e49235662dc45caa3213b0debea45d87b
Author: Fancy Fang 
Date:   Tue Jun 28 17:18:17 2016 +0800MLK-12946 media: pxp-v4l2: correct the 32 bpp pixel format passed to pxpThe 32 bpp pixel format which is passed to pxp should be'PXP_PIX_FMT_RGB32' instead of 'PXP_PIX_FMT_RGB24', sinceonly 'PXP_PIX_FMT_RGB32' can be recognized by lcdif.Signed-off-by: Fancy Fang (cherry picked from commit c98efc59e1bc6d1814b2179f1b7e9f22cb177f47)

四、移植 u-boot

1、进入 bootable 目录

cd bootable

2、创建 bootloader

mkdir bootloader

3、进入 bootloader

cd bootloader

4、下载 u-boot 源码

git clone https://source.codeaurora.org/external/imx/uboot-imx uboot-imx

5、进入 uboot-imx

cd uboot-imx

6、切换 u-boot分支

git checkout m6.0.1_2.1.0-ga

切换分支会提示,不用理会即可!!!
切换分支会提示,不用理会即可!!!
切换分支会提示,不用理会即可!!!

Note: checking out 'm6.0.1_2.1.0-ga'.You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:git checkout -b HEAD is now at 6581aea... MLK-12884 mx7dsabresd: Fix LCD_PWR_EN output setting

7、确认 u-boot

最后一个节点应该是

commit 6581aea78198bf78c9ceb3308b96d87c9d8f61bb
Author: Ye Li 
Date:   Mon Jun 6 11:41:30 2016 +0800MLK-12884 mx7dsabresd: Fix LCD_PWR_EN output settingLCD_PWR_EN controls the G pin of Q13 PMOS which needs low voltage to connectD to S for outputting LCD 3.3V. If LCD_PWR_EN is high, we measured the LCD 3v3is actually 1.2V.Signed-off-by: Ye Li (cherry picked from commit 28eb616b6c49de492cc0cdb3ad5b618bed77960f)

五、移植 iMX官方 补丁

1、下载 iMX官方 补丁

android_M6.0.1_2.1.0_source.tar.gz

NXP软件文档官网

2、准备补丁

将下载的 android_M6.0.1_2.1.0_source.tar.gz 拷贝到 和 android6.0源码同一个目录 然后解压

再进入 android6.0 源码根目录

3、打上补丁

source ../android_M6.0.1_2.1.0_source/code/M6.0.1_2.1.0/and_patch.sh
c_patch ../android_M6.0.1_2.1.0_source/code/M6.0.1_2.1.0/ imx_M6.0.1_2.1.0

六、成功打上补丁

Applying patch to frameworks/opt/telephony
*************************************************************
Success: Now you can build android code for FSL i.MX platform
*************************************************************


本文来自互联网用户投稿,文章观点仅代表作者本人,不代表本站立场,不承担相关法律责任。如若转载,请注明出处。 如若内容造成侵权/违法违规/事实不符,请点击【内容举报】进行投诉反馈!

相关文章

立即
投稿

微信公众账号

微信扫一扫加关注

返回
顶部