1.下载过Android整套源代码的亲应该很熟悉的一个操作就是product编译前的几个步骤,
source build/envsetup.sh
lunch $ComboName
make -j4
2.那么第一步source的envsetup.sh有些什么作用呢?让我们来看一下envsetup.sh中的内容,
其实其就是一些shell脚本方法的集合,方便平台debug的开发者的一些日常工作。如果要
查阅该脚本都提供了哪些方法可以在source之后直接hmm查看帮助:
$ hmm
Invoke ". build/envsetup.sh" from your shell to add the following functions to your environment:
- lunch: lunch <product_name>-<build_variant>
- tapas: tapas [<App1> <App2> ...] [arm|x86|mips|armv5|arm64|x86_64|mips64] [eng|userdebug|user]
- croot: Changes directory to the top of the tree.
- 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 thei

本文介绍了Android源码构建的步骤,包括source build/envsetup.sh,lunch选择构建组合,以及make进行多线程编译。envsetup.sh提供了一系列便利的shell方法,如lunch、make等,而lunch的组合来自device和vendor目录下的vendorsetup.sh文件。make执行时,从Makefile开始构建过程,主要涉及build/core和build/vendor目录的源码编译实现。
最低0.47元/天 解锁文章
3287

被折叠的 条评论
为什么被折叠?



