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
This commit is contained in:
@@ -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)
|
||||
|
@@ -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 {
|
||||
|
@@ -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
|
||||
|
@@ -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"
|
||||
}
|
||||
|
@@ -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,
|
||||
|
@@ -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"`
|
||||
|
@@ -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",
|
||||
|
||||
|
Reference in New Issue
Block a user