From 4fcf69db54599ce98f0a925b06843941933350e2 Mon Sep 17 00:00:00 2001 From: Ziyang Zhou Date: Fri, 24 Sep 2021 00:57:25 +0800 Subject: [PATCH] refine product / board definition --- phone-xhdpi-6144-dalvik-heap.mk | 25 +++++++++++++++++++++++++ redroid.mk | 7 +++---- redroid_arm64/BoardConfig.mk | 7 +++++++ redroid_x86_64/BoardConfig.mk | 7 +++++++ vendorsetup.sh | 4 ---- 5 files changed, 42 insertions(+), 8 deletions(-) create mode 100644 phone-xhdpi-6144-dalvik-heap.mk diff --git a/phone-xhdpi-6144-dalvik-heap.mk b/phone-xhdpi-6144-dalvik-heap.mk new file mode 100644 index 0000000..2bacc4a --- /dev/null +++ b/phone-xhdpi-6144-dalvik-heap.mk @@ -0,0 +1,25 @@ +# +# Copyright 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. +# + +# Provides overrides to configure the Dalvik heap for a 6GB phone + +PRODUCT_PROPERTY_OVERRIDES += \ + dalvik.vm.heapstartsize=16m \ + dalvik.vm.heapgrowthlimit=256m \ + dalvik.vm.heapsize=512m \ + dalvik.vm.heaptargetutilization=0.5 \ + dalvik.vm.heapminfree=8m \ + dalvik.vm.heapmaxfree=32m diff --git a/redroid.mk b/redroid.mk index e1219fc..95576e2 100644 --- a/redroid.mk +++ b/redroid.mk @@ -12,8 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -$(call inherit-product-if-exists, product.mk) - PRODUCT_SOONG_NAMESPACES += external/mesa3d # Arm64 linker failed, complain unsupported TLS DT entry @@ -93,6 +91,7 @@ PRODUCT_COPY_FILES += \ $(LOCAL_PATH)/gpu_config.sh:$(TARGET_COPY_OUT_VENDOR)/bin/gpu_config.sh \ -# Extend heap size we use for dalvik/art runtime -$(call inherit-product, frameworks/native/build/tablet-7in-hdpi-1024-dalvik-heap.mk) +$(call inherit-product, $(LOCAL_PATH)/phone-xhdpi-6144-dalvik-heap.mk) + +$(call inherit-product-if-exists, product.mk) diff --git a/redroid_arm64/BoardConfig.mk b/redroid_arm64/BoardConfig.mk index 6634706..185799b 100644 --- a/redroid_arm64/BoardConfig.mk +++ b/redroid_arm64/BoardConfig.mk @@ -11,6 +11,13 @@ BUILD_EMULATOR_OPENGL := false # use seperate vendor partition TARGET_COPY_OUT_VENDOR := vendor +BOARD_BUILD_SYSTEM_ROOT_IMAGE := true + +TARGET_USERIMAGES_SPARSE_EXT_DISABLED := true + +BOARD_VENDORIMAGE_PARTITION_SIZE := 367001600 +BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4 + BOARD_GPU_DRIVERS := virgl radeonsi DEVICE_MANIFEST_FILE := device/redroid/manifest.xml diff --git a/redroid_x86_64/BoardConfig.mk b/redroid_x86_64/BoardConfig.mk index 7576811..3486617 100755 --- a/redroid_x86_64/BoardConfig.mk +++ b/redroid_x86_64/BoardConfig.mk @@ -9,6 +9,13 @@ MINIMAL_FONT_FOOTPRINT := false # use seperate vendor partition TARGET_COPY_OUT_VENDOR := vendor +BOARD_BUILD_SYSTEM_ROOT_IMAGE := true + +TARGET_USERIMAGES_SPARSE_EXT_DISABLED := true + +BOARD_VENDORIMAGE_PARTITION_SIZE := 367001600 +BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4 + BOARD_GPU_DRIVERS := i915 i965 r300g r600g virgl iris radeonsi DEVICE_MANIFEST_FILE := device/redroid/manifest.xml diff --git a/vendorsetup.sh b/vendorsetup.sh index f1c16d9..0c5b943 100755 --- a/vendorsetup.sh +++ b/vendorsetup.sh @@ -1,9 +1,5 @@ # This file is executed by build/envsetup.sh, and can use anything # defined in envsetup.sh. -add_lunch_combo redroid_x86_64-eng add_lunch_combo redroid_x86_64-userdebug -add_lunch_combo redroid_x86_64-user -add_lunch_combo redroid_arm64-eng add_lunch_combo redroid_arm64-userdebug -add_lunch_combo redroid_arm64-user