Building just one tool from Android source (AOSP)

我们两清 提交于 2019-12-19 04:21:47

问题


Currently I'm using the the AOSP ROM Builder image on Amazon AWS to build Android.
The point is, I'm only interested in the external tool grxmlcompile that is built for the host (linux) in the path: aosp/out/host/linux-x86/bin
where the source is at aosp/external/srec/tools/grxmlcompile

I'm not very familiar with Linux and make files, hence my difficulty to get this going.

I would like to copy the source (if needed the whole tree) and build just this tool on another linux machine.

I can't find the make file I need to run to build just this part.

UPDATE: Looks like make out/host/linux-x86/bin/grxmlcompile would do the job. I would still like to be able to port only the needed parts of the source tree to the build machine


回答1:


cd to the top of your Android build source.

source build/envsetup.sh
cd external/srec/tools/grxmlcompile
mma

...or any directory, or sub-directory a makefile. From AOSP build/envsetup.sh

  • m: Makes from the top of the tree.
  • mm: Builds all of the modules in the current directory, but not their dependencies.
  • mmm: Builds all of the modules in the supplied directories, but not their dependencies. To limit the modules being built use the syntax: mmm dir/:target1,target2.
  • mma: Builds all of the modules in the current directory, and their dependencies.
  • mmma: Builds all of the modules in the supplied directories, and their dependencies.

external/srec was removed from the platform/manifest after android-5.1.1_r4 tag. So later, if you are using a manifest such as revision 5, 6 or later, you may need to do git clone https://android.googlesource/platform/external/srec external/srec to include that directory.



来源:https://stackoverflow.com/questions/30654810/building-just-one-tool-from-android-source-aosp

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!