Revise GSI targets to inherit from mainline_system directly
The patch seperates gsi_common.mk to aosp_product.mk and gsi_release.mk. Let GSI targets can be inherit with 3 parts: - system: mainline_system.mk - product: aosp_product.mk - vendor: none or emulator vendor makefiles aosp_product.mk includes the AOSP packages/settings will be in the product partition. GSI targets also includes the gsi_release.mk, which contains the special settings for the GSI for releasing, ex. skip_mount.cfg, extra VNDK, etc. After the patch, the build targets inherit from aosp_$arch.mk will not apply these special settings anymore. The gsi_common.mk, legacy_gsi_common.mk and aosp_$arch_ab.mk will be phased out later. Bug: 135502030 Test: build gsi_arm64-userdebug and aosp_arm64-userdebug, compare Test: root, system and vendor in out folder with/without the patch Change-Id: Ic604ac91ba9a704e6507bac324d19bbf68063464
This commit is contained in:
parent
9392fb3905
commit
df09892cdb
|
@ -23,19 +23,38 @@ PRODUCT_USE_DYNAMIC_PARTITIONS := true
|
|||
# - VNDK enforcement
|
||||
# - compatible property override enabled
|
||||
|
||||
# GSI for system/product
|
||||
$(call inherit-product, $(SRC_TARGET_DIR)/product/gsi_common.mk)
|
||||
#
|
||||
# All components inherited here go to system image
|
||||
#
|
||||
$(call inherit-product, $(SRC_TARGET_DIR)/product/mainline_system.mk)
|
||||
|
||||
# Enable mainline checking for excat this product name
|
||||
ifeq (aosp_arm,$(TARGET_PRODUCT))
|
||||
PRODUCT_ENFORCE_ARTIFACT_PATH_REQUIREMENTS := relaxed
|
||||
endif
|
||||
|
||||
# Emulator for vendor
|
||||
PRODUCT_ARTIFACT_PATH_REQUIREMENT_WHITELIST += \
|
||||
|
||||
#
|
||||
# All components inherited here go to product image
|
||||
#
|
||||
$(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_product.mk)
|
||||
|
||||
#
|
||||
# All components inherited here go to vendor image
|
||||
#
|
||||
$(call inherit-product-if-exists, device/generic/goldfish/arm32-vendor.mk)
|
||||
$(call inherit-product, $(SRC_TARGET_DIR)/product/emulator_vendor.mk)
|
||||
$(call inherit-product, $(SRC_TARGET_DIR)/board/generic_x86/device.mk)
|
||||
|
||||
#
|
||||
# Special settings for GSI releasing
|
||||
#
|
||||
ifeq (aosp_arm,$(TARGET_PRODUCT))
|
||||
$(call inherit-product, $(SRC_TARGET_DIR)/product/gsi_release.mk)
|
||||
endif
|
||||
|
||||
|
||||
PRODUCT_NAME := aosp_arm
|
||||
PRODUCT_DEVICE := generic
|
||||
PRODUCT_BRAND := Android
|
||||
|
|
|
@ -28,14 +28,11 @@ PRODUCT_USE_DYNAMIC_PARTITIONS := true
|
|||
# build quite specifically for the emulator, and might not be
|
||||
# entirely appropriate to inherit from for on-device configurations.
|
||||
|
||||
# GSI for system/product
|
||||
#
|
||||
# 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/gsi_common.mk)
|
||||
|
||||
# Emulator for vendor
|
||||
$(call inherit-product-if-exists, device/generic/goldfish/arm64-vendor.mk)
|
||||
$(call inherit-product, $(SRC_TARGET_DIR)/product/emulator_vendor.mk)
|
||||
$(call inherit-product, $(SRC_TARGET_DIR)/board/generic_arm64/device.mk)
|
||||
$(call inherit-product, $(SRC_TARGET_DIR)/product/mainline_system.mk)
|
||||
|
||||
# Enable mainline checking for excat this product name
|
||||
ifeq (aosp_arm64,$(TARGET_PRODUCT))
|
||||
|
@ -46,6 +43,24 @@ PRODUCT_ARTIFACT_PATH_REQUIREMENT_WHITELIST += \
|
|||
root/init.zygote32_64.rc \
|
||||
root/init.zygote64_32.rc \
|
||||
|
||||
#
|
||||
# All components inherited here go to product image
|
||||
#
|
||||
$(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_product.mk)
|
||||
|
||||
#
|
||||
# All components inherited here go to vendor image
|
||||
#
|
||||
$(call inherit-product-if-exists, device/generic/goldfish/arm64-vendor.mk)
|
||||
$(call inherit-product, $(SRC_TARGET_DIR)/product/emulator_vendor.mk)
|
||||
$(call inherit-product, $(SRC_TARGET_DIR)/board/generic_arm64/device.mk)
|
||||
|
||||
#
|
||||
# Special settings for GSI releasing
|
||||
#
|
||||
ifeq (aosp_arm64,$(TARGET_PRODUCT))
|
||||
$(call inherit-product, $(SRC_TARGET_DIR)/product/gsi_release.mk)
|
||||
|
||||
# Copy different zygote settings for vendor.img to select by setting property
|
||||
# ro.zygote=zygote64_32 or ro.zygote=zygote32_64:
|
||||
# 1. 64-bit primary, 32-bit secondary OR
|
||||
|
@ -53,6 +68,8 @@ PRODUCT_ARTIFACT_PATH_REQUIREMENT_WHITELIST += \
|
|||
# init.zygote64_32.rc is in the core_64_bit.mk below
|
||||
PRODUCT_COPY_FILES += \
|
||||
system/core/rootdir/init.zygote32_64.rc:root/init.zygote32_64.rc
|
||||
endif
|
||||
|
||||
|
||||
PRODUCT_NAME := aosp_arm64
|
||||
PRODUCT_DEVICE := generic_arm64
|
||||
|
|
|
@ -0,0 +1,61 @@
|
|||
#
|
||||
# Copyright (C) 2019 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.
|
||||
#
|
||||
|
||||
# Includes all AOSP product packages
|
||||
$(call inherit-product, $(SRC_TARGET_DIR)/product/handheld_product.mk)
|
||||
$(call inherit-product, $(SRC_TARGET_DIR)/product/telephony_product.mk)
|
||||
|
||||
# Default AOSP sounds
|
||||
$(call inherit-product-if-exists, frameworks/base/data/sounds/AllAudio.mk)
|
||||
|
||||
# TODO(b/133643923): Clean up the mainline whitelist
|
||||
PRODUCT_ARTIFACT_PATH_REQUIREMENT_WHITELIST += \
|
||||
system/app/messaging/messaging.apk \
|
||||
system/app/messaging/oat/% \
|
||||
system/app/WAPPushManager/WAPPushManager.apk \
|
||||
system/app/WAPPushManager/oat/% \
|
||||
system/bin/healthd \
|
||||
system/etc/init/healthd.rc \
|
||||
system/etc/seccomp_policy/crash_dump.%.policy \
|
||||
system/etc/seccomp_policy/mediacodec.policy \
|
||||
system/etc/vintf/manifest/manifest_healthd.xml \
|
||||
system/lib/libframesequence.so \
|
||||
system/lib/libgiftranscode.so \
|
||||
system/lib64/libframesequence.so \
|
||||
system/lib64/libgiftranscode.so \
|
||||
|
||||
|
||||
# Additional settings used in all AOSP builds
|
||||
PRODUCT_PRODUCT_PROPERTIES += \
|
||||
ro.config.ringtone=Ring_Synth_04.ogg \
|
||||
ro.config.notification_sound=pixiedust.ogg \
|
||||
|
||||
# More AOSP packages
|
||||
PRODUCT_PACKAGES += \
|
||||
messaging \
|
||||
PhotoTable \
|
||||
WAPPushManager \
|
||||
WallpaperPicker \
|
||||
|
||||
# Telephony:
|
||||
# Provide a APN configuration to GSI product
|
||||
PRODUCT_COPY_FILES += \
|
||||
device/sample/etc/apns-full-conf.xml:$(TARGET_COPY_OUT_PRODUCT)/etc/apns-conf.xml
|
||||
|
||||
# NFC:
|
||||
# Provide a libnfc-nci.conf to GSI product
|
||||
PRODUCT_COPY_FILES += \
|
||||
device/generic/common/nfc/libnfc-nci.conf:$(TARGET_COPY_OUT_PRODUCT)/etc/libnfc-nci.conf
|
|
@ -23,19 +23,37 @@ PRODUCT_USE_DYNAMIC_PARTITIONS := true
|
|||
# - VNDK enforcement
|
||||
# - compatible property override enabled
|
||||
|
||||
# GSI for system/product
|
||||
$(call inherit-product, $(SRC_TARGET_DIR)/product/gsi_common.mk)
|
||||
|
||||
# Emulator for vendor
|
||||
$(call inherit-product-if-exists, device/generic/goldfish/x86-vendor.mk)
|
||||
$(call inherit-product, $(SRC_TARGET_DIR)/product/emulator_vendor.mk)
|
||||
$(call inherit-product, $(SRC_TARGET_DIR)/board/generic_x86/device.mk)
|
||||
#
|
||||
# All components inherited here go to system image
|
||||
#
|
||||
$(call inherit-product, $(SRC_TARGET_DIR)/product/mainline_system.mk)
|
||||
|
||||
# Enable mainline checking for excat this product name
|
||||
ifeq (aosp_x86,$(TARGET_PRODUCT))
|
||||
PRODUCT_ENFORCE_ARTIFACT_PATH_REQUIREMENTS := relaxed
|
||||
endif
|
||||
|
||||
#
|
||||
# All components inherited here go to product image
|
||||
#
|
||||
$(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_product.mk)
|
||||
|
||||
#
|
||||
# All components inherited here go to vendor image
|
||||
#
|
||||
$(call inherit-product-if-exists, device/generic/goldfish/x86-vendor.mk)
|
||||
$(call inherit-product, $(SRC_TARGET_DIR)/product/emulator_vendor.mk)
|
||||
$(call inherit-product, $(SRC_TARGET_DIR)/board/generic_x86/device.mk)
|
||||
|
||||
|
||||
#
|
||||
# Special settings for GSI releasing
|
||||
#
|
||||
ifeq (aosp_x86,$(TARGET_PRODUCT))
|
||||
$(call inherit-product, $(SRC_TARGET_DIR)/product/gsi_release.mk)
|
||||
endif
|
||||
|
||||
|
||||
PRODUCT_NAME := aosp_x86
|
||||
PRODUCT_DEVICE := generic_x86
|
||||
PRODUCT_BRAND := Android
|
||||
|
|
|
@ -28,14 +28,11 @@ PRODUCT_USE_DYNAMIC_PARTITIONS := true
|
|||
# build quite specifically for the emulator, and might not be
|
||||
# entirely appropriate to inherit from for on-device configurations.
|
||||
|
||||
# GSI for system/product
|
||||
#
|
||||
# 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/gsi_common.mk)
|
||||
|
||||
# Emulator for vendor
|
||||
$(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/generic_x86_64/device.mk)
|
||||
$(call inherit-product, $(SRC_TARGET_DIR)/product/mainline_system.mk)
|
||||
|
||||
# Enable mainline checking for excat this product name
|
||||
ifeq (aosp_x86_64,$(TARGET_PRODUCT))
|
||||
|
@ -46,6 +43,24 @@ PRODUCT_ARTIFACT_PATH_REQUIREMENT_WHITELIST += \
|
|||
root/init.zygote32_64.rc \
|
||||
root/init.zygote64_32.rc \
|
||||
|
||||
#
|
||||
# All components inherited here go to product image
|
||||
#
|
||||
$(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_product.mk)
|
||||
|
||||
#
|
||||
# All components inherited here go to vendor image
|
||||
#
|
||||
$(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/generic_x86_64/device.mk)
|
||||
|
||||
#
|
||||
# Special settings for GSI releasing
|
||||
#
|
||||
ifeq (aosp_x86_64,$(TARGET_PRODUCT))
|
||||
$(call inherit-product, $(SRC_TARGET_DIR)/product/gsi_release.mk)
|
||||
|
||||
# Copy different zygote settings for vendor.img to select by setting property
|
||||
# ro.zygote=zygote64_32 or ro.zygote=zygote32_64:
|
||||
# 1. 64-bit primary, 32-bit secondary OR
|
||||
|
@ -53,6 +68,8 @@ PRODUCT_ARTIFACT_PATH_REQUIREMENT_WHITELIST += \
|
|||
# init.zygote64_32.rc is in the core_64_bit.mk below
|
||||
PRODUCT_COPY_FILES += \
|
||||
system/core/rootdir/init.zygote32_64.rc:root/init.zygote32_64.rc
|
||||
endif
|
||||
|
||||
|
||||
PRODUCT_NAME := aosp_x86_64
|
||||
PRODUCT_DEVICE := generic_x86_64
|
||||
|
|
|
@ -14,15 +14,29 @@
|
|||
# limitations under the License.
|
||||
#
|
||||
|
||||
#
|
||||
# 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/gsi_common.mk)
|
||||
$(call inherit-product, $(SRC_TARGET_DIR)/product/mainline_system.mk)
|
||||
|
||||
# Enable mainline checking
|
||||
PRODUCT_ENFORCE_ARTIFACT_PATH_REQUIREMENTS := relaxed
|
||||
|
||||
PRODUCT_ARTIFACT_PATH_REQUIREMENT_WHITELIST += \
|
||||
root/init.zygote32_64.rc \
|
||||
root/init.zygote64_32.rc \
|
||||
|
||||
#
|
||||
# All components inherited here go to product image
|
||||
#
|
||||
$(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_product.mk)
|
||||
|
||||
#
|
||||
# Special settings for GSI releasing
|
||||
#
|
||||
$(call inherit-product, $(SRC_TARGET_DIR)/product/gsi_release.mk)
|
||||
|
||||
# Copy different zygote settings for vendor.img to select by setting property
|
||||
# ro.zygote=zygote64_32 or ro.zygote=zygote32_64:
|
||||
# 1. 64-bit primary, 32-bit secondary OR
|
||||
|
@ -31,6 +45,7 @@ PRODUCT_ARTIFACT_PATH_REQUIREMENT_WHITELIST += \
|
|||
PRODUCT_COPY_FILES += \
|
||||
system/core/rootdir/init.zygote32_64.rc:root/init.zygote32_64.rc
|
||||
|
||||
|
||||
PRODUCT_NAME := gsi_arm64
|
||||
PRODUCT_DEVICE := gsi_arm64
|
||||
PRODUCT_BRAND := generic
|
||||
|
|
|
@ -0,0 +1,58 @@
|
|||
#
|
||||
# Copyright (C) 2019 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.
|
||||
#
|
||||
|
||||
#
|
||||
# The makefile contains the special settings for GSI releasing.
|
||||
# This makefile is used for the build targets which used for releasing GSI.
|
||||
#
|
||||
# For example:
|
||||
# - Released GSI contains skip_mount.cfg to skip mounting prodcut paritition
|
||||
# - Released GSI contains more VNDK packages to support old version vendors
|
||||
# - etc.
|
||||
#
|
||||
|
||||
# Exclude GSI specific files
|
||||
PRODUCT_ARTIFACT_PATH_REQUIREMENT_WHITELIST += \
|
||||
system/etc/init/config/skip_mount.cfg \
|
||||
system/etc/init/init.gsi.rc \
|
||||
|
||||
# Exclude all files under system/product and system/system_ext
|
||||
PRODUCT_ARTIFACT_PATH_REQUIREMENT_WHITELIST += \
|
||||
system/product/% \
|
||||
system/system_ext/%
|
||||
|
||||
|
||||
# GSI doesn't support apex for now.
|
||||
# Properties set in product take precedence over those in vendor.
|
||||
PRODUCT_PRODUCT_PROPERTIES += \
|
||||
ro.apex.updatable=false
|
||||
|
||||
# Split selinux policy
|
||||
PRODUCT_FULL_TREBLE_OVERRIDE := true
|
||||
|
||||
# Enable dynamic partition size
|
||||
PRODUCT_USE_DYNAMIC_PARTITION_SIZE := true
|
||||
|
||||
# Needed by Pi newly launched device to pass VtsTrebleSysProp on GSI
|
||||
PRODUCT_COMPATIBLE_PROPERTY_OVERRIDE := true
|
||||
|
||||
# GSI specific tasks on boot
|
||||
PRODUCT_COPY_FILES += \
|
||||
build/make/target/product/gsi/skip_mount.cfg:system/etc/init/config/skip_mount.cfg \
|
||||
build/make/target/product/gsi/init.gsi.rc:system/etc/init/init.gsi.rc \
|
||||
|
||||
# Support addtional P VNDK packages
|
||||
PRODUCT_EXTRA_VNDK_VERSIONS := 28
|
Loading…
Reference in New Issue