From caa5e88d4ac34215222c2a4f7bafbdba714bb7f7 Mon Sep 17 00:00:00 2001 From: SzuWei Lin Date: Wed, 9 Jan 2019 17:08:25 +0800 Subject: [PATCH] Split *_product makefiles So far, we have *_system.mk and *_vendor.mk. This patch split all product settings from *_vendor.mk to new *_product.mk This patch also create a new telephony.mk to include all telephony_*.mk Bug: 119747870 Test: lunch mainline_arm64-user; make -j Test: compare the content with and without the patch Test: the output files in out folder are the same Change-Id: I79aefdd1971b3b5724a3ec858de4109b645c765a Merged-In: I79aefdd1971b3b5724a3ec858de4109b645c765a --- target/product/base.mk | 1 + target/product/base_product.mk | 19 ++++++++++++ target/product/base_vendor.mk | 4 --- target/product/core_minimal.mk | 5 +-- target/product/full_base_telephony.mk | 3 +- target/product/generic.mk | 3 +- target/product/generic_no_telephony.mk | 1 + target/product/handheld_product.mk | 43 ++++++++++++++++++++++++++ target/product/handheld_vendor.mk | 22 ------------- target/product/mainline.mk | 2 ++ target/product/mainline_arm64.mk | 4 +++ target/product/media_product.mk | 25 +++++++++++++++ target/product/media_vendor.mk | 4 --- target/product/telephony.mk | 20 ++++++++++++ target/product/telephony_product.mk | 23 ++++++++++++++ target/product/telephony_vendor.mk | 5 --- target/product/treble_common.mk | 3 +- 17 files changed, 144 insertions(+), 43 deletions(-) create mode 100644 target/product/base_product.mk create mode 100644 target/product/handheld_product.mk create mode 100644 target/product/media_product.mk create mode 100644 target/product/telephony.mk create mode 100644 target/product/telephony_product.mk diff --git a/target/product/base.mk b/target/product/base.mk index 1ecbf4a011..804a2ee6ba 100644 --- a/target/product/base.mk +++ b/target/product/base.mk @@ -18,3 +18,4 @@ # up by partition. $(call inherit-product, $(SRC_TARGET_DIR)/product/base_system.mk) $(call inherit-product, $(SRC_TARGET_DIR)/product/base_vendor.mk) +$(call inherit-product, $(SRC_TARGET_DIR)/product/base_product.mk) diff --git a/target/product/base_product.mk b/target/product/base_product.mk new file mode 100644 index 0000000000..6531304688 --- /dev/null +++ b/target/product/base_product.mk @@ -0,0 +1,19 @@ +# +# 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. +# + +# Base modules and settings for the product partition. +PRODUCT_PACKAGES += \ + healthd \ diff --git a/target/product/base_vendor.mk b/target/product/base_vendor.mk index 1bb4beede6..9bb45d158f 100644 --- a/target/product/base_vendor.mk +++ b/target/product/base_vendor.mk @@ -53,10 +53,6 @@ PRODUCT_PACKAGES += \ vndservice \ vndservicemanager \ -# Base modules and settings for the product partition. -PRODUCT_PACKAGES += \ - healthd \ - # VINTF data for vendor image PRODUCT_PACKAGES += \ device_manifest.xml \ diff --git a/target/product/core_minimal.mk b/target/product/core_minimal.mk index b432a91f1b..9718dc6bfe 100644 --- a/target/product/core_minimal.mk +++ b/target/product/core_minimal.mk @@ -18,11 +18,12 @@ # means most android products, but excludes wearables. # # Note: Do not add any contents directly to this file. Choose either -# media_system or media_vendor depending on partition (also consider -# base_.mk or handheld_.mk. +# media_ depending on partition also consider base_.mk or +# handheld_.mk. $(call inherit-product, $(SRC_TARGET_DIR)/product/media_system.mk) $(call inherit-product, $(SRC_TARGET_DIR)/product/media_vendor.mk) +$(call inherit-product, $(SRC_TARGET_DIR)/product/media_product.mk) PRODUCT_BRAND := generic PRODUCT_DEVICE := generic diff --git a/target/product/full_base_telephony.mk b/target/product/full_base_telephony.mk index ee590903e4..af4097d87a 100644 --- a/target/product/full_base_telephony.mk +++ b/target/product/full_base_telephony.mk @@ -28,5 +28,4 @@ PRODUCT_COPY_FILES := \ frameworks/native/data/etc/handheld_core_hardware.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/handheld_core_hardware.xml $(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_base.mk) -$(call inherit-product, $(SRC_TARGET_DIR)/product/telephony_system.mk) -$(call inherit-product, $(SRC_TARGET_DIR)/product/telephony_vendor.mk) +$(call inherit-product, $(SRC_TARGET_DIR)/product/telephony.mk) diff --git a/target/product/generic.mk b/target/product/generic.mk index 7a9732d093..cc856f4f73 100644 --- a/target/product/generic.mk +++ b/target/product/generic.mk @@ -18,8 +18,7 @@ # It includes the base Android platform. $(call inherit-product, $(SRC_TARGET_DIR)/product/generic_no_telephony.mk) -$(call inherit-product, $(SRC_TARGET_DIR)/product/telephony_system.mk) -$(call inherit-product, $(SRC_TARGET_DIR)/product/telephony_vendor.mk) +$(call inherit-product, $(SRC_TARGET_DIR)/product/telephony.mk) # Overrides PRODUCT_BRAND := generic diff --git a/target/product/generic_no_telephony.mk b/target/product/generic_no_telephony.mk index 5346476211..324d36f105 100644 --- a/target/product/generic_no_telephony.mk +++ b/target/product/generic_no_telephony.mk @@ -22,6 +22,7 @@ $(call inherit-product, $(SRC_TARGET_DIR)/product/handheld_system.mk) $(call inherit-product, $(SRC_TARGET_DIR)/product/handheld_vendor.mk) +$(call inherit-product, $(SRC_TARGET_DIR)/product/handheld_product.mk) PRODUCT_BRAND := generic PRODUCT_DEVICE := generic diff --git a/target/product/handheld_product.mk b/target/product/handheld_product.mk new file mode 100644 index 0000000000..063b951d9c --- /dev/null +++ b/target/product/handheld_product.mk @@ -0,0 +1,43 @@ +# +# 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. +# + +# This makefile contains the product partition contents for +# a generic phone or tablet device. Only add something here if +# it definitely doesn't belong on other types of devices (if it +# does, use base_vendor.mk). +$(call inherit-product, $(SRC_TARGET_DIR)/product/media_product.mk) + +# /product packages +PRODUCT_PACKAGES += \ + Browser2 \ + Calendar \ + Camera2 \ + Contacts \ + DeskClock \ + Email \ + Gallery2 \ + LatinIME \ + Launcher3QuickStep \ + Music \ + OneTimeInitializer \ + PrintRecommendationService \ + Provision \ + QuickSearchBox \ + Settings \ + SettingsIntelligence \ + StorageManager \ + SystemUI \ + WallpaperCropper \ diff --git a/target/product/handheld_vendor.mk b/target/product/handheld_vendor.mk index b9970e9dd5..ca7760a0fe 100644 --- a/target/product/handheld_vendor.mk +++ b/target/product/handheld_vendor.mk @@ -30,25 +30,3 @@ PRODUCT_PACKAGES += \ power.default \ SysuiDarkThemeOverlay \ vibrator.default \ - -# /product packages -PRODUCT_PACKAGES += \ - Browser2 \ - Calendar \ - Camera2 \ - Contacts \ - DeskClock \ - Email \ - Gallery2 \ - LatinIME \ - Launcher3QuickStep \ - Music \ - OneTimeInitializer \ - PrintRecommendationService \ - Provision \ - QuickSearchBox \ - Settings \ - SettingsIntelligence \ - StorageManager \ - SystemUI \ - WallpaperCropper \ diff --git a/target/product/mainline.mk b/target/product/mainline.mk index 44dcd6083b..59bad9838d 100644 --- a/target/product/mainline.mk +++ b/target/product/mainline.mk @@ -18,4 +18,6 @@ # for the other partitions. $(call inherit-product, $(SRC_TARGET_DIR)/product/mainline_system.mk) $(call inherit-product, $(SRC_TARGET_DIR)/product/handheld_vendor.mk) +$(call inherit-product, $(SRC_TARGET_DIR)/product/handheld_product.mk) $(call inherit-product, $(SRC_TARGET_DIR)/product/telephony_vendor.mk) +$(call inherit-product, $(SRC_TARGET_DIR)/product/telephony_product.mk) diff --git a/target/product/mainline_arm64.mk b/target/product/mainline_arm64.mk index 6122ac1d9f..73748f2584 100644 --- a/target/product/mainline_arm64.mk +++ b/target/product/mainline_arm64.mk @@ -37,6 +37,8 @@ PRODUCT_ARTIFACT_PATH_REQUIREMENT_WHITELIST += \ system/app/Calendar/Calendar.apk \ system/app/Camera2/Camera2.apk \ system/app/DeskClock/DeskClock.apk \ + system/app/DeskClock/oat/arm64/DeskClock.odex \ + system/app/DeskClock/oat/arm64/DeskClock.vdex \ system/app/Email/Email.apk \ system/app/Gallery2/Gallery2.apk \ system/app/LatinIME/LatinIME.apk \ @@ -55,6 +57,8 @@ PRODUCT_ARTIFACT_PATH_REQUIREMENT_WHITELIST += \ system/lib64/libjni_latinime.so \ system/lib64/libjni_tinyplanet.so \ system/priv-app/CarrierConfig/CarrierConfig.apk \ + system/priv-app/CarrierConfig/oat/arm64/CarrierConfig.odex \ + system/priv-app/CarrierConfig/oat/arm64/CarrierConfig.vdex \ system/priv-app/Contacts/Contacts.apk \ system/priv-app/Dialer/Dialer.apk \ system/priv-app/Launcher3QuickStep/Launcher3QuickStep.apk \ diff --git a/target/product/media_product.mk b/target/product/media_product.mk new file mode 100644 index 0000000000..17c24eef1f --- /dev/null +++ b/target/product/media_product.mk @@ -0,0 +1,25 @@ +# +# 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. +# + +# This makefile contains the product partition contents for +# media-capable devices (non-wearables). Only add something here +# if it definitely doesn't belong on wearables. Otherwise, choose +# base_vendor.mk. +$(call inherit-product, $(SRC_TARGET_DIR)/product/base_product.mk) + +# /product packages +PRODUCT_PACKAGES += \ + webview \ diff --git a/target/product/media_vendor.mk b/target/product/media_vendor.mk index f30e6f361f..7d4af64bd6 100644 --- a/target/product/media_vendor.mk +++ b/target/product/media_vendor.mk @@ -24,7 +24,3 @@ $(call inherit-product, $(SRC_TARGET_DIR)/product/base_vendor.mk) PRODUCT_PACKAGES += \ libaudiopreprocessing \ libwebrtc_audio_preprocessing \ - -# /product packages -PRODUCT_PACKAGES += \ - webview \ diff --git a/target/product/telephony.mk b/target/product/telephony.mk new file mode 100644 index 0000000000..e0eb15925b --- /dev/null +++ b/target/product/telephony.mk @@ -0,0 +1,20 @@ +# +# 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. +# + +# All modules for telephony +$(call inherit-product, $(SRC_TARGET_DIR)/product/telephony_system.mk) +$(call inherit-product, $(SRC_TARGET_DIR)/product/telephony_vendor.mk) +$(call inherit-product, $(SRC_TARGET_DIR)/product/telephony_product.mk) diff --git a/target/product/telephony_product.mk b/target/product/telephony_product.mk new file mode 100644 index 0000000000..70d4828ead --- /dev/null +++ b/target/product/telephony_product.mk @@ -0,0 +1,23 @@ +# +# 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. +# + +# This is the list of modules that are specific to products that have telephony +# hardware, and install to the product partition. + +# /product packages +PRODUCT_PACKAGES += \ + CarrierConfig \ + Dialer \ diff --git a/target/product/telephony_vendor.mk b/target/product/telephony_vendor.mk index 4cff16dc8e..86dbcc98a6 100644 --- a/target/product/telephony_vendor.mk +++ b/target/product/telephony_vendor.mk @@ -21,9 +21,4 @@ PRODUCT_PACKAGES := \ rild \ -# /product packages -PRODUCT_PACKAGES += \ - CarrierConfig \ - Dialer \ - PRODUCT_COPY_FILES := \ diff --git a/target/product/treble_common.mk b/target/product/treble_common.mk index 7642876af0..7e4a98e984 100644 --- a/target/product/treble_common.mk +++ b/target/product/treble_common.mk @@ -21,8 +21,7 @@ # Generic system image inherits from AOSP with telephony $(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_base.mk) -$(call inherit-product, $(SRC_TARGET_DIR)/product/telephony_system.mk) -$(call inherit-product, $(SRC_TARGET_DIR)/product/telephony_vendor.mk) +$(call inherit-product, $(SRC_TARGET_DIR)/product/telephony.mk) # Enable dynamic partition size PRODUCT_USE_DYNAMIC_PARTITION_SIZE := true