[automerge] add oriole and raven to COMMON_LUNCH_CHOICES 2p: 25d0ee4273

Original change: https://googleplex-android-review.googlesource.com/c/device/google/raviole/+/17070128

Bug: 222382030
Change-Id: I71224e03727bd1040fd9d3f03672b524e8676696
diff --git a/Android.mk b/Android.mk
index b8eb4e4..b06dd96 100644
--- a/Android.mk
+++ b/Android.mk
@@ -22,6 +22,23 @@
 
 LOCAL_PATH := $(call my-dir)
 
+$(eval $(call declare-copy-files-license-metadata,device/google/raviole,default-permissions.xml,SPDX-license-identifier-Apache-2.0,notice,build/soong/licenses/LICENSE,))
+$(eval $(call declare-copy-files-license-metadata,device/google/raviole,libnfc-nci-raven.conf,SPDX-license-identifier-Apache-2.0,notice,build/soong/licenses/LICENSE,))
+$(eval $(call declare-copy-files-license-metadata,device/google/raviole,libnfc-nci.conf,SPDX-license-identifier-Apache-2.0,notice,build/soong/licenses/LICENSE,))
+$(eval $(call declare-copy-files-license-metadata,device/google/raviole,fstab.postinstall,SPDX-license-identifier-Apache-2.0,notice,build/soong/licenses/LICENSE,))
+$(eval $(call declare-copy-files-license-metadata,device/google/raviole,ueventd.rc,SPDX-license-identifier-Apache-2.0,notice,build/soong/licenses/LICENSE,))
+$(eval $(call declare-copy-files-license-metadata,device/google/raviole,wpa_supplicant.conf,SPDX-license-identifier-Apache-2.0,notice,build/soong/licenses/LICENSE,))
+$(eval $(call declare-copy-files-license-metadata,device/google/raviole,hals.conf,SPDX-license-identifier-Apache-2.0,notice,build/soong/licenses/LICENSE,))
+$(eval $(call declare-copy-files-license-metadata,device/google/raviole,media_profiles_V1_0.xml,SPDX-license-identifier-Apache-2.0,notice,build/soong/licenses/LICENSE,))
+$(eval $(call declare-copy-files-license-metadata,device/google/raviole,media_codecs_performance.xml,SPDX-license-identifier-Apache-2.0,notice,build/soong/licenses/LICENSE,))
+$(eval $(call declare-copy-files-license-metadata,device/google/raviole,device_state_configuration.xml,SPDX-license-identifier-Apache-2.0,notice,build/soong/licenses/LICENSE,))
+$(eval $(call declare-copy-files-license-metadata,device/google/raviole,task_profiles.json,SPDX-license-identifier-Apache-2.0,notice,build/soong/licenses/LICENSE,))
+$(eval $(call declare-copy-files-license-metadata,device/google/raviole,p2p_supplicant.conf,SPDX-license-identifier-Apache-2.0,notice,build/soong/licenses/LICENSE,))
+$(eval $(call declare-copy-files-license-metadata,device/google/raviole,wpa_supplicant.conf,SPDX-license-identifier-Apache-2.0,notice,build/soong/licenses/LICENSE,))
+$(eval $(call declare-copy-files-license-metadata,device/google/raviole,wpa_supplicant_overlay.conf,SPDX-license-identifier-Apache-2.0,notice,build/soong/licenses/LICENSE,))
+
+$(eval $(call declare-1p-copy-files,device/google/raviole,audio_policy_configuration.xml))
+
 # if some modules are built directly from this directory (not subdirectories),
 # their rules should be written here.
 
diff --git a/AndroidProducts.mk b/AndroidProducts.mk
index 7ffbce9..dea4335 100644
--- a/AndroidProducts.mk
+++ b/AndroidProducts.mk
@@ -16,10 +16,12 @@
 
 PRODUCT_MAKEFILES := \
     $(LOCAL_DIR)/aosp_oriole.mk \
+    $(LOCAL_DIR)/aosp_oriole_hwasan.mk \
     $(LOCAL_DIR)/aosp_oriole_pkvm.mk \
     $(LOCAL_DIR)/aosp_oriole_64.mk \
     $(LOCAL_DIR)/factory_oriole.mk \
     $(LOCAL_DIR)/aosp_raven.mk \
+    $(LOCAL_DIR)/aosp_raven_hwasan.mk \
     $(LOCAL_DIR)/aosp_raven_pkvm.mk \
     $(LOCAL_DIR)/aosp_raven_64.mk \
     $(LOCAL_DIR)/factory_raven.mk \
diff --git a/aosp_oriole_hwasan.mk b/aosp_oriole_hwasan.mk
new file mode 100644
index 0000000..babc6a2
--- /dev/null
+++ b/aosp_oriole_hwasan.mk
@@ -0,0 +1,23 @@
+#
+# Copyright 2021 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+$(call inherit-product, device/google/raviole/aosp_oriole.mk)
+PRODUCT_NAME := aosp_oriole_hwasan
+
+# Add "hwaddress" as a global sanitizer if it's missing.
+ifeq ($(filter hwaddress,$(SANITIZE_TARGET)),)
+  SANITIZE_TARGET := $(strip $(SANITIZE_TARGET) hwaddress)
+endif
diff --git a/aosp_raven_hwasan.mk b/aosp_raven_hwasan.mk
new file mode 100644
index 0000000..5b784a1
--- /dev/null
+++ b/aosp_raven_hwasan.mk
@@ -0,0 +1,23 @@
+#
+# Copyright 2021 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+$(call inherit-product, device/google/raviole/aosp_raven.mk)
+PRODUCT_NAME := aosp_raven_hwasan
+
+# Add "hwaddress" as a global sanitizer if it's missing.
+ifeq ($(filter hwaddress,$(SANITIZE_TARGET)),)
+  SANITIZE_TARGET := $(strip $(SANITIZE_TARGET) hwaddress)
+endif
diff --git a/audio/oriole/audio-tables.mk b/audio/oriole/audio-tables.mk
index 52e4858..79fff6b 100644
--- a/audio/oriole/audio-tables.mk
+++ b/audio/oriole/audio-tables.mk
@@ -37,11 +37,7 @@
 SPK_FIRMWARE_PATH := $(AUDIO_TABLE_FOLDER)/cs35l41/fw
 SPK_FIRMWARE_FULL_PATH := device/google/raviole/audio/$(SPK_FIRMWARE_PATH)
 
-SPK_FIRMWAR_FILES := $(wildcard  $(SPK_FIRMWARE_FULL_PATH)/*)
-
-PRODUCT_COPY_FILES += $(foreach spk_firmware, \
-    $(SPK_FIRMWAR_FILES), \
-    $(spk_firmware):$(TARGET_COPY_OUT_VENDOR)/firmware/$(notdir $(spk_firmware)))
+PRODUCT_COPY_FILES += $(call copy-files,$(wildcard  $(SPK_FIRMWARE_FULL_PATH)/*),$(TARGET_COPY_OUT_VENDOR)/firmware)
 
 # Audio tuning
 PRODUCT_COPY_FILES += \
diff --git a/audio/raven/audio-tables.mk b/audio/raven/audio-tables.mk
index b79674e..905464c 100644
--- a/audio/raven/audio-tables.mk
+++ b/audio/raven/audio-tables.mk
@@ -37,11 +37,7 @@
 SPK_FIRMWARE_PATH := $(AUDIO_TABLE_FOLDER)/cs35l41/fw
 SPK_FIRMWARE_FULL_PATH := device/google/raviole/audio/$(SPK_FIRMWARE_PATH)
 
-SPK_FIRMWAR_FILES := $(wildcard  $(SPK_FIRMWARE_FULL_PATH)/*)
-
-PRODUCT_COPY_FILES += $(foreach spk_firmware, \
-    $(SPK_FIRMWAR_FILES), \
-    $(spk_firmware):$(TARGET_COPY_OUT_VENDOR)/firmware/$(notdir $(spk_firmware)))
+PRODUCT_COPY_FILES += $(call copy-files,$(wildcard  $(SPK_FIRMWARE_FULL_PATH)/*),$(TARGET_COPY_OUT_VENDOR)/firmware)
 
 # Audio tuning
 PRODUCT_COPY_FILES += \
diff --git a/audio/slider/audio-tables.mk b/audio/slider/audio-tables.mk
index 03783c2..21200ce 100644
--- a/audio/slider/audio-tables.mk
+++ b/audio/slider/audio-tables.mk
@@ -36,11 +36,7 @@
 SPK_FIRMWARE_PATH := $(AUDIO_TABLE_FOLDER)/cs35l41/fw
 SPK_FIRMWARE_FULL_PATH := device/google/raviole/audio/$(SPK_FIRMWARE_PATH)
 
-SPK_FIRMWAR_FILES := $(wildcard  $(SPK_FIRMWARE_FULL_PATH)/*)
-
-PRODUCT_COPY_FILES += $(foreach spk_firmware, \
-    $(SPK_FIRMWAR_FILES), \
-    $(spk_firmware):$(TARGET_COPY_OUT_VENDOR)/firmware/$(notdir $(spk_firmware)))
+PRODUCT_COPY_FILES += $(call copy-files,$(wildcard  $(SPK_FIRMWARE_FULL_PATH)/*),$(TARGET_COPY_OUT_VENDOR)/firmware)
 
 # Audio tuning
 PRODUCT_COPY_FILES += \
diff --git a/audio/whitefin/audio-tables.mk b/audio/whitefin/audio-tables.mk
index b299e4b..f87c54b 100644
--- a/audio/whitefin/audio-tables.mk
+++ b/audio/whitefin/audio-tables.mk
@@ -36,11 +36,7 @@
 SPK_FIRMWARE_PATH := $(AUDIO_TABLE_FOLDER)/cs35l41/fw
 SPK_FIRMWARE_FULL_PATH := device/google/raviole/audio/$(SPK_FIRMWARE_PATH)
 
-SPK_FIRMWAR_FILES := $(wildcard  $(SPK_FIRMWARE_FULL_PATH)/*)
-
-PRODUCT_COPY_FILES += $(foreach spk_firmware, \
-    $(SPK_FIRMWAR_FILES), \
-    $(spk_firmware):$(TARGET_COPY_OUT_VENDOR)/firmware/$(notdir $(spk_firmware)))
+PRODUCT_COPY_FILES += $(call copy-files,$(wildcard  $(SPK_FIRMWARE_FULL_PATH)/*),$(TARGET_COPY_OUT_VENDOR)/firmware)
 
 # Audio tuning
 PRODUCT_COPY_FILES += \
diff --git a/device-oriole.mk b/device-oriole.mk
index cee0836..dcee663 100644
--- a/device-oriole.mk
+++ b/device-oriole.mk
@@ -39,8 +39,8 @@
 include device/google/gs101/fingerprint/udfps_factory.mk
 endif
 
-SOONG_CONFIG_lyric_tuning_product := oriole
-SOONG_CONFIG_google3a_config_target_device := oriole
+$(call soong_config_set,lyric,tuning_product,oriole)
+$(call soong_config_set,google3a_config,target_device,oriole)
 
 # Init files
 PRODUCT_COPY_FILES += \
diff --git a/device-raven.mk b/device-raven.mk
index fba7876..1075248 100644
--- a/device-raven.mk
+++ b/device-raven.mk
@@ -45,8 +45,8 @@
 
 include hardware/google/pixel/vibrator/cs40l25/device.mk
 
-SOONG_CONFIG_lyric_tuning_product := raven
-SOONG_CONFIG_google3a_config_target_device := raven
+$(call soong_config_set,lyric,tuning_product,raven)
+$(call soong_config_set,google3a_config,target_device,raven)
 
 PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.support_kernel_idle_timer=true
 PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.enable_frame_rate_override=true
diff --git a/device-slider.mk b/device-slider.mk
index ff298e5..08396e1 100644
--- a/device-slider.mk
+++ b/device-slider.mk
@@ -28,8 +28,8 @@
 include device/google/raviole/audio/slider/audio-tables.mk
 include hardware/google/pixel/vibrator/cs40l25/device.mk
 
-SOONG_CONFIG_lyric_tuning_product := slider
-SOONG_CONFIG_google3a_config_target_device := slider
+$(call soong_config_set,lyric,tuning_product,slider)
+$(call soong_config_set,google3a_config,target_device,slider)
 
 # WirelessCharger
 DEVICE_PRODUCT_COMPATIBILITY_MATRIX_FILE += device/google/gs101/device_framework_matrix_product_wireless.xml
diff --git a/device-whitefin.mk b/device-whitefin.mk
index ce1e4d0..5f80809 100644
--- a/device-whitefin.mk
+++ b/device-whitefin.mk
@@ -28,8 +28,8 @@
 include hardware/google/pixel/vibrator/drv2624/device.mk
 include device/google/raviole/audio/whitefin/audio-tables.mk
 
-SOONG_CONFIG_lyric_tuning_product := slider
-SOONG_CONFIG_google3a_config_target_device := slider
+$(call soong_config_set,lyric,tuning_product,slider)
+$(call soong_config_set,google3a_config,target_device,slider)
 
 # WirelessCharger
 DEVICE_PRODUCT_COMPATIBILITY_MATRIX_FILE += device/google/gs101/device_framework_matrix_product_wireless.xml
diff --git a/self-extractors_oriole/root/proprietary/BoardConfigVendor.mk b/self-extractors_oriole/root/proprietary/BoardConfigVendor.mk
index fa00b92..a632ec4 100644
--- a/self-extractors_oriole/root/proprietary/BoardConfigVendor.mk
+++ b/self-extractors_oriole/root/proprietary/BoardConfigVendor.mk
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-LOCAL_STEM := oriole/BoardConfigPartial.mk
-
--include vendor/google_devices/$(LOCAL_STEM)
+-include vendor/google_devices/oriole/BoardConfigPartial.mk
diff --git a/self-extractors_oriole/root/proprietary/device-vendor.mk b/self-extractors_oriole/root/proprietary/device-vendor.mk
index aa3ae50..30e512a 100644
--- a/self-extractors_oriole/root/proprietary/device-vendor.mk
+++ b/self-extractors_oriole/root/proprietary/device-vendor.mk
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-LOCAL_STEM := oriole/device-partial.mk
-
-$(call inherit-product-if-exists, vendor/google_devices/$(LOCAL_STEM))
+$(call inherit-product-if-exists, vendor/google_devices/oriole/device-partial.mk)
diff --git a/self-extractors_raven/root/proprietary/BoardConfigVendor.mk b/self-extractors_raven/root/proprietary/BoardConfigVendor.mk
index 25a880e..6e788fc 100644
--- a/self-extractors_raven/root/proprietary/BoardConfigVendor.mk
+++ b/self-extractors_raven/root/proprietary/BoardConfigVendor.mk
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-LOCAL_STEM := raven/BoardConfigPartial.mk
-
--include vendor/google_devices/$(LOCAL_STEM)
+-include vendor/google_devices/raven/BoardConfigPartial.mk
diff --git a/self-extractors_raven/root/proprietary/device-vendor.mk b/self-extractors_raven/root/proprietary/device-vendor.mk
index 4877f39..2be1993 100644
--- a/self-extractors_raven/root/proprietary/device-vendor.mk
+++ b/self-extractors_raven/root/proprietary/device-vendor.mk
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-LOCAL_STEM := raven/device-partial.mk
-
-$(call inherit-product-if-exists, vendor/google_devices/$(LOCAL_STEM))
+$(call inherit-product-if-exists, vendor/google_devices/raven/device-partial.mk)