diff options
-rw-r--r-- | core/Makefile | 14 | ||||
-rw-r--r-- | core/build_id.mk | 2 | ||||
-rw-r--r-- | target/product/go_defaults.mk | 42 | ||||
-rw-r--r-- | target/product/go_defaults_512.mk | 28 | ||||
-rw-r--r-- | target/product/go_defaults_common.mk | 57 | ||||
-rwxr-xr-x | tools/vendor_buildinfo.sh | 6 |
6 files changed, 106 insertions, 43 deletions
diff --git a/core/Makefile b/core/Makefile index 7f0e1cd2ca..cc16497a9d 100644 --- a/core/Makefile +++ b/core/Makefile @@ -299,7 +299,12 @@ endif TARGET_AAPT_CHARACTERISTICS="$(TARGET_AAPT_CHARACTERISTICS)" \ bash $(BUILDINFO_SH) >> $@ ifndef property_overrides_split_enabled - $(hide) TARGET_BOOTLOADER_BOARD_NAME="$(TARGET_BOOTLOADER_BOARD_NAME)" \ + $(hide) TARGET_DEVICE="$(TARGET_DEVICE)" \ + PRODUCT_NAME="$(TARGET_PRODUCT)" \ + PRODUCT_BRAND="$(PRODUCT_BRAND)" \ + PRODUCT_MODEL="$(PRODUCT_MODEL)" \ + PRODUCT_MANUFACTURER="$(PRODUCT_MANUFACTURER)" \ + TARGET_BOOTLOADER_BOARD_NAME="$(TARGET_BOOTLOADER_BOARD_NAME)" \ TARGET_BOARD_PLATFORM="$(TARGET_BOARD_PLATFORM)" \ bash $(VENDOR_BUILDINFO_SH) >> $@ endif @@ -359,7 +364,12 @@ $(INSTALLED_VENDOR_BUILD_PROP_TARGET): $(VENDOR_BUILDINFO_SH) $(hide) echo ro.vendor.build.date.utc=`$(DATE_FROM_FILE) +%s`>>$@ $(hide) echo ro.vendor.build.fingerprint="$(BUILD_FINGERPRINT_FROM_FILE)">>$@ ifdef property_overrides_split_enabled - $(hide) TARGET_BOOTLOADER_BOARD_NAME="$(TARGET_BOOTLOADER_BOARD_NAME)" \ + $(hide) TARGET_DEVICE="$(TARGET_DEVICE)" \ + PRODUCT_NAME="$(TARGET_PRODUCT)" \ + PRODUCT_BRAND="$(PRODUCT_BRAND)" \ + PRODUCT_MODEL="$(PRODUCT_MODEL)" \ + PRODUCT_MANUFACTURER="$(PRODUCT_MANUFACTURER)" \ + TARGET_BOOTLOADER_BOARD_NAME="$(TARGET_BOOTLOADER_BOARD_NAME)" \ TARGET_BOARD_PLATFORM="$(TARGET_BOARD_PLATFORM)" \ bash $(VENDOR_BUILDINFO_SH) >> $@ $(hide) echo "#" >> $@; \ diff --git a/core/build_id.mk b/core/build_id.mk index 22f7726cbc..403f35f45b 100644 --- a/core/build_id.mk +++ b/core/build_id.mk @@ -18,4 +18,4 @@ # (like "CRB01"). It must be a single word, and is # capitalized by convention. -export BUILD_ID=OPM1.171016.001 +export BUILD_ID=OPM1.171017.001 diff --git a/target/product/go_defaults.mk b/target/product/go_defaults.mk index fbb95677fb..faa1852b41 100644 --- a/target/product/go_defaults.mk +++ b/target/product/go_defaults.mk @@ -14,44 +14,6 @@ # limitations under the License. # -# Sets Android Go recommended default values for propreties. - -# Set lowram options -PRODUCT_PROPERTY_OVERRIDES += \ - ro.config.low_ram=true \ - ro.lmk.critical_upgrade=true \ - ro.lmk.upgrade_pressure=40 - -# set threshold to filter unused apps -PRODUCT_PROPERTY_OVERRIDES += \ - pm.dexopt.downgrade_after_inactive_days=10 - - -# Speed profile services and wifi-service to reduce RAM and storage. -PRODUCT_SYSTEM_SERVER_COMPILER_FILTER := speed-profile - -# Always preopt extracted APKs to prevent extracting out of the APK for gms -# modules. -PRODUCT_ALWAYS_PREOPT_EXTRACTED_APK := true - -# Use a profile based boot image for this device. Note that this is currently a -# generic profile and not Android Go optimized. -PRODUCT_USE_PROFILE_FOR_BOOT_IMAGE := true -PRODUCT_DEX_PREOPT_BOOT_IMAGE_PROFILE_LOCATION := frameworks/base/config/boot-image-profile.txt - -# set the compiler filter for shared apks to quicken. -# Rationale: speed has a lot of dex code expansion, it uses more ram and space -# compared to quicken. Using quicken for shared APKs on Go devices may save RAM. -# Note that this is a trade-off: here we trade clean pages for dirty pages, -# extra cpu and battery. That's because the quicken files will be jit-ed in all -# the processes that load of shared apk and the code cache is not shared. -# Some notable apps that will be affected by this are gms and chrome. -# b/65591595. -PRODUCT_PROPERTY_OVERRIDES += \ - pm.dexopt.shared=quicken - -# Default heap sizes. Allow up to 256m for large heaps to make sure a single app -# doesn't take all of the RAM. -PRODUCT_PROPERTY_OVERRIDES += dalvik.vm.heapgrowthlimit=128m -PRODUCT_PROPERTY_OVERRIDES += dalvik.vm.heapsize=256m +# Inherit common Android Go defaults. +$(call inherit-product, build/target/product/go_defaults_common.mk) diff --git a/target/product/go_defaults_512.mk b/target/product/go_defaults_512.mk new file mode 100644 index 0000000000..56ab29b4b2 --- /dev/null +++ b/target/product/go_defaults_512.mk @@ -0,0 +1,28 @@ +# +# Copyright (C) 2017 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. +# + +# Inherit common Android Go defaults. +$(call inherit-product, build/target/product/go_defaults_common.mk) + +# 512MB specific properties. + +# lmkd can kill more now. +PRODUCT_PROPERTY_OVERRIDES += \ + ro.lmk.medium=700 \ + +# madvise random in ART to reduce page cache thrashing. +PRODUCT_PROPERTY_OVERRIDES += \ + dalvik.vm.madvise-random=true diff --git a/target/product/go_defaults_common.mk b/target/product/go_defaults_common.mk new file mode 100644 index 0000000000..fbb95677fb --- /dev/null +++ b/target/product/go_defaults_common.mk @@ -0,0 +1,57 @@ +# +# Copyright (C) 2017 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. +# + +# Sets Android Go recommended default values for propreties. + +# Set lowram options +PRODUCT_PROPERTY_OVERRIDES += \ + ro.config.low_ram=true \ + ro.lmk.critical_upgrade=true \ + ro.lmk.upgrade_pressure=40 + +# set threshold to filter unused apps +PRODUCT_PROPERTY_OVERRIDES += \ + pm.dexopt.downgrade_after_inactive_days=10 + + +# Speed profile services and wifi-service to reduce RAM and storage. +PRODUCT_SYSTEM_SERVER_COMPILER_FILTER := speed-profile + +# Always preopt extracted APKs to prevent extracting out of the APK for gms +# modules. +PRODUCT_ALWAYS_PREOPT_EXTRACTED_APK := true + +# Use a profile based boot image for this device. Note that this is currently a +# generic profile and not Android Go optimized. +PRODUCT_USE_PROFILE_FOR_BOOT_IMAGE := true +PRODUCT_DEX_PREOPT_BOOT_IMAGE_PROFILE_LOCATION := frameworks/base/config/boot-image-profile.txt + +# set the compiler filter for shared apks to quicken. +# Rationale: speed has a lot of dex code expansion, it uses more ram and space +# compared to quicken. Using quicken for shared APKs on Go devices may save RAM. +# Note that this is a trade-off: here we trade clean pages for dirty pages, +# extra cpu and battery. That's because the quicken files will be jit-ed in all +# the processes that load of shared apk and the code cache is not shared. +# Some notable apps that will be affected by this are gms and chrome. +# b/65591595. +PRODUCT_PROPERTY_OVERRIDES += \ + pm.dexopt.shared=quicken + +# Default heap sizes. Allow up to 256m for large heaps to make sure a single app +# doesn't take all of the RAM. +PRODUCT_PROPERTY_OVERRIDES += dalvik.vm.heapgrowthlimit=128m +PRODUCT_PROPERTY_OVERRIDES += dalvik.vm.heapsize=256m + diff --git a/tools/vendor_buildinfo.sh b/tools/vendor_buildinfo.sh index 2854fa84da..485ada30a3 100755 --- a/tools/vendor_buildinfo.sh +++ b/tools/vendor_buildinfo.sh @@ -6,4 +6,10 @@ echo "# autogenerated by vendor_buildinfo.sh" echo "ro.product.board=$TARGET_BOOTLOADER_BOARD_NAME" echo "ro.board.platform=$TARGET_BOARD_PLATFORM" +echo "ro.vendor.product.manufacturer=$PRODUCT_MANUFACTURER" +echo "ro.vendor.product.model=$PRODUCT_MODEL" +echo "ro.vendor.product.brand=$PRODUCT_BRAND" +echo "ro.vendor.product.name=$PRODUCT_NAME" +echo "ro.vendor.product.device=$TARGET_DEVICE" + echo "# end build properties" |