From 7ed1ae3fa4dd23c9c66f729172830ab5224e2dd1 Mon Sep 17 00:00:00 2001 From: Dan Willemsen Date: Mon, 5 Dec 2016 16:47:50 -0800 Subject: [PATCH 1/2] Import/Export LOCAL_PROPRIETARY_MODULE Test: androidmk hardware/broadcom/libbt/Android.mk Test: m -j vulkan.default, inspect out/soong/Android-aosp_flounder.mk Change-Id: I8a9553f772a1d434eb0069c1575e1b0d6db36bc9 --- android/androidmk.go | 3 +++ androidmk/cmd/androidmk/android.go | 1 + 2 files changed, 4 insertions(+) diff --git a/android/androidmk.go b/android/androidmk.go index 8f9f3bcd2..aeb0aa521 100644 --- a/android/androidmk.go +++ b/android/androidmk.go @@ -224,6 +224,9 @@ func translateAndroidMkModule(ctx blueprint.SingletonContext, w io.Writer, mod b if len(amod.commonProperties.Init_rc) > 0 { fmt.Fprintln(w, "LOCAL_INIT_RC := ", strings.Join(amod.commonProperties.Init_rc, " ")) } + if amod.commonProperties.Proprietary { + fmt.Fprintln(w, "LOCAL_PROPRIETARY_MODULE := true") + } } if host { diff --git a/androidmk/cmd/androidmk/android.go b/androidmk/cmd/androidmk/android.go index 5d9f1b41c..72ececbfc 100644 --- a/androidmk/cmd/androidmk/android.go +++ b/androidmk/cmd/androidmk/android.go @@ -78,6 +78,7 @@ var standardProperties = map[string]struct { "LOCAL_PACK_MODULE_RELOCATIONS": {"pack_relocations", bpparser.BoolType}, "LOCAL_TIDY": {"tidy", bpparser.BoolType}, "LOCAL_USE_VNDK": {"use_vndk", bpparser.BoolType}, + "LOCAL_PROPRIETARY_MODULE": {"proprietary", bpparser.BoolType}, "LOCAL_EXPORT_PACKAGE_RESOURCES": {"export_package_resources", bpparser.BoolType}, } From 4353bc4422c13a5737112a3f2e0dfc84fbdac38f Mon Sep 17 00:00:00 2001 From: Dan Willemsen Date: Mon, 5 Dec 2016 17:16:02 -0800 Subject: [PATCH 2/2] Support system/vendor for devices without a vendor partition Test: lunch aosp_arm-eng; m -j vulkan.default Change-Id: I91eabf98f53c455ec4ade95215f11a6f89631747 --- android/config.go | 7 +++++++ android/paths.go | 2 +- android/variable.go | 2 ++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/android/config.go b/android/config.go index 4a59bade8..8f531ccd4 100644 --- a/android/config.go +++ b/android/config.go @@ -443,6 +443,13 @@ func (c *deviceConfig) Arches() []Arch { return arches } +func (c *deviceConfig) VendorPath() string { + if c.config.ProductVariables.VendorPath != nil { + return *c.config.ProductVariables.VendorPath + } + return "vendor" +} + func (c *deviceConfig) VndkVersion() string { if c.config.ProductVariables.DeviceVndkVersion == nil { return "" diff --git a/android/paths.go b/android/paths.go index 1a6125a3e..e76e1fe61 100644 --- a/android/paths.go +++ b/android/paths.go @@ -631,7 +631,7 @@ func PathForModuleInstall(ctx ModuleContext, paths ...string) OutputPath { if ctx.Device() { partition := "system" if ctx.Proprietary() { - partition = "vendor" + partition = ctx.DeviceConfig().VendorPath() } if ctx.InstallInData() { partition = "data" diff --git a/android/variable.go b/android/variable.go index 3436a75e2..1ee6c9bba 100644 --- a/android/variable.go +++ b/android/variable.go @@ -113,6 +113,8 @@ type productVariables struct { UseGoma *bool `json:",omitempty"` Debuggable *bool `json:",omitempty"` + VendorPath *string `json:",omitempty"` + ClangTidy *bool `json:",omitempty"` TidyChecks *string `json:",omitempty"`