Datasheet

Chapter 3
Build Android for SCM
i.MX
3.1 Get Android Source Code (Android/Kernel/uboot)
The Android source code is maintained as more than 100 gits in an Android repository (android.googlesource.com).
To get the Android source code from Google repo, follow the steps:
Assume you had unzipped i.MX Android release package to /opt/
android_M6.0.1_2.1.0_mx6scm_source/.
$ cd ~
$ mkdir myandroid
$ mkdir bin
$ cd myandroid
$ curl https://storage.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-6.0.1_r22
$ ~/bin/repo sync
Get M6.0.1_2.1.0 kernel source code from freescales opensource git:
$ cd myandroid
$ git clone git://git.freescale.com/imx/linux-2.6-imx.git kernel_imx
$ cd kernel_imx
$ git checkout m6.0.1_2.1.0-ga
If you’re behind proxy, please use socksify to set socks proxy for git protocol. If you use uboot as
your bootloader, then you can clone the uboot git repository from freescales opensource git:
NOTE
$ cd myandroid/bootable
$ cd bootloader
$ git clone git://git.freescale.com/imx/uboot-imx.git uboot-imx
$ cd uboot-imx
$ git checkout m6.0.1_2.1.0-ga
3.2 Patch NXP standard code package
Apply all i.MX Android patches (including SCM patches) using the f
ollowing steps:
Assume you had unzipped i.MX Android release package to /opt/
android_M6.0.1_2.1.0_mx6scm_source/.
$ cd ~/myandroid
$ source /opt/android_M6.0.1_2.1.0_mx6scm_source/code/M6.0.1_2.1.0/and_patch.sh
$ help
Now you should see "c_patch" function is available for you
$ c_patch /opt/android_M6.0.1_2.1.0_mx6scm_source/code/M6.0.1_2.1.0 imx_M6.0.1_2.1.0-ga
Here "/opt/android_M6.0.1_2.1.0_mx6scm_source/code/M6.0.1_2.1.0" is the location of the
patches (i.e. directory created when you unzip release package)
"imx_M6.0.1_2.1.0" is the branch which will be created automatically for you to hold all
patches (only in those existing Google gits).
You can choose any branch name you like instead of "imx_M6.0.1_2.1.0".
If everything is OK, "c_patch" will generate the following output to indicate successful
patch:
Build Android for i.MX
SCM i.MX 6 Series Android User's Guide
NXP Semiconductors
5