bp/BoardConfig-product.md

50 lines
1.2 KiB
Markdown
Raw Permalink Normal View History

2020-04-02 04:39:56 +02:00
# Replacing Android.mk
## What devices currently do
Choose HAL variants, pass Make flags to HAL build systems
Add packages
Add prebuilt or config files -> can be moved into packages
Set props
Inherit product files, inherit stuff from build/make/target/product
Set variables that configure HALs, initiate build guards
Use conditionals massively
Add soong namespaces, add soong configs
Add overlays
Add manifest files
Use CleanSpec.mk files for deleted and moved module remnants
Use shell tools invoked from make to manipulate files
AndroidProducts.mk: Add `COMMON_LUNCH_CHOICES` and `PRODUCT_MAKEFILES`,
add lunch targets, set PRODUCT variables
BoardConfig.mk: Set base stuff like target arch, kernel, more non-`PRODUCT` variables
## Issues
Currently, you have three stages: `PRODUCT` variables via `PRODUCT_MAKEFILES`
and `inherit-product` but also `include` chains, generic variables via
`BoardConfig` and `include` chains, module/package-specific via `Android.mk` and
`include` chains.
## Terminology
Product, board, device, sku, soc, customization
`system, vendor, product, system_ext, odm, oem, cust, misc`
`soc_specific, device_specific, system_ext_specific`
## Questions
Use CamelCase, smallCammelCase, under_scores for configs?