diff options
author | Jaekyun Seok <jaekyun@google.com> | 2018-01-10 19:00:15 +0900 |
---|---|---|
committer | Jaekyun Seok <jaekyun@google.com> | 2018-01-25 07:50:35 +0900 |
commit | 5cfbfbb67afb772e29c285e72e385c18a16a23ec (patch) | |
tree | 1f845afbdb9604cf3c362b918c20e2b2609063b4 | |
parent | fdc2b3bebef0b7a270842d53b46577046bb14e44 (diff) | |
download | build_soong-5cfbfbb67afb772e29c285e72e385c18a16a23ec.tar.gz build_soong-5cfbfbb67afb772e29c285e72e385c18a16a23ec.tar.bz2 build_soong-5cfbfbb67afb772e29c285e72e385c18a16a23ec.zip |
Use product instead of oem for Product specific module
Bug: 64195575
Test: succeeded building product.img with BOARD_PRODUCTIMAGE_PARTITION_SIZE,
BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE and PRODUCT_PRODUCT_VERITY_PARTITION.
Change-Id: Icc4f8c16bc389fe20db680849f311d02df1299c3
-rw-r--r-- | android/androidmk.go | 2 | ||||
-rw-r--r-- | android/config.go | 8 | ||||
-rw-r--r-- | android/module.go | 4 | ||||
-rw-r--r-- | android/paths.go | 2 | ||||
-rw-r--r-- | android/paths_test.go | 12 | ||||
-rw-r--r-- | android/variable.go | 6 | ||||
-rw-r--r-- | androidmk/cmd/androidmk/android.go | 2 |
7 files changed, 18 insertions, 18 deletions
diff --git a/android/androidmk.go b/android/androidmk.go index 704b5605..0ea75643 100644 --- a/android/androidmk.go +++ b/android/androidmk.go @@ -237,7 +237,7 @@ func translateAndroidMkModule(ctx SingletonContext, w io.Writer, mod blueprint.M fmt.Fprintln(&data.preamble, "LOCAL_ODM_MODULE := true") } if Bool(amod.commonProperties.Product_specific) { - fmt.Fprintln(&data.preamble, "LOCAL_OEM_MODULE := true") + fmt.Fprintln(&data.preamble, "LOCAL_PRODUCT_MODULE := true") } if amod.commonProperties.Owner != nil { fmt.Fprintln(&data.preamble, "LOCAL_MODULE_OWNER :=", *amod.commonProperties.Owner) diff --git a/android/config.go b/android/config.go index 2ce7f486..b5ec9758 100644 --- a/android/config.go +++ b/android/config.go @@ -676,11 +676,11 @@ func (c *deviceConfig) OdmPath() string { return "odm" } -func (c *deviceConfig) OemPath() string { - if c.config.ProductVariables.OemPath != nil { - return *c.config.ProductVariables.OemPath +func (c *deviceConfig) ProductPath() string { + if c.config.ProductVariables.ProductPath != nil { + return *c.config.ProductVariables.ProductPath } - return "oem" + return "product" } func (c *deviceConfig) BtConfigIncludeDir() string { diff --git a/android/module.go b/android/module.go index 0fb94796..14b9f41b 100644 --- a/android/module.go +++ b/android/module.go @@ -232,8 +232,8 @@ type commonProperties struct { Device_specific *bool // whether this module is specific to a software configuration of a product (e.g. country, - // network operator, etc). When set to true, it is installed into /oem (or /system/oem if - // oem partition does not exist). + // network operator, etc). When set to true, it is installed into /product (or + // /system/product if product partition does not exist). Product_specific *bool // init.rc files to be installed if this module is installed diff --git a/android/paths.go b/android/paths.go index 4d9c8586..e941e964 100644 --- a/android/paths.go +++ b/android/paths.go @@ -850,7 +850,7 @@ func PathForModuleInstall(ctx ModuleInstallPathContext, pathComponents ...string } else if ctx.DeviceSpecific() { partition = ctx.DeviceConfig().OdmPath() } else if ctx.ProductSpecific() { - partition = ctx.DeviceConfig().OemPath() + partition = ctx.DeviceConfig().ProductPath() } else { partition = "system" } diff --git a/android/paths_test.go b/android/paths_test.go index 110974f9..61a172fa 100644 --- a/android/paths_test.go +++ b/android/paths_test.go @@ -264,7 +264,7 @@ func TestPathForModuleInstall(t *testing.T) { out: "target/product/test_device/odm/bin/my_test", }, { - name: "oem binary", + name: "product binary", ctx: &moduleInstallPathContextImpl{ androidBaseContextImpl: androidBaseContextImpl{ target: deviceTarget, @@ -272,7 +272,7 @@ func TestPathForModuleInstall(t *testing.T) { }, }, in: []string{"bin", "my_test"}, - out: "target/product/test_device/oem/bin/my_test", + out: "target/product/test_device/product/bin/my_test", }, { @@ -311,7 +311,7 @@ func TestPathForModuleInstall(t *testing.T) { out: "target/product/test_device/data/nativetest/my_test", }, { - name: "oem native test binary", + name: "product native test binary", ctx: &moduleInstallPathContextImpl{ androidBaseContextImpl: androidBaseContextImpl{ target: deviceTarget, @@ -359,7 +359,7 @@ func TestPathForModuleInstall(t *testing.T) { out: "target/product/test_device/data/asan/odm/bin/my_test", }, { - name: "sanitized oem binary", + name: "sanitized product binary", ctx: &moduleInstallPathContextImpl{ androidBaseContextImpl: androidBaseContextImpl{ target: deviceTarget, @@ -368,7 +368,7 @@ func TestPathForModuleInstall(t *testing.T) { inSanitizerDir: true, }, in: []string{"bin", "my_test"}, - out: "target/product/test_device/data/asan/oem/bin/my_test", + out: "target/product/test_device/data/asan/product/bin/my_test", }, { @@ -410,7 +410,7 @@ func TestPathForModuleInstall(t *testing.T) { out: "target/product/test_device/data/asan/data/nativetest/my_test", }, { - name: "sanitized oem native test binary", + name: "sanitized product native test binary", ctx: &moduleInstallPathContextImpl{ androidBaseContextImpl: androidBaseContextImpl{ target: deviceTarget, diff --git a/android/variable.go b/android/variable.go index 40fa45e4..2c2a0cfe 100644 --- a/android/variable.go +++ b/android/variable.go @@ -174,9 +174,9 @@ type productVariables struct { CFIExcludePaths *[]string `json:",omitempty"` CFIIncludePaths *[]string `json:",omitempty"` - VendorPath *string `json:",omitempty"` - OdmPath *string `json:",omitempty"` - OemPath *string `json:",omitempty"` + VendorPath *string `json:",omitempty"` + OdmPath *string `json:",omitempty"` + ProductPath *string `json:",omitempty"` ClangTidy *bool `json:",omitempty"` TidyChecks *string `json:",omitempty"` diff --git a/androidmk/cmd/androidmk/android.go b/androidmk/cmd/androidmk/android.go index 123f4a9d..960f103c 100644 --- a/androidmk/cmd/androidmk/android.go +++ b/androidmk/cmd/androidmk/android.go @@ -158,7 +158,7 @@ func init() { "LOCAL_PROPRIETARY_MODULE": "proprietary", "LOCAL_VENDOR_MODULE": "vendor", "LOCAL_ODM_MODULE": "device_specific", - "LOCAL_OEM_MODULE": "product_specific", + "LOCAL_PRODUCT_MODULE": "product_specific", "LOCAL_EXPORT_PACKAGE_RESOURCES": "export_package_resources", "LOCAL_PRIVILEGED_MODULE": "privileged", |