1. Reorganization
source build/envbuild.sh
lunch xxx
make
2. Compile the module separately
2.1 Find the module name in Android.bp
For example, if I want to compile system/core/fastboot, then I will find
the name of each module in Android.bp/ Android.mk Android.bp in this path
, and then directly make the name
make fastboot_test 2>&1 | tee fastboot.log
result:
2.2 Find the module name in Android.mk
LOCAL_PACKAGE_NAME := Cit
In the root directory:
make Cit 2>&1
2.3 mm/mmm
mmm command
It is used to compile the specified module in the root directory of the source code , and the parameter is the relative path of the module. Can only be used after the first compilation. For example, to compile part of the source code of Phone, you need to execute the following command in the terminal:
mmm packages/apps/phone
mm command
Used to compile this module in the module root directory . Can only be used after the first compilation. For example, to compile part of the source code for Phone, you need to execute the following command in the terminal:
$cd packages/apps/phone
$mm
But this method is not suitable for the above-mentioned modules with only name in Android.bp.
2.4 Examples
mm
If in the root directory:
mm system/core/fastboot/ 2>&1 | tee fastboot.log
This prompt does not know whether the compilation is not executed:
So you still need to go to the module root directory and use mm!
mmm
mmm system/core/fastboot/ 2>&1 | tee fastboot.log
This looks more believable:
Ref: https://blog.csdn.net/letmefish/article/details/53436637