$ 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 # This command loads most needed repos. Therefore, it can take several hours to load.
获取内核源码
1
2
3
4
5
$ 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 m6.0.1_2.1.0-ga
获取u-boot源码
1
2
3
4
5
6
$ cd ~/myandroid/bootable
$ mkdir bootloader
$ 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
为标准Android源码包patch
2. 编译
前面步骤执行完后,执行下列命令开始编译
1
2
3
4
$ cd ~/myandroid
$ source build/envsetup.sh
$ lunch sabresd_6dq-user
$ make 2>&1| tee build-log.txt