Merge "Clean up code duplication in build_image.py." am: 514ec3b59a am: 1fd5a857e9 am: 88369ad70d am: d540a6b9fe am: c31d965bfa
Original change: https://android-review.googlesource.com/c/platform/build/+/1835298
Change-Id: I3db289d2bb69f3b68045d1e2e7c693dfbb4813e8
diff --git a/core/version_defaults.mk b/core/version_defaults.mk
index 2b63a3e..e31465b 100644
--- a/core/version_defaults.mk
+++ b/core/version_defaults.mk
@@ -88,7 +88,5 @@
# If there is no $PLATFORM_SECURITY_PATCH set, keep it empty.
PLATFORM_SECURITY_PATCH := 2021-11-05
endif
-.KATI_READONLY := PLATFORM_SECURITY_PATCH
include $(BUILD_SYSTEM)/version_util.mk
-
diff --git a/envsetup.sh b/envsetup.sh
index b5dc847..cf5bb7c 100644
--- a/envsetup.sh
+++ b/envsetup.sh
@@ -723,6 +723,10 @@
set_stuff_for_environment
[[ -n "${ANDROID_QUIET_BUILD:-}" ]] || printconfig
destroy_build_var_cache
+
+ if [[ -n "${CHECK_MU_CONFIG:-}" ]]; then
+ check_mu_config
+ fi
}
unset COMMON_LUNCH_CHOICES_CACHE
diff --git a/target/product/AndroidProducts.mk b/target/product/AndroidProducts.mk
index 7d9d90e..d490e15 100644
--- a/target/product/AndroidProducts.mk
+++ b/target/product/AndroidProducts.mk
@@ -67,6 +67,7 @@
$(LOCAL_DIR)/sdk_phone_armv7.mk \
$(LOCAL_DIR)/sdk_phone_x86_64.mk \
$(LOCAL_DIR)/sdk_phone_x86.mk \
+ $(LOCAL_DIR)/sdk_slim_x86_64.mk \
$(LOCAL_DIR)/sdk_x86_64.mk \
$(LOCAL_DIR)/sdk_x86.mk \
diff --git a/target/product/base_system.mk b/target/product/base_system.mk
index 13b3417..7b6c2c9 100644
--- a/target/product/base_system.mk
+++ b/target/product/base_system.mk
@@ -60,6 +60,7 @@
com.android.media \
com.android.media.swcodec \
com.android.mediaprovider \
+ com.android.nearby \
com.android.os.statsd \
com.android.permission \
com.android.resolv \
@@ -68,6 +69,7 @@
com.android.sdkext \
com.android.tethering \
com.android.tzdata \
+ com.android.uwb \
com.android.wifi \
ContactsProvider \
content \
diff --git a/target/product/default_art_config.mk b/target/product/default_art_config.mk
index 071edbf..049c136 100644
--- a/target/product/default_art_config.mk
+++ b/target/product/default_art_config.mk
@@ -53,6 +53,7 @@
com.android.ipsec:android.net.ipsec.ike \
com.android.media:updatable-media \
com.android.mediaprovider:framework-mediaprovider \
+ com.android.nearby:framework-nearby \
com.android.os.statsd:framework-statsd \
com.android.permission:framework-permission \
com.android.permission:framework-permission-s \
@@ -60,6 +61,7 @@
com.android.sdkext:framework-sdkextensions \
com.android.tethering:framework-connectivity \
com.android.tethering:framework-tethering \
+ com.android.uwb:framework-uwb \
com.android.wifi:framework-wifi
# APEX system server jars. Keep the list sorted by module names and then library names.
diff --git a/target/product/gsi/current.txt b/target/product/gsi/current.txt
index 285c8c7..3057ccd 100644
--- a/target/product/gsi/current.txt
+++ b/target/product/gsi/current.txt
@@ -22,11 +22,13 @@
VNDK-SP: android.hardware.common-V2-ndk_platform.so
VNDK-SP: android.hardware.common.fmq-V1-ndk.so
VNDK-SP: android.hardware.common.fmq-V1-ndk_platform.so
-VNDK-SP: android.hardware.graphics.common-V2-ndk.so
-VNDK-SP: android.hardware.graphics.common-V2-ndk_platform.so
+VNDK-SP: android.hardware.graphics.common-V3-ndk.so
+VNDK-SP: android.hardware.graphics.common-V3-ndk_platform.so
VNDK-SP: android.hardware.graphics.common@1.0.so
VNDK-SP: android.hardware.graphics.common@1.1.so
VNDK-SP: android.hardware.graphics.common@1.2.so
+VNDK-SP: android.hardware.graphics.composer3-V1-ndk.so
+VNDK-SP: android.hardware.graphics.composer3-V1-ndk_platform.so
VNDK-SP: android.hardware.graphics.mapper@2.0.so
VNDK-SP: android.hardware.graphics.mapper@2.1.so
VNDK-SP: android.hardware.graphics.mapper@3.0.so
@@ -119,8 +121,12 @@
VNDK-core: android.hardware.security.secureclock-V1-ndk_platform.so
VNDK-core: android.hardware.security.sharedsecret-V1-ndk.so
VNDK-core: android.hardware.security.sharedsecret-V1-ndk_platform.so
+VNDK-core: android.hardware.soundtrigger3-V1-ndk.so
+VNDK-core: android.hardware.soundtrigger3-V1-ndk_platform.so
VNDK-core: android.hardware.soundtrigger@2.0-core.so
VNDK-core: android.hardware.soundtrigger@2.0.so
+VNDK-core: android.hardware.uwb-V1-ndk.so
+VNDK-core: android.hardware.uwb-V1-ndk_platform.so
VNDK-core: android.hardware.vibrator-V2-ndk.so
VNDK-core: android.hardware.vibrator-V2-ndk_platform.so
VNDK-core: android.hardware.weaver-V1-ndk.so
@@ -129,6 +135,10 @@
VNDK-core: android.hardware.wifi.hostapd-V1-ndk_platform.so
VNDK-core: android.hidl.token@1.0-utils.so
VNDK-core: android.hidl.token@1.0.so
+VNDK-core: android.media.audio.common.types-V1-ndk.so
+VNDK-core: android.media.audio.common.types-V1-ndk_platform.so
+VNDK-core: android.media.soundtrigger.types-V1-ndk.so
+VNDK-core: android.media.soundtrigger.types-V1-ndk_platform.so
VNDK-core: android.system.keystore2-V1-ndk.so
VNDK-core: android.system.keystore2-V1-ndk_platform.so
VNDK-core: android.system.suspend-V1-ndk.so
diff --git a/target/product/iorap_large_memory_config.mk b/target/product/iorap_large_memory_config.mk
deleted file mode 100644
index 0c6c89a..0000000
--- a/target/product/iorap_large_memory_config.mk
+++ /dev/null
@@ -1,14 +0,0 @@
-# Copyright (C) 2020 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.
-#
diff --git a/target/product/sdk_slim_x86_64.mk b/target/product/sdk_slim_x86_64.mk
new file mode 100644
index 0000000..f956859
--- /dev/null
+++ b/target/product/sdk_slim_x86_64.mk
@@ -0,0 +1,78 @@
+#
+# Copyright (C) 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.
+#
+QEMU_USE_SYSTEM_EXT_PARTITIONS := true
+PRODUCT_USE_DYNAMIC_PARTITIONS := true
+
+# This is a build configuration for the 'slim' image targeted
+# for headless automated testing. Compared to the full AOSP 'sdk_phone'
+# image it removes/replaces most product apps, and turns off rendering
+# by default.
+
+#
+# All components inherited here go to system image
+#
+$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk)
+$(call inherit-product, $(SRC_TARGET_DIR)/product/generic_system.mk)
+
+# Enable mainline checking for exact this product name
+ifeq (sdk_slim_x86_64,$(TARGET_PRODUCT))
+PRODUCT_ENFORCE_ARTIFACT_PATH_REQUIREMENTS := relaxed
+endif
+
+#
+# All components inherited here go to system_ext image
+#
+# don't include full handheld_system_Ext which includes SystemUi, Settings etc
+$(call inherit-product, $(SRC_TARGET_DIR)/product/media_system_ext.mk)
+$(call inherit-product, $(SRC_TARGET_DIR)/product/telephony_system_ext.mk)
+
+#
+# All components inherited here go to product image
+#
+# Just include webview, do not include most other apps
+$(call inherit-product, $(SRC_TARGET_DIR)/product/media_product.mk)
+
+# Include FakeSystemApp which replaces core system apps like Settings,
+# Launcher
+PRODUCT_PACKAGES += \
+ FakeSystemApp \
+
+#
+# All components inherited here go to vendor image
+#
+# this must go first - overwrites the goldfish handheld_core_hardware.xml
+$(call inherit-product, device/generic/goldfish/slim/vendor.mk)
+
+$(call inherit-product-if-exists, device/generic/goldfish/x86_64-vendor.mk)
+$(call inherit-product, $(SRC_TARGET_DIR)/product/emulator_vendor.mk)
+$(call inherit-product, $(SRC_TARGET_DIR)/board/emulator_x86_64/device.mk)
+
+# include the overlay that overrides systemui definitions with fakesystemapp
+DEVICE_PACKAGE_OVERLAYS := device/generic/goldfish/slim/overlay
+
+# Define the host tools and libs that are parts of the SDK.
+$(call inherit-product-if-exists, sdk/build/product_sdk.mk)
+$(call inherit-product-if-exists, development/build/product_sdk.mk)
+
+# Overrides
+PRODUCT_BRAND := Android
+PRODUCT_NAME := sdk_slim_x86_64
+PRODUCT_DEVICE := emulator_x86_64
+PRODUCT_MODEL := Android SDK built for x86_64
+# Disable <uses-library> checks for SDK product. It lacks some libraries (e.g.
+# RadioConfigLib), which makes it impossible to translate their module names to
+# library name, so the check fails.
+PRODUCT_BROKEN_VERIFY_USES_LIBRARIES := true