posted based on udemy video - Android OS Internals 😁
After
envsetup.sh
,lunch
,m -j16
command, wil see what exactly is happening in the background.
The build system starts by loading a set of build configuration.
that is done through the setup process and the launch commands. (Android.bp
)
Build System
1. load a set of configuration
2. start with the main.mk
file in the build core folder (**build/make/core/main.mk**
)
1) .mk which is basically meant to have the
configuration variables
.
2) And then we have thedefinition
stored in .mk, which has the set of function definitions which is used across the build.
3) And the third one is Makefile, which is actually responsible for building the images.
4) And then we have the clean tools that isClean Build
.
you can see a set of Makefile
AndroidProducts.mk
, aosp_x86_64.mk
are basically to configure your product.In case if you are developing a new board and the board product description, A product and the board configuration will go here in the board config.mk and the product descriptions will go into AndoridProducts.mk.
if you have some modules in it, like if you have some apps, some modules which is related to this board, then that comes under this park (CleanSpec.mk
)
So the Andorid products should have an entry for your new product and the board config will contain the hardware related configuration.
And then, the module build rules is nothing but the rules about how the module has to be built.
Intermediate outputs : Intermediate Files
Output : .img
, sdk