Add [soc|device|product]_specific
Added three properties (soc_specific, device_specific, and
product_specific) that shows what a module is specific to.
`soc_specific: true` means that the module is specific to an SoC
(System-On-a-Chip) and thus need to be installed to vendor partition.
This has the same meaning as the old `vendor: true` setting.
`device_specific: true` means that the module is specific to the entire
hardware configuration of a device includeing the SoC and off-chip
peripherals. These modules are installed to odm partition (or /vendor/odm
when odm partition does not exist).
`product_specific: true` means that the module is specific to the
software configuration of a product such as country, network operator,
etc. These modules are installed to oem partition (or /system/oem when
oem partition does not exist). These modules are assumed to be agnostic
to hardware, so this property can't be true when either soc_specific or
device_specific is set to true.
Bug: 68187740
Test: Build. path_tests amended.
Change-Id: I44ff055d87d53b0d2676758c506060de54cbffa0
diff --git a/android/androidmk.go b/android/androidmk.go
index fb3934f..704b560 100644
--- a/android/androidmk.go
+++ b/android/androidmk.go
@@ -230,9 +230,15 @@
if Bool(amod.commonProperties.Proprietary) {
fmt.Fprintln(&data.preamble, "LOCAL_PROPRIETARY_MODULE := true")
}
- if Bool(amod.commonProperties.Vendor) {
+ if Bool(amod.commonProperties.Vendor) || Bool(amod.commonProperties.Soc_specific) {
fmt.Fprintln(&data.preamble, "LOCAL_VENDOR_MODULE := true")
}
+ if Bool(amod.commonProperties.Device_specific) {
+ fmt.Fprintln(&data.preamble, "LOCAL_ODM_MODULE := true")
+ }
+ if Bool(amod.commonProperties.Product_specific) {
+ fmt.Fprintln(&data.preamble, "LOCAL_OEM_MODULE := true")
+ }
if amod.commonProperties.Owner != nil {
fmt.Fprintln(&data.preamble, "LOCAL_MODULE_OWNER :=", *amod.commonProperties.Owner)
}