关于MT8127中sdk的编译出错问题

简介: 今天在看MTK提供的SDK编译文档,按照步骤做,结果出错了,文档如下:2- Building an SDK for MacOS and Linux--------------------------------------First, setup your development en...

今天在看MTK提供的SDK编译文档,按照步骤做,结果出错了,文档如下:

2- Building an SDK for MacOS and Linux
--------------------------------------

First, setup your development environment and get the Android source code from
git as explained here:

  http://source.android.com/source/download.html

For example for the cupcake branch:

  $ mkdir ~/my-android-git
  $ cd ~/my-android-git
  $ repo init -u https://android.googlesource.com/platform/manifest -b master -g all,-notdefault,tools
  $ repo sync

Then once you have all the source, simply build the SDK using:

  $ cd ~/my-android-git
  $ . build/envsetup.sh
  $ lunch sdk-eng          这个sdk-eng指的是对应的mtk版本
  $ make sdk

This will take a while, maybe between 20 minutes and several hours depending on
your machine. After a while you'll see this in the output:

  Package SDK: out/host/darwin-x86/sdk/android-sdk_eng.<build-id>_mac-x86.zip

Some options:

- Depending on your machine you can tell 'make' to build more things in
  parallel, e.g. if you have a dual core, use "make -j4 sdk" to build faster.

- You can define "BUILD_NUMBER" to control the build identifier that gets
  incorporated in the resulting archive. The default is to use your username.
  One suggestion is to include the date, e.g.:

  $ export BUILD_NUMBER=${USER}-`date +%Y%m%d-%H%M%S`

  There are certain characters you should avoid in the build number, typically
  everything that might confuse 'make' or your shell. So for example avoid
  punctuation and characters like $ & : / \ < > , and .
我直接按照上面的命令敲,结果发现出错,后来才知道,这里是sdk指的是对应的某某工程的名字,我这个工程名为

em_t8370_emmc,所以我的sdk名字就是em_t8370_emmc,看来文档有时会让人产生误解的啊,还好是老一辈的总工告诉了我,不然我还蒙在谷里呢!!今天总算知道了,呵呵呵。

然后,说说我遇到的问题和如何解决的方法吧:

1、按照源码中sdk目录下的howto_build_SDK.txt参考文档的编译方式
  $ cd ~/my-android-git
  $ . build/envsetup.sh
  $ lunch sdk-eng         
  $ make sdk
 结果,产生错误log信息如下:
 device/mediatek/build/build/libs/custom.mk:159: PWD = /mnt/sdb1/yangyx/MT8127_M0_MP8_0407
 device/mediatek/build/build/libs/custom.mk:160: *** Can not find ProjectConfig.mk , MTK_PROJECT_CONFIGS = .  Stop.

#### make failed to build some targets (48 seconds) ####
 
 
2、根据一些参考资料,我解决以上相关问题采用以下步骤:
	source build/envsetup
	lunch em_t8370_emmc-user
	source build/envsetup    #需要重新source一次,我也不知道为什么,如果不重新再执行这句话,编译还是会产生像上面一样的问题。
	make sdk
	结果,产生的错误log信息如下:
	Package SDK: out/host/linux-x86/sdk/em_t8370_emmc/android-sdk_1476082019_linux-x86.zip
	SDK: warning: including GNU target out/target/product/em_t8370_emmc/system/lib/libexif.so
	SDK: warning: including GNU target out/target/product/em_t8370_emmc/system/lib/libext2_blkid.so
	SDK: warning: including GNU target out/target/product/em_t8370_emmc/system/lib/libext2_com_err.so
	SDK: warning: including GNU target out/target/product/em_t8370_emmc/system/lib/libext2_e2p.so
	SDK: warning: including GNU target out/target/product/em_t8370_emmc/system/lib/libext2_profile.so
	SDK: warning: including GNU target out/target/product/em_t8370_emmc/system/lib/libext2_quota.so
	SDK: warning: including GNU target out/target/product/em_t8370_emmc/system/lib/libext2_uuid.so
	SDK: warning: including GNU target out/target/product/em_t8370_emmc/system/lib/libext2fs.so
	SDK: warning: including GNU target out/target/product/em_t8370_emmc/system/lib/libiprouteutil.so
	SDK: warning: including GNU target out/target/product/em_t8370_emmc/system/lib/libnetlink.so
	SDK: warning: including GNU target out/target/product/em_t8370_emmc/system/lib/libnl.so
	development/build/sdk.atree:49: couldn't locate source file: bin/etc1tool
	development/build/sdk.atree:88: couldn't locate source file: bin/split-select
	development/build/sdk.atree:93: couldn't locate source file: bin/bcc_compat
	development/build/sdk.atree:186: couldn't locate source file: framework/layoutlib.jar
	development/build/sdk.atree:525: couldn't locate source file: framework/layoutlib-tests.jar
	development/build/sdk.atree:526: couldn't locate source file: system/app/EmulatorSmokeTests/EmulatorSmokeTests.apk
	make: *** [out/host/linux-x86/sdk/em_t8370_emmc/android-sdk_1476082019_linux-x86.zip] Error 44

3、注释以上sdk.atress 49 88 93 186 525 526 相关的脚本 
   编译成功,在相关目录下生成以下的文件:
   Package SDK: out/host/darwin-x86/sdk/android-sdk_eng.<build-id>_mac-x86.zip
   生成的android.jar是最新的:
   /out/host/linux-x86/sdk/em_t8370_emmc/android-sdk_1476083189_linux-x86/platforms/android-6.0/android.jar



目录
相关文章
|
开发工具 Android开发
【错误记录】Android Studio 编译报错 ( SDK location not found )
【错误记录】Android Studio 编译报错 ( SDK location not found )
2213 0
【错误记录】Android Studio 编译报错 ( SDK location not found )
|
开发工具
编译SDK出现aclocal-1.15: command not found错误
编译SDK出现aclocal-1.15: command not found错误
782 0
|
21天前
|
开发工具
使用FFmpeg4.3.1的SDK官方开发包编译ffmpeg.c(二)
使用FFmpeg4.3.1的SDK官方开发包编译ffmpeg.c(二)
12 0
|
7月前
|
编解码 Linux 开发工具
瑞芯微RV1109 SDK编译&支持QT程序开发
瑞芯微RV1109 SDK编译&支持QT程序开发
527 0
|
存储 Ubuntu Linux
linphone android sdk 源码下载编译
linphone android sdk 源码下载编译
825 0
linphone android sdk 源码下载编译
|
XML 存储 Ubuntu
RK3568开发笔记(五):在虚拟机上使用SDK编译制作uboot、kernel和ubuntu镜像
buildroot虽然灵活,但是基于实际情况,本身是侧重驱动和应用定制开发的只定制一次文件系统投入有点多,还不如直接ubunt自己交叉编译依赖库,做一些库的移植裁剪。   于是本篇就使用ubuntu系统了,至于其他库自己下源码在宿主机交叉编译号后,再拷贝过去或者直接在板子上编译也行(只是会比较慢),但是意义不大,因为开发过程肯定是用宿主机,不然核心板编译太慢,在编译上会花费不少可以省去的时间。
RK3568开发笔记(五):在虚拟机上使用SDK编译制作uboot、kernel和ubuntu镜像
|
存储 XML Ubuntu
RK3568开发笔记(四):在虚拟机上使用SDK编译制作uboot、kernel和buildroot镜像
上一篇搭建好了ubuntu宿主机开发环境,本篇的目标系统主要是开发linux+qt,所以需要刷上billdroot+Qt创建的系统,为了更好的熟悉原理和整个开发过程,选择从零开始搭建rk3568的sdk开发环境。
RK3568开发笔记(四):在虚拟机上使用SDK编译制作uboot、kernel和buildroot镜像
|
开发工具 Android开发 C++
短视频SDK的编译设计与实现系列(一)——CMake基础入门
一、背景介绍 在开写之前,简单介绍一下我要写这篇文章的背景及出发的方向。我们团队主要是做端上的多媒体开发,而这里面有大量的代码都是用c++来写的,由于历史原因,原先的工程结构其交叉编译配置比较复杂,另外加上团队很多同学之前都是做端上业务开发的,本身对于c/c++的交叉编译不是特别熟悉,因此萌生了从实用角度梳理一篇能够帮大家快速扫盲的Cmake基础教程的想法,同时也是对我自己的一次学习总结。 既
4133 0
|
Java 开发工具 Android开发

热门文章

最新文章