Android compilation module (note)

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
insert image description here
, and then directly make the name

make fastboot_test 2>&1 | tee fastboot.log

result:
insert image description here

2.2 Find the module name in Android.mk

insert image description here

LOCAL_PACKAGE_NAME := Cit

In the root directory:

 make Cit 2>&1 

insert image description here

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:
insert image description here

So you still need to go to the module root directory and use mm!
insert image description here

insert image description here

mmm

mmm system/core/fastboot/ 2>&1 | tee fastboot.log

This looks more believable:
insert image description here


Ref: https://blog.csdn.net/letmefish/article/details/53436637

Guess you like

Origin blog.csdn.net/weixin_40557160/article/details/130481613