[AOSP] Android Build System - Build Architecture

정은·2024년 3월 6일
0

posted based on udemy video - Android OS Internals 😁

Android Build System

After envsetup.sh, lunch, m -j16 command, wil see what exactly is happening in the background.

Architecture

Build System - Center

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**)

  • start execution for the main.mk → just execute the set of functions and rules → clean up the build

1) .mk which is basically meant to have the configuration variables.
2) And then we have the definition 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 is Clean Build.

Product, Board, Module - Left

you can see a set of Makefile

Product

  • AndroidProducts.mk, aosp_x86_64.mk are basically to configure your product.

Board

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.

Module

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.

Output - Right

Intermediate outputs : Intermediate Files

Output : .img, sdk

profile
정니의 이런거 저런거 기록 일지 😛

0개의 댓글