一、set android env,从远端拉repo
$mkdir imx_pi9.0
$cd imx_pi9.0
$ curl https://commondatastorage.googleapis.com/git-repo-downloads/repo > repo## repo连接超时处理:设置代理
$ chmod a+x ./repo
$ ./repo init -u http://androidsource.ap.freescale.net/project/p/platform/manifest.git -b imx_pi9.0
$ ./repo sync##出现如下的错误:(不能fetch)
Fetching projects: 19% (134/702) Fetching project platform/tools/appbundle
Fetching project platform/external/tinyxml
error: Cannot fetch imx-vpu-hantro
Fetching project platform/external/unicode
error: Cannot fetch linux-imx
error: Cannot fetch uboot-imx
error: Exited sync due to fetch errors
解决:设置库(Bitbucket)的ssh密钥
二、build android
build android 需要在有android编译环境的服务器上进行,否则状况百出。
$ source build/envsetup.sh##设置环境
$ lunch ##列出所有目标
$ make bootimage -j4
在out/target/product/mek_8q路径下生成boot.img文件
三、build Android kernel without GPU
去掉带GPU的设置,注销
Makefile文件中的obj-$(CONFIG_MXC_GPU_VIV) += gpu-viv/
或者,Kconfig中的CONFIG_MXC_GPU_VIV
nxf48410@scmbld2:~/share_home/imx_pi9.0/vendor/nxp-opensource/kernel_imx$ git diff
diff --git a/drivers/mxc/Makefile b/drivers/mxc/Makefile
index afa4216..960e414 100755
--- a/drivers/mxc/Makefile
+++ b/drivers/mxc/Makefile
@@ -3,7 +3,7 @@ obj-$(CONFIG_MXC_SIM) += sim/
obj-$(CONFIG_MXC_VPU) += vpu/
obj-$(CONFIG_MXC_IPU_V3) += ipu3/
obj-$(CONFIG_MXC_HDMI_CEC) += hdmi-cec/
-obj-$(CONFIG_MXC_GPU_VIV) += gpu-viv/
+#obj-$(CONFIG_MXC_GPU_VIV) += gpu-viv/
obj-$(CONFIG_MXC_MIPI_CSI2) += mipi/
obj-$(CONFIG_MXC_HANTRO) += hantro/
obj-$(CONFIG_MXC_HANTRO_845) += hantro_845/
或者:nxf48410@scmbld2:~/share_home/imx_pi9.0/vendor/nxp-opensource/kernel_imx$ vim drivers/mxc/gpu-viv/Kconfig
Kconfig中注销CONFIG_MXC_GPU_VIV
重复二的操作。