From 24a8a69dba1a880066556108af4d78d358687d9f Mon Sep 17 00:00:00 2001 From: Arvind Kumar Date: Mon, 11 Oct 2021 22:46:31 +0530 Subject: lights: Add soong configs for lights aidl To resolve compilation issue for legacy targets where lights aidl is not required, adding soong module and configs for lights aidl to remove shared libs dependency for legacy target and adding shared libs dependency only for target defined in soong_config_variables. Change-Id: I3d42ebe9cee37804ec684e9c189c13df2e7cd3d1 --- base.mk | 12 ++++++++++++ lights/Android.bp | 42 +++++++++++++++++++++++++++++++++++++++++- 2 files changed, 53 insertions(+), 1 deletion(-) diff --git a/base.mk b/base.mk index e8f1e8d..18c5e45 100644 --- a/base.mk +++ b/base.mk @@ -606,6 +606,18 @@ LIBPOWER += android.hardware.power@1.0-impl LIBPOWER += android.hardware.power@1.0-service endif +ifeq ($(PLATFORM_VERSION), $(filter $(PLATFORM_VERSION),R 11)) + SOONG_CONFIG_NAMESPACES += lights + SOONG_CONFIG_lights += lighttargets + SOONG_CONFIG_lights_lighttargets := lightaidltarget +endif + +ifeq ($(PLATFORM_VERSION), $(filter $(PLATFORM_VERSION),S 12)) + SOONG_CONFIG_NAMESPACES += lights + SOONG_CONFIG_lights += lighttargets + SOONG_CONFIG_lights_lighttargets := lightaidlV1target +endif + #LLVM for RenderScript #use qcom LLVM $(call inherit-product-if-exists, external/llvm/llvm-select.mk) diff --git a/lights/Android.bp b/lights/Android.bp index cd4c44e..523285a 100644 --- a/lights/Android.bp +++ b/lights/Android.bp @@ -1,5 +1,46 @@ +// This introduces the module type lights_cc_defaults +// If target.mk file contained: +// +// SOONG_CONFIG_NAMESPACES += lights +// SOONG_CONFIG_lights += lighttargets +// SOONG_CONFIG_lights_lighttargets := lightaidltarget +// +// Then ligets lib would build with shared_libs + +soong_config_module_type { + name: "lights_cc_defaults", + module_type: "cc_defaults", + config_namespace: "lights", + variables: ["lighttargets"], + properties: ["shared_libs"], +} + +soong_config_string_variable { + name: "lighttargets", + values: ["lightaidltarget", "lightaidlV1target"], +} + +lights_cc_defaults { + name: "lights_defaults", + soong_config_variables: { + lighttargets: { + lightaidltarget: { + shared_libs: [ + "android.hardware.light-ndk_platform", + ], + }, + lightaidlV1target: { + shared_libs: [ + "android.hardware.light-V1-ndk_platform", + ], + }, + }, + }, +} + cc_binary { name: "android.hardware.lights-service.qti", + defaults: ["lights_defaults"], relative_install_path: "hw", init_rc: ["android.hardware.lights-qti.rc"], vintf_fragments: ["android.hardware.lights-qti.xml"], @@ -9,7 +50,6 @@ cc_binary { "liblog", "libhardware", "libbinder_ndk", - "android.hardware.light-ndk_platform", ], srcs: [ "Lights.cpp", -- cgit v1.2.3 From 70baed35e1b4866916cbe8cc9f1800cd8bc668c7 Mon Sep 17 00:00:00 2001 From: Himanshu Agrawal Date: Mon, 16 Aug 2021 14:55:52 +0530 Subject: Optimize merge_target_files process to re-use images(2/2). Pick the images directly from the split target-files zips into the merged target-files instead of re-generating them again from blobs, to save time for non dynamic partiton builds as well. Change-Id: Id09e2f2332f73e9a21412160749affcc7e2f770f --- .../without_dynamic_partition/ab/merge_config_system_item_list | 1 + .../without_dynamic_partition/non_ab/merge_config_system_item_list | 2 ++ 2 files changed, 3 insertions(+) diff --git a/ota_merge_configs/without_dynamic_partition/ab/merge_config_system_item_list b/ota_merge_configs/without_dynamic_partition/ab/merge_config_system_item_list index 203b2e8..f898258 100644 --- a/ota_merge_configs/without_dynamic_partition/ab/merge_config_system_item_list +++ b/ota_merge_configs/without_dynamic_partition/ab/merge_config_system_item_list @@ -1,3 +1,4 @@ +IMAGES/system.img META/apexkeys.txt META/apkcerts.txt META/filesystem_config.txt diff --git a/ota_merge_configs/without_dynamic_partition/non_ab/merge_config_system_item_list b/ota_merge_configs/without_dynamic_partition/non_ab/merge_config_system_item_list index 203b2e8..9f921ec 100644 --- a/ota_merge_configs/without_dynamic_partition/non_ab/merge_config_system_item_list +++ b/ota_merge_configs/without_dynamic_partition/non_ab/merge_config_system_item_list @@ -1,3 +1,5 @@ +IMAGES/system.img +IMAGES/system.map META/apexkeys.txt META/apkcerts.txt META/filesystem_config.txt -- cgit v1.2.3