From ceb7fc4de7ad36a2fbdfb50d8b8359aa2ce27316 Mon Sep 17 00:00:00 2001 From: Patrick Tjin Date: Thu, 4 Feb 2016 13:19:39 -0800 Subject: [PATCH] marlin: clean up build 1) Disable SELinux until the policies are updated (b/26984551) 2) move some files to top level, eventually common/ will be removed 3) start moving lines from common/*mk to the appropriate top level makefile 4) start removing unused directories and files Bug: 26984551 Change-Id: Ic8b9226a6e9506b2655906ab1550679394b5b43c --- AndroidBoard.mk | 2 + aosp_marlin.mk | 2 +- aosp_sailfish.mk | 2 +- board-info.txt | 40 ---- common/appops/Android.mk | 19 -- common/appops/README.txt | 125 ------------ common/appops/appops_policy.xml | 50 ----- common/appops/appops_policy.xsd | 165 --------------- common/audio/htc-audio-effects.mk | 2 + common/audio/htc-audio.mk | 4 - common/base.mk | 19 +- common/common.mk | 14 +- common/common64.mk | 16 +- common/dlkm/AndroidKernelModule.mk | 155 -------------- common/generate_extra_images.mk | 1 + common/init/Android.mk | 1 - common/qcom.key | 27 --- common/rootdir/Android.mk | 14 +- common/tools/list_clks.sh | 192 ------------------ device-common.mk | 74 +------ device-marlin.mk | 8 + device-sailfish.mk | 8 + fstab.qcom | 9 +- init.target.rc | 98 ++------- marlin/BoardConfig.mk | 34 ++-- sailfish/BoardConfig.mk | 4 +- common/sec_config => sec_config | 0 .../etc/ueventd.qcom.rc => ueventd.common.rc | 0 usf_post_boot.sh | 82 -------- usf_settings.sh | 101 --------- common/vendorsetup.sh => vendorsetup.sh | 0 whitelistedapps.xml | 72 ------- 32 files changed, 99 insertions(+), 1241 deletions(-) delete mode 100644 board-info.txt delete mode 100644 common/appops/Android.mk delete mode 100644 common/appops/README.txt delete mode 100644 common/appops/appops_policy.xml delete mode 100644 common/appops/appops_policy.xsd delete mode 100644 common/dlkm/AndroidKernelModule.mk delete mode 100644 common/qcom.key delete mode 100755 common/tools/list_clks.sh rename common/sec_config => sec_config (100%) rename common/rootdir/etc/ueventd.qcom.rc => ueventd.common.rc (100%) delete mode 100644 usf_post_boot.sh delete mode 100644 usf_settings.sh rename common/vendorsetup.sh => vendorsetup.sh (100%) delete mode 100644 whitelistedapps.xml diff --git a/AndroidBoard.mk b/AndroidBoard.mk index fef2faa8..4d9bf493 100644 --- a/AndroidBoard.mk +++ b/AndroidBoard.mk @@ -1,3 +1,5 @@ +$(error this file should be UNUSED!) + TARGET_BOOTIMG_SIGNED := false TARGET_NO_BOOTLOADER := true diff --git a/aosp_marlin.mk b/aosp_marlin.mk index 5ffd3571..c01dd8ce 100644 --- a/aosp_marlin.mk +++ b/aosp_marlin.mk @@ -24,7 +24,7 @@ $(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_base_telephony.mk) PRODUCT_NAME := aosp_marlin #PRODUCT_BRAND := Android PRODUCT_MODEL := AOSP on msm8996 -PRODUCT_MANUFACTURER := HTC +PRODUCT_MANUFACTURER := google PRODUCT_RESTRICT_VENDOR_FILES := true $(call inherit-product, device/google/marlin/device-marlin.mk) diff --git a/aosp_sailfish.mk b/aosp_sailfish.mk index 1441e8f8..18b33bdf 100644 --- a/aosp_sailfish.mk +++ b/aosp_sailfish.mk @@ -24,7 +24,7 @@ $(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_base_telephony.mk) PRODUCT_NAME := aosp_sailfish #PRODUCT_BRAND := Android PRODUCT_MODEL := AOSP on msm8996 -PRODUCT_MANUFACTURER := HTC +PRODUCT_MANUFACTURER := google PRODUCT_RESTRICT_VENDOR_FILES := true $(call inherit-product, device/google/marlin/device-sailfish.mk) diff --git a/board-info.txt b/board-info.txt deleted file mode 100644 index 7d8e7c21..00000000 --- a/board-info.txt +++ /dev/null @@ -1,40 +0,0 @@ -ModelID: 2PS65**** -ModelID: 2PS650000 -CIDNUM: 11111111 -MainVer: 0.0.0.1 -nohardreset: 1 -rompack: v2 -resparseoption: -S150M -erasepartition: cache -eraseonflash: system -eraseonflash: userdata -eraseonflash: aboot -eraseonflash: adsp -eraseonflash: boot -eraseonflash: cpe -eraseonflash: hosd -eraseonflash: hyp -eraseonflash: radio -eraseonflash: recovery -eraseonflash: rpm -eraseonflash: pmic -eraseonflash: xbl -eraseonflash: sdi -eraseonflash: tz -eraseonflash: rfg_1 -eraseonflash: rfg_3 -eraseonflash: sp1 -eraseonflash: cota -eraseonflash: devcfg -eraseonflash: cmnlib32 -eraseonflash: cmnlib64 -eraseonflash: keymaster -eraseonflash: lksecapp -eraseonflash: apdp -eraseonflash: msadp -eraseonflash: venus -eraseonsoff: frp -eraseonsoff: carrier -erasepartition: extra -erasepartition: ssd -erasepartition: devinfo diff --git a/common/appops/Android.mk b/common/appops/Android.mk deleted file mode 100644 index 09ba90ba..00000000 --- a/common/appops/Android.mk +++ /dev/null @@ -1,19 +0,0 @@ -define validate-xml-file - @echo "validating xml: $2" - @xmllint --noout --schema $1 $2 -endef -LOCAL_PATH:= $(call my-dir) -####################################### - -include $(CLEAR_VARS) -LOCAL_MODULE_CLASS := ETC -LOCAL_MODULE := appops_policy.xml -APPOPS_POLICY_XSD_FILE := $(LOCAL_PATH)/appops_policy.xsd -include $(BUILD_SYSTEM)/base_rules.mk - -$(LOCAL_BUILT_MODULE): $(LOCAL_PATH)/appops_policy.xml $(APPOPS_POLICY_XSD_FILE) $(ACP) - @echo Validating $< - @xmllint --noout --schema $(APPOPS_POLICY_XSD_FILE) $< - $(copy-file-to-target) -####################################### - diff --git a/common/appops/README.txt b/common/appops/README.txt deleted file mode 100644 index 3c028afb..00000000 --- a/common/appops/README.txt +++ /dev/null @@ -1,125 +0,0 @@ -=============================================================================== -Copyright (c) 2014, The Linux Foundation. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - * Neither the name of The Linux Foundation nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -=============================================================================== - -1. Introduction: ----------------- - Android provides support for AppOps service to manage and control - user-permissions of different operations of installed packages. - - AppOps service reads /system/etc/appops_policy.xml file to read all default - user-permissions of different operations of installed packages. - -2. AppOps Policy File: ----------------------- - AppOps policy file can be used to assign default permissions to both system - and user installed applications. Since hardcoded in AppOpsService this file - should be at /system/etc/appops_policy.xml path on the device. - - Following section talks about various tags used in appops_policy.xml file: - - 2.1 appops-policy - This is the root tag of appops_policy file. - - Parameters: - i) version (Required) -This parameter defines the version of - appops_policy.xml format. It should be set to "1". - - Tags: - i) user-app - section to configure default permissions of user - installed apps. - ii) system-app - section to configure default permissions of preset - (system) apps - iii) application - section to override default permission of particular - packages. - 2.2 user-app - This tag is used to set default permission of user installed applications. - - Parameters: - i) permission - To set default permission of all user installed apps. - ii) show - To show/hide operations in app ops settings activity. - - Tags: - - - 2.3 system-app - This tag is used to set default permission of preset installed applications. - - Parameters: - i) permission - To set default permission of all system installed apps. - ii) show - To show/hide operations in app ops settings activity. - - Tags: - - - 2.4 application - This tag is used to set default permission of specific applications. - - Parameters: - - - Tags: - i) pkg - section to set default permission of specific package. - - 2.5 pkg - This tag is used to set default permission of specific package. - - Parameters: - i) name - To specify name of the package. - ii) type - To set if package is part of preset or user installed application. - iii) permission - To set default permission of package's all operations. - iv) show - To show/hide operations in app ops settings activity. - - Tags: - i) op - section to set defualt permission of an operation. - - 2.5 op - This tag is used to set default permission of specific operation - - Parameters: - i) name - To specify name of the operation - ii) permission - To set default permisison of operation - iii) show - To show/hide operation in app ops settings activity. - -3 Example: ----------- - - - - - - - - - - - - - - - diff --git a/common/appops/appops_policy.xml b/common/appops/appops_policy.xml deleted file mode 100644 index d73fc15a..00000000 --- a/common/appops/appops_policy.xml +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/common/appops/appops_policy.xsd b/common/appops/appops_policy.xsd deleted file mode 100644 index 0f27d165..00000000 --- a/common/appops/appops_policy.xsd +++ /dev/null @@ -1,165 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/common/audio/htc-audio-effects.mk b/common/audio/htc-audio-effects.mk index 3f25696c..7eb52b09 100644 --- a/common/audio/htc-audio-effects.mk +++ b/common/audio/htc-audio-effects.mk @@ -1,3 +1,5 @@ +#TODO: REMOVE THIS, do not generate files into the source directory + EFFECT_CONFIG := device/google/marlin/common/audio/audio_effects.conf $(shell cat /dev/null > $(EFFECT_CONFIG)) diff --git a/common/audio/htc-audio.mk b/common/audio/htc-audio.mk index e8c99a92..2424cf4c 100755 --- a/common/audio/htc-audio.mk +++ b/common/audio/htc-audio.mk @@ -183,10 +183,6 @@ ifeq ($(ENABLE_HD_AUDIO),true) HTC_INTERNAL_CDEFS += -DHD_AUDIO endif -ifeq ($(QCOM_FM_ENABLED),true) -HTC_INTERNAL_CDEFS += -DFM_VOL_CONTROL -endif - ifeq ($(ENABLE_MULTI_INPUT),true) HTC_INTERNAL_CDEFS += -DENABLE_MULTI_INPUT endif diff --git a/common/base.mk b/common/base.mk index 3de3499f..c6d9c6a9 100644 --- a/common/base.mk +++ b/common/base.mk @@ -73,7 +73,7 @@ ALSA_UCM += snd_soc_msm_samarium_Tapan ANGLE := libangle #APPOPS_POLICY -APPOPS_POLICY := appops_policy.xml +#APPOPS_POLICY := appops_policy.xml AUDIO_HARDWARE := audio.primary.mpq8064 AUDIO_HARDWARE += audio.primary.apq8084 @@ -198,11 +198,6 @@ EBTABLES += libebtc #FASTPOWERON FASTPOWERON := FastBoot -#FM -FM := qcom.fmradio -FM += libqcomfm_jni -FM += libfmjni - #GPS GPS_HARDWARE := gps.conf GPS_HARDWARE += gps.default @@ -255,7 +250,6 @@ INIT += vold.fstab INIT += init.qcom.ril.path.sh INIT += init.qcom.usb.rc INIT += init.qcom.usb.sh -INIT += usf_post_boot.sh INIT += init.qcom.efs.sync.sh INIT += ueventd.qcom.rc INIT += init.ath3k.bt.sh @@ -677,10 +671,6 @@ PRODUCT_PACKAGES := \ CalendarProvider \ SyncProvider \ VoiceDialer \ - FMRadio \ - FM2 \ - FMRadio \ - FMRecord \ VideoEditor @@ -698,7 +688,7 @@ endif PRODUCT_PACKAGES += $(ALSA_HARDWARE) PRODUCT_PACKAGES += $(ALSA_UCM) PRODUCT_PACKAGES += $(ANGLE) -PRODUCT_PACKAGES += $(APPOPS_POLICY) +#PRODUCT_PACKAGES += $(APPOPS_POLICY) PRODUCT_PACKAGES += $(AUDIO_HARDWARE) PRODUCT_PACKAGES += $(AUDIO_POLICY) PRODUCT_PACKAGES += $(TINY_ALSA_TEST_APPS) @@ -810,7 +800,6 @@ PRODUCT_PACKAGES_DEBUG := init.qcom.testscripts.sh #NANOPB_LIBRARY_NAME := libnanopb-c-2.8.0 - PRODUCT_COPY_FILES := \ frameworks/native/data/etc/android.hardware.camera.flash-autofocus.xml:system/etc/permissions/android.hardware.camera.flash-autofocus.xml \ frameworks/native/data/etc/android.hardware.camera.front.xml:system/etc/permissions/android.hardware.camera.front.xml \ @@ -843,10 +832,6 @@ PRODUCT_COPY_FILES := \ system/bluetooth/data/stack.conf:system/etc/bluetooth/stack.conf #endif # BOARD_HAVE_BLUETOOTH_BLUEZ -# gps/location secuity configuration file -PRODUCT_COPY_FILES += \ - device/google/marlin/common/sec_config:system/etc/sec_config - PRODUCT_COPY_FILES += \ frameworks/av/media/libstagefright/data/media_codecs_google_audio.xml:system/etc/media_codecs_google_audio.xml \ frameworks/av/media/libstagefright/data/media_codecs_google_telephony.xml:system/etc/media_codecs_google_telephony.xml \ diff --git a/common/common.mk b/common/common.mk index 2ba5fb92..351ccf63 100644 --- a/common/common.mk +++ b/common/common.mk @@ -7,22 +7,18 @@ $(call inherit-product, device/google/marlin/common/base.mk) #$(call inherit-product-if-exists, $(QCPATH)/common/config/device-vendor.mk) #$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base_telephony.mk) -#PRODUCT_BRAND := qcom -PRODUCT_AAPT_CONFIG += hdpi mdpi - -ifndef PRODUCT_MANUFACTURER -PRODUCT_MANUFACTURER := QUALCOMM -endif - +#ifndef PRODUCT_MANUFACTURER +#PRODUCT_MANUFACTURER := QUALCOMM +#endif +# PRODUCT_PROPERTY_OVERRIDES += \ ro.vendor.extension_library=libqti-perfd-client.so \ persist.radio.apm_sim_not_pwdn=1 \ persist.radio.custom_ecc=1\ persist.radio.sib16_support=1 -PRODUCT_PRIVATE_KEY := device/google/marlin/common/qcom.key PRODUCT_PACKAGES += qcril.db -$(call inherit-product, frameworks/native/build/phone-xhdpi-1024-dalvik-heap.mk) +#$(call inherit-product, frameworks/native/build/phone-xhdpi-1024-dalvik-heap.mk) #$(call inherit-product, frameworks/base/data/fonts/fonts.mk) #$(call inherit-product, frameworks/base/data/keyboards/keyboards.mk) diff --git a/common/common64.mk b/common/common64.mk index 5fae5e0e..0ace9ead 100644 --- a/common/common64.mk +++ b/common/common64.mk @@ -1,5 +1,4 @@ $(call inherit-product, device/google/marlin/common/base.mk) - # For PRODUCT_COPY_FILES, the first instance takes precedence. # Since we want use QC specific files, we should inherit # device-vendor.mk first to make sure QC specific files gets installed. @@ -8,21 +7,16 @@ $(call inherit-product-if-exists, $(QCPATH)/common/config/device-vendor.mk) #$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk) #$(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_base_telephony.mk) -#PRODUCT_BRAND := qcom -PRODUCT_AAPT_CONFIG += hdpi mdpi - -ifndef PRODUCT_MANUFACTURER -PRODUCT_MANUFACTURER := QUALCOMM -endif - +#ifndef PRODUCT_MANUFACTURER +#PRODUCT_MANUFACTURER := QUALCOMM +#endif +# PRODUCT_PROPERTY_OVERRIDES += \ ro.vendor.extension_library=libqti-perfd-client.so \ persist.radio.apm_sim_not_pwdn=1 \ persist.radio.sib16_support=1 \ persist.radio.custom_ecc=1 -PRODUCT_PRIVATE_KEY := device/google/marlin/common/qcom.key - -$(call inherit-product, frameworks/native/build/phone-xhdpi-1024-dalvik-heap.mk) +#$(call inherit-product, frameworks/native/build/phone-xhdpi-1024-dalvik-heap.mk) #$(call inherit-product, frameworks/base/data/fonts/fonts.mk) #$(call inherit-product, frameworks/base/data/keyboards/keyboards.mk) diff --git a/common/dlkm/AndroidKernelModule.mk b/common/dlkm/AndroidKernelModule.mk deleted file mode 100644 index 6676085f..00000000 --- a/common/dlkm/AndroidKernelModule.mk +++ /dev/null @@ -1,155 +0,0 @@ -DISABLE_THIS_DLKM := $(strip $(TARGET_KERNEL_DLKM_DISABLE)) - -ifeq ($(DISABLE_THIS_DLKM),true) -ifneq (,$(filter $(LOCAL_MODULE),$(TARGET_KERNEL_DLKM_OVERRIDE))) - DISABLE_THIS_DLKM = false -else -endif -endif - -ifeq ($(DISABLE_THIS_DLKM),true) -$(warning DLKM '$(LOCAL_MODULE)' disabled for target) -else - -# Assign external kernel modules to the DLKM class -LOCAL_MODULE_CLASS := DLKM - -# Set the default install path to system/lib/modules -LOCAL_MODULE_PATH := $(strip $(LOCAL_MODULE_PATH)) -ifeq ($(LOCAL_MODULE_PATH),) - LOCAL_MODULE_PATH := $(TARGET_OUT)/lib/modules -endif - -# Set the default Kbuild file path to LOCAL_PATH -KBUILD_FILE := $(strip $(KBUILD_FILE)) -ifeq ($(KBUILD_FILE),) - KBUILD_FILE := $(LOCAL_PATH)/Kbuild -endif - -# Get rid of any whitespace -LOCAL_MODULE_KBUILD_NAME := $(strip $(LOCAL_MODULE_KBUILD_NAME)) - -include $(BUILD_SYSTEM)/base_rules.mk - - -# The kernel build system doesn't support parallel kernel module builds -# that share the same output directory. Thus, in order to build multiple -# kernel modules that reside in a single directory (and therefore have -# the same output directory), there must be just one invocation of the -# kernel build system that builds all the modules of a given directory. -# -# Therefore, all kernel modules must depend on the same, unique target -# that invokes the kernel build system and builds all of the modules -# for the directory. The $(KBUILD_TARGET) target serves this purpose. -# To ensure the value of KBUILD_TARGET is unique, it is essentially set -# to the path of the source directory, i.e. LOCAL_PATH. -# -# Since KBUILD_TARGET is used as a target and a variable name, it should -# not contain characters other than letters, numbers, and underscores. -KBUILD_TARGET := $(strip \ - $(subst .,_, \ - $(subst -,_, \ - $(subst :,_, \ - $(subst /,_,$(LOCAL_PATH)))))) - -# Intermediate directory where the kernel modules are created -# by the kernel build system. Ideally this would be the same -# directory as LOCAL_BUILT_MODULE, but because we're using -# relative paths for both O= and M=, we don't have much choice -KBUILD_OUT_DIR := $(TARGET_OUT_INTERMEDIATES)/$(LOCAL_PATH) - -# Path to the intermediate location where the kernel build -# system creates the kernel module. -KBUILD_MODULE := $(KBUILD_OUT_DIR)/$(LOCAL_MODULE) - -# Since we only invoke the kernel build system once per directory, -# each kernel module must depend on the same target. -$(KBUILD_MODULE): kbuild_out := $(KBUILD_OUT_DIR)/$(LOCAL_MODULE_KBUILD_NAME) -$(KBUILD_MODULE): $(KBUILD_TARGET) -ifneq "$(LOCAL_MODULE_KBUILD_NAME)" "" - mv -f $(kbuild_out) $@ -endif - -# Simply copy the kernel module from where the kernel build system -# created it to the location where the Android build system expects it. -# If LOCAL_MODULE_DEBUG_ENABLE is set, strip debug symbols. So that, -# the final images generated by ABS will have the stripped version of -# the modules -$(LOCAL_BUILT_MODULE): $(KBUILD_MODULE) | $(ACP) -ifneq "$(LOCAL_MODULE_DEBUG_ENABLE)" "" - mkdir -p $(dir $@) - cp $< $<.unstripped - $(TARGET_STRIP) --strip-debug $< - cp $< $<.stripped -endif - @sh -c "\ - KMOD_SIG_ALL=`cat $(KERNEL_OUT)/.config | grep CONFIG_MODULE_SIG_ALL | cut -d'=' -f2`; \ - KMOD_SIG_HASH=`cat $(KERNEL_OUT)/.config | grep CONFIG_MODULE_SIG_HASH | cut -d'=' -f2 | sed 's/\"//g'`; \ - if [ \"\$$KMOD_SIG_ALL\" = \"y\" ] && [ -n \"\$$KMOD_SIG_HASH\" ]; then \ - echo \"Signing kernel module: \" `basename $<`; \ - MODSECKEY=$(KERNEL_OUT)/signing_key.priv; \ - MODPUBKEY=$(KERNEL_OUT)/signing_key.x509; \ - cp $< $<.unsigned; \ - perl ./kernel/scripts/sign-file \$$KMOD_SIG_HASH \$$MODSECKEY \$$MODPUBKEY $<; \ - fi; \ - " - $(transform-prebuilt-to-target) - -# This should really be cleared in build/core/clear-vars.mk, but for -# the time being, we need to clear it ourselves -LOCAL_MODULE_KBUILD_NAME := -LOCAL_MODULE_DEBUG_ENABLE := - -# Ensure the kernel module created by the kernel build system, as -# well as all the other intermediate files, are removed during a clean. -$(cleantarget): PRIVATE_CLEAN_FILES := $(PRIVATE_CLEAN_FILES) $(KBUILD_OUT_DIR) - - -# Since this file will be included more than once for directories -# with more than one kernel module, the shared KBUILD_TARGET rule should -# only be defined once to avoid "overriding commands ..." warnings. -ifndef $(KBUILD_TARGET)_RULE -$(KBUILD_TARGET)_RULE := 1 - -# To ensure KERNEL_OUT and TARGET_PREBUILT_INT_KERNEL are defined, -# kernel/AndroidKernel.mk must be included. While m and regular -# make builds will include kernel/AndroidKernel.mk, mm and mmm builds -# do not. Therefore, we need to explicitly include kernel/AndroidKernel.mk. -# It is safe to include it more than once because the entire file is -# guarded by "ifeq ($(TARGET_PREBUILT_KERNEL),) ... endif". -include kernel/AndroidKernel.mk - -# Kernel modules have to be built after: -# * the kernel config has been created -# * host executables, like scripts/basic/fixdep, have been built -# (otherwise parallel invocations of the kernel build system will -# fail as they all try to compile these executables at the same time) -# * a full kernel build (to make module versioning work) -# -# For these reasons, kernel modules are dependent on -# TARGET_PREBUILT_INT_KERNEL which will ensure all of the above. -# -# NOTE: Due to a bug in the kernel build system when using a Kbuild file -# and relative paths for both O= and M=, the Kbuild file must -# be copied to the output directory. -# -# NOTE: The following paths are equivalent: -# $(KBUILD_OUT_DIR) -# $(KERNEL_OUT)/../$(LOCAL_PATH) -.PHONY: $(KBUILD_TARGET) -$(KBUILD_TARGET): local_path := $(LOCAL_PATH) -$(KBUILD_TARGET): kbuild_out_dir := $(KBUILD_OUT_DIR) -$(KBUILD_TARGET): kbuild_options := $(KBUILD_OPTIONS) -$(KBUILD_TARGET): $(TARGET_PREBUILT_INT_KERNEL) - @mkdir -p $(kbuild_out_dir) - $(hide) cp -f $(local_path)/Kbuild $(kbuild_out_dir)/Kbuild - $(MAKE) -C kernel M=../$(local_path) O=../$(KERNEL_OUT) ARCH=$(KERNEL_ARCH) CROSS_COMPILE=$(KERNEL_CROSS_COMPILE) $(KERNEL_CFLAGS) modules $(kbuild_options) - -# Once the KBUILD_OPTIONS variable has been used for the target -# that's specific to the LOCAL_PATH, clear it. If this isn't done, -# then every kernel module would need to explicitly set KBUILD_OPTIONS, -# or the variable would have to be cleared in 'include $(CLEAR_VARS)' -# which would require a change to build/core. -KBUILD_OPTIONS := -endif -endif diff --git a/common/generate_extra_images.mk b/common/generate_extra_images.mk index 2ef1d305..0909734d 100644 --- a/common/generate_extra_images.mk +++ b/common/generate_extra_images.mk @@ -1,3 +1,4 @@ +$(error UNUSED) # This makefile is used to generate extra images for QCOM targets # persist, device tree & NAND images required for different QCOM targets. diff --git a/common/init/Android.mk b/common/init/Android.mk index 3ece1101..d56a462f 100644 --- a/common/init/Android.mk +++ b/common/init/Android.mk @@ -1,5 +1,4 @@ ifeq ($(TARGET_INIT_VENDOR_LIB),libinit_msm) - LOCAL_PATH := $(call my-dir) LIBINIT_MSM_PATH := $(call my-dir) diff --git a/common/qcom.key b/common/qcom.key deleted file mode 100644 index 34dd983c..00000000 --- a/common/qcom.key +++ /dev/null @@ -1,27 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIIEpAIBAAKCAQEAyIIJQ4QzkfrKoUPBkqkmDOIVq3H6hZdf8M1m638LwQGOjhv6 -qoIh0x07CpEOzYWgTdftJ3KmsSaO6V9Xdz2TeTjerKHJ0cxCBFOIZKyqq/y38DIt -sPThNVjfXopHKCup2lTTvAoSX3ZeFqv1nRGPNpk6HHaVMamShoHMVlZS4nD0s5nn -Lt2dM60iihAXU/JqhYCtFNOi0+I3ikzdottGMqkjRhrVhuw5mAbQT+hvApAFdjuL -/IaNoT1YgMeeU9CiuLvHEzXNb8IHraLhghLxvE8ZAA+dn50BQySs5jAROK6mt0ez -cYt5RtQ7ffBshKJYtOOGj7j8+cscMBceNMOYowIBAwKCAQEAhawGLQLNC/yHFi0r -txtus0Fjx6FRrmTqoIjvR6oH1gEJtBKnHFbBN2jSBwtfM65q3o/zb6HEdhm0m5Tk -+ikM+3s/HcExNogsAuJa7chxx/3P9XbJIKNAzjs/lFwvcB0b5uM30rFhlPmUDx1O -aLZfebt8Evm4y8ZhrwEy5DmMlvTIfhVBqg7YHgmmTIBeGT+yiPZrll69yqGOotmp -jyzHheKDkVfnd18mJ/mjeOODiHawxecTA2uuSuVjzaDqhoFlauASo9GIecTUNNr3 -z/Y5x13Qyg2eYZLjpAJTx/EU800UYkGg/lXwXSoeUpCvwvrv7vjaPLVhbwAlg3bc -NIUuewKBgQD9Y0NLLDjh2de6ju+eCNKHPjZyTU6nUHlGd/pO8gEXP2x3zlzbCL24 -q55njnq5xzrnFfUSIKLAS5bmOzsh12TIOKYdES9LPpZvY29Xy5NRwJRzYpkMFHc3 -vxvJFcBF/X4Q1A+/mpCmO+A43hQWnJ/wWWwvctNjR+VHwCNCRbv8VwKBgQDKkza5 -g453LMbuiF/sJUBXediZZfbe03abHgwQWhcDqmjmHbofSx/HsHHzjBhv7qMVN2vd -VsJH5U5ckRscsqnCX8WODEw1eoRZ+usV/o5JUK3sbmIj+Ml0DgVmJIYrzjz3T9WC -WXnqfzTVJANOQ4oAdQIPwdWHi2WcKsGRoD/WlQKBgQCo7NeHctCWkTp8X0ppWzcE -1CRMM4nE4FDZpVGJ9qtk1PL6iZM8sH57HRRFCacmhNHvY/i2wGyAMmSZfNIWj5iF -exloth+Hfw707PTlMmI2gGL3lxCyuE96f2fbY9WD/lQLOAp/vGBu0pV7PrgPExVK -5kgfoeJCL+4v1WzW2Sf9jwKBgQCHDM8mV7RPcy9JsD/yw4A6UTsQ7qSUjPm8vrK1 -kWStHEXuvnwU3L/adaFNCBBKnxdjekfo5IGFQ4mTC2dodxvW6oO0CDLOUa2RUfIO -qbQw4HPy9EFtUIZNXq5EGFlyiX36NTkBkPvxqiM4wqze17FVo1a1K+OvskO9cdZh -FX/kYwKBgQDeKJLc9Vi0XTMv6BdV3hXZ/E1AKyWQdrE2GRrdVuzL4mMEH23he17c -vH+iQHrmEuvpPX7G0hrQ/pByJ3140KfGPnICa2/xqF9st6FL3zb5kcns9S1dAbf7 -kZ92GnPxMoXaaUEX2rQXLgpgvZJig4wGeyexVYk44cBCzCIdC2SOfg== ------END RSA PRIVATE KEY----- diff --git a/common/rootdir/Android.mk b/common/rootdir/Android.mk index 4c312a30..b3246c73 100644 --- a/common/rootdir/Android.mk +++ b/common/rootdir/Android.mk @@ -144,13 +144,13 @@ LOCAL_SRC_FILES := etc/init.qcom.usb.sh LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) include $(BUILD_PREBUILT) -include $(CLEAR_VARS) -LOCAL_MODULE := ueventd.qcom.rc -LOCAL_MODULE_TAGS := optional eng -LOCAL_MODULE_CLASS := ETC -LOCAL_SRC_FILES := etc/ueventd.qcom.rc -LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) -include $(BUILD_PREBUILT) +#include $(CLEAR_VARS) +#LOCAL_MODULE := ueventd.qcom.rc +#LOCAL_MODULE_TAGS := optional eng +#LOCAL_MODULE_CLASS := ETC +#LOCAL_SRC_FILES := etc/ueventd.qcom.rc +#LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) +#include $(BUILD_PREBUILT) include $(CLEAR_VARS) LOCAL_MODULE := init.qcom.syspart_fixup.sh diff --git a/common/tools/list_clks.sh b/common/tools/list_clks.sh deleted file mode 100755 index 54f5a957..00000000 --- a/common/tools/list_clks.sh +++ /dev/null @@ -1,192 +0,0 @@ -# Copyright (c) 2011, The Linux Foundation. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# * Neither the name of The Linux Foundation nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED -# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT -# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS -# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# -# list_clks.sh -# Echoes all clock values inside debugfs/clk -# Author: Jack Cheung - -# This script is intended to also work with adb shell - -verbosity=0 -root=/debug -choose_clk="all" - -# Parse arguments -while getopts 'v:d:' OPTION -do - case $OPTION in - v) verbosity=$OPTARG - ;; - d) root=$OPTARG - ;; - ?) echo "Usage: list_all_clks.sh [-v ] [-d ]" - echo "Options:" - echo " -v, Set verbosity level (default 0)" - echo " 0 - Display Local, Enabled, Rate" - echo " 1 - Display Measured rate" - echo " 2 - Display Supported rate" - echo " -d, Set path to debugfs (default /debug)" - exit - ;; - esac -done -shift $(($OPTIND - 1)) - -echo "Verbosity: $verbosity" -echo "Root Debug Dir: $root" -echo "" - -case $verbosity in -0) echo -e " Local Enabled Rate" - ;; -1) echo -e " Local Enabled Rate Measured Rate" - ;; -2) echo -e " Local Enabled Rate Measured Rate" - ;; -esac - -# Print table for local, enabled, rate, and measured rate -# Loop through every directory in root dir -for clk_dir in $root/clk/* -do - # Reset values to null - local_val= - enable_val= - rate_val= - measure_val= - - # Leaves only basename - clk_name=${clk_dir##*/} - - # Special case - Need to ignore the debug_suspend - case $clk_name in - debug_suspend) continue - ;; - esac - - # Read values and hide errors by outputting to /dev/null - local_val=`cat $clk_dir/is_local 2>/dev/null` - enable_val=`cat $clk_dir/enable 2>/dev/null` - rate_val=`cat $clk_dir/rate 2>/dev/null` - measure_val=`cat $clk_dir/measure 2>/dev/null` - - # Need to pad values with spaces so columns align correctly - # Loop and remove last character untill it is correct length - clk_name="$clk_name " - while true - do - # Chops off last character - clk_name=${clk_name%?} - - length=${#clk_name} - case $length in - 32) break - ;; - esac - done - - # local_val must be 0 or 1 - case $local_val in - 0) local_val="N " - ;; - 1) local_val="Y " - ;; - esac - - # enable_val must be -1, 0, or 1 - # Still accounting for when enable_val is accidentally seen - # as MAX unsigned int instead of signed -1 - case $enable_val in - -1) enable_val="NA " - ;; - 4294967295) enable_val="NA " - ;; - 0) enable_val="OFF " - ;; - 1) enable_val="ON " - ;; - esac - - # Padding value with spaces, similar to clk_name - rate_val="$rate_val " - while true - do - rate_val=${rate_val%?} - length=${#rate_val} - case $length in - 12) break - ;; - esac - done - - case $verbosity in - 0) echo -e "$clk_name$local_val$enable_val$rate_val" - ;; - 1) echo -e "$clk_name$local_val$enable_val$rate_val$measure_val" - ;; - 2) echo -e "$clk_name$local_val$enable_val$rate_val$measure_val" - ;; - esac -done - -echo "" - -# Print supported rates separately. Too many to fit in table cleanly -case $verbosity in -2) echo -n "Supported Rates" - for clk_dir in $root/clk/* - do - myfile= - myline= - count=0 - clk_name=${clk_dir##*/} - - myfile=`cat $clk_dir/list_rates 2>/dev/null` - for myline in $myfile - do - # Print 8 values per line - case $count in - 0) echo "" - echo "" - echo "$clk_name" - echo -n "$myline" - ;; - 7) echo -n ", $myline" - ;; - 8) echo "" - echo -n "$myline" - count=0 - ;; - *) echo -n ", $myline" - ;; - esac - count=$(($count + 1)) - done - done - ;; -esac -echo -e "\nDone" diff --git a/device-common.mk b/device-common.mk index 7e649ee3..1d79b2be 100644 --- a/device-common.mk +++ b/device-common.mk @@ -26,27 +26,25 @@ ifeq ($(TARGET_PREBUILT_KERNEL),) else LOCAL_KERNEL := $(TARGET_PREBUILT_KERNEL) endif -TARGET_KERNEL_DLKM_DISABLE := true PRODUCT_COPY_FILES += \ $(LOCAL_KERNEL):kernel DEVICE_PACKAGE_OVERLAYS := device/google/marlin/overlay -TARGET_ENABLE_QC_AV_ENHANCEMENTS := true -BOARD_HAVE_QCOM_FM := false -TARGET_USES_NQ_NFC := false -#QTIC flag --include $(QCPATH)/common/config/qtic-config.mk +PRODUCT_COPY_FILES += \ + device/google/marlin/init.target.rc:root/init.target.rc \ + device/google/marlin/fstab.qcom:root/fstab.qcom + +# Input device files +PRODUCT_COPY_FILES += \ + device/google/marlin/gpio-keys.kl:system/usr/keylayout/gpio-keys.kl \ + device/google/marlin/qpnp_pon.kl:system/usr/keylayout/qpnp_pon.kl # copy customized media_profiles and media_codecs xmls for msm8996 -ifeq ($(TARGET_ENABLE_QC_AV_ENHANCEMENTS), true) PRODUCT_COPY_FILES += device/google/marlin/media_profiles.xml:system/etc/media_profiles.xml \ device/google/marlin/media_codecs.xml:system/etc/media_codecs.xml \ device/google/marlin/media_codecs_performance.xml:system/etc/media_codecs_performance.xml -endif #TARGET_ENABLE_QC_AV_ENHANCEMENTS - -PRODUCT_COPY_FILES += device/google/marlin/whitelistedapps.xml:system/etc/whitelistedapps.xml # Override heap growth limit due to high display density on device PRODUCT_PROPERTY_OVERRIDES += \ @@ -54,25 +52,6 @@ PRODUCT_PROPERTY_OVERRIDES += \ $(call inherit-product, frameworks/native/build/phone-xhdpi-2048-dalvik-heap.mk) $(call inherit-product, device/google/marlin/common/common64.mk) -#PRODUCT_NAME := msm8996 -#PRODUCT_DEVICE := msm8996 -#PRODUCT_BRAND := Android -#PRODUCT_MODEL := MSM8996 for arm64 - -# PRODUCT_BOOT_JARS += tcmiface - -#ifneq ($(strip $(QCPATH)),) -#PRODUCT_BOOT_JARS += WfdCommon -#PRODUCT_BOOT_JARS += com.qti.dpmframework -#PRODUCT_BOOT_JARS += dpmapi -#PRODUCT_BOOT_JARS += com.qti.location.sdk -#endif - -#ifeq ($(strip $(BOARD_HAVE_QCOM_FM)),true) -#PRODUCT_BOOT_JARS += qcom.fmradio -#endif #BOARD_HAVE_QCOM_FM -#PRODUCT_BOOT_JARS += qcmediaplayer - #Android EGL implementation PRODUCT_PACKAGES += libGLES_android @@ -147,6 +126,9 @@ PRODUCT_COPY_FILES += \ frameworks/native/data/etc/android.hardware.sensor.relative_humidity.xml:system/etc/permissions/android.hardware.sensor.relative_humidity.xml \ frameworks/native/data/etc/android.hardware.sensor.hifi_sensors.xml:system/etc/permissions/android.hardware.sensor.hifi_sensors.xml +PRODUCT_COPY_FILES += \ + device/google/marlin/sec_config:system/etc/sec_config + # HTC_SENSOR_HUB PRODUCT_COPY_FILES += \ device/google/marlin/i2ctest:system/bin/i2ctest \ @@ -166,40 +148,6 @@ PRODUCT_COPY_FILES += \ PRODUCT_COPY_FILES += \ device/google/marlin/msm_irqbalance.conf:system/vendor/etc/msm_irqbalance.conf -ifeq ($(strip $(TARGET_USES_NQ_NFC)),true) -PRODUCT_PACKAGES += \ - NQNfcNci \ - libnqnfc-nci \ - libnqnfc_nci_jni \ - nfc_nci.nqx.default \ - libp61-jcop-kit \ - com.nxp.nfc.nq \ - com.nxp.nfc.nq.xml \ - libpn547_fw.so \ - libpn548ad_fw.so \ - libnfc-brcm.conf \ - libnfc-nxp.conf \ - nqnfcee_access.xml \ - nqnfcse_access.xml \ - Tag \ - com.android.nfc_extras \ - libQPayJNI \ - com.android.qti.qpay \ - com.android.qti.qpay.xml \ - SmartcardService \ - org.simalliance.openmobileapi \ - org.simalliance.openmobileapi.xml - -PRODUCT_COPY_FILES += \ - frameworks/native/data/etc/com.nxp.mifare.xml:system/etc/permissions/com.nxp.mifare.xml \ - frameworks/native/data/etc/com.android.nfc_extras.xml:system/etc/permissions/com.android.nfc_extras.xml \ - frameworks/native/data/etc/android.hardware.nfc.xml:system/etc/permissions/android.hardware.nfc.xml \ - frameworks/native/data/etc/android.hardware.nfc.hce.xml:system/etc/permissions/android.hardware.nfc.hce.xml - -# SmartcardService, SIM1,SIM2,eSE1 not including eSE2,SD1 as default -ADDITIONAL_BUILD_PROPERTIES += persist.nfc.smartcard.config=SIM1,SIM2,eSE1 -endif # TARGET_USES_NQ_NFC - # Reduce client buffer size for fast audio output tracks PRODUCT_PROPERTY_OVERRIDES += \ af.fast_track_multiplier=1 diff --git a/device-marlin.mk b/device-marlin.mk index 65f67424..6b9632d4 100644 --- a/device-marlin.mk +++ b/device-marlin.mk @@ -18,4 +18,12 @@ # # Everything in this directory will become public +PRODUCT_AAPT_CONFIG := normal +PRODUCT_AAPT_PREF_CONFIG := 560dpi +PRODUCT_AAPT_PREBUILT_DPI := xxxhdpi xxhdpi xhdpi hdpi + -include device/google/marlin/device-common.mk + +#TODO rename to ueventd.marlin.rc +PRODUCT_COPY_FILES += \ + device/google/marlin/ueventd.common.rc:root/ueventd.qcom.rc diff --git a/device-sailfish.mk b/device-sailfish.mk index 65f67424..151ce888 100644 --- a/device-sailfish.mk +++ b/device-sailfish.mk @@ -18,4 +18,12 @@ # # Everything in this directory will become public +PRODUCT_AAPT_CONFIG := normal +PRODUCT_AAPT_PREF_CONFIG := xxhdpi +PRODUCT_AAPT_PREBUILT_DPI := xxhdpi xhdpi hdpi + -include device/google/marlin/device-common.mk + +#TODO rename to ueventd.sailfish.rc +PRODUCT_COPY_FILES += \ + device/google/marlin/ueventd.common.rc:root/ueventd.qcom.rc diff --git a/fstab.qcom b/fstab.qcom index a55aa8e9..8c9fec75 100644 --- a/fstab.qcom +++ b/fstab.qcom @@ -6,7 +6,10 @@ # Currently we dont have e2fsck compiled. So fs check would failed. # -/dev/block/bootdevice/by-name/system /system ext4 ro,barrier=1,discard wait -/dev/block/bootdevice/by-name/userdata /data ext4 nosuid,nodev,barrier=1,noauto_da_alloc,discard wait,check -/devices/soc/74a4900.sdhci/mmc_host* /storage/sdcard1 vfat nosuid,nodev wait,voldmanaged=sdcard1:auto,encryptable=footer +#/dev/block/bootdevice/by-name/system /system ext4 ro,barrier=1,discard wait +#/dev/block/bootdevice/by-name/userdata /data ext4 nosuid,nodev,barrier=1,noauto_da_alloc,discard wait,check +#/dev/block/platform/soc/624000.ufshc/by-name/system /system squashfs ro +/dev/block/platform/soc/624000.ufshc/by-name/system /system ext4 ro,barrier=1,discard wait +/dev/block/platform/soc/624000.ufshc/by-name/userdata /data ext4 nosuid,nodev,barrier=1,noauto_da_alloc,discard wait,check +#/devices/soc/74a4900.sdhci/mmc_host* /storage/sdcard1 vfat nosuid,nodev wait,voldmanaged=sdcard1:auto,encryptable=footer /dev/block/zram0 none swap defaults zramsize=536870912 diff --git a/init.target.rc b/init.target.rc index 16624377..f48741c1 100644 --- a/init.target.rc +++ b/init.target.rc @@ -35,11 +35,11 @@ on early-init symlink /data/tombstones /tombstones mkdir /dsp 0771 media media -on post-fs - export LD_PRELOAD libNimsWrap.so +#on post-fs +# export LD_PRELOAD libNimsWrap.so on fs - wait /dev/block/bootdevice +# wait /dev/block/bootdevice mount_all fstab.qcom swapon_all fstab.qcom @@ -47,28 +47,28 @@ on fs # these partition flashed on the device. Failure to mount any partition in fstab file # results in failure to launch late-start class. - wait /dev/block/bootdevice/by-name/cache - mount ext4 /dev/block/bootdevice/by-name/cache /cache nosuid nodev barrier=1 + wait /dev/block/platform/soc/624000.ufshc/sda18 # /dev/block/bootdevice/by-name/cache + mount ext4 /dev/block/platform/soc/624000.ufshc/by-name/cache /cache nosuid nodev barrier=1 - wait /dev/block/bootdevice/by-name/persist - mount ext4 /dev/block/bootdevice/by-name/persist /persist nosuid nodev barrier=1 + wait /dev/block/platform/soc/624000.ufshc/sda8 # /dev/block/bootdevice/by-name/persist + mount ext4 /dev/block/platform/soc/624000.ufshc/by-name/persist /persist nosuid nodev barrier=1 restorecon_recursive /persist mkdir /persist/data 0700 system system - wait /dev/block/bootdevice/by-name/dsp - mount ext4 /dev/block/bootdevice/by-name/dsp /dsp nosuid nodev barrier=1 + wait /dev/block/platform/soc/624000.ufshc/sda17 # /dev/block/bootdevice/by-name/dsp + mount ext4 /dev/block/platform/soc/624000.ufshc/by-name/dsp /dsp nosuid nodev barrier=1 restorecon_recursive /dsp - wait /dev/block/bootdevice/by-name/radio - mount vfat /dev/block/bootdevice/by-name/radio /firmware/radio ro shortname=lower,uid=1000,gid=1000,dmask=227,fmask=337,context=u:object_r:firmware_file:s0 + wait /dev/block/platform/soc/624000.ufshc/sdd27 # /dev/block/bootdevice/by-name/radio + mount vfat /dev/block/platform/soc/624000.ufshc/by-name/radio /firmware/radio ro shortname=lower,uid=1000,gid=1000,dmask=227,fmask=337,context=u:object_r:firmware_file:s0 #HTC_AUD_START - wait /dev/block/bootdevice/by-name/adsp - mount vfat /dev/block/bootdevice/by-name/adsp /firmware/adsp ro shortname=lower,uid=1000,gid=1000,dmask=227,fmask=337,context=u:object_r:firmware_file:s0 + wait /dev/block/platform/soc/624000.ufshc/sdd28 # /dev/block/bootdevice/by-name/adsp + mount vfat /dev/block/platform/soc/624000.ufshc/by-name/adsp /firmware/adsp ro shortname=lower,uid=1000,gid=1000,dmask=227,fmask=337,context=u:object_r:firmware_file:s0 #HTC_AUD_END - wait /dev/block/bootdevice/by-name/bluetooth - mount vfat /dev/block/bootdevice/by-name/bluetooth /bt_firmware ro shortname=lower,uid=1002,gid=3002,dmask=227,fmask=337,context=u:object_r:bt_firmware_file:s0 +# wait /dev/block/platform/soc/624000.ufshc/by-name/bluetooth # /dev/block/bootdevice/by-name/bluetooth +# mount vfat /dev/block/platform/soc/624000.ufshc/by-name/bluetooth /bt_firmware ro shortname=lower,uid=1002,gid=3002,dmask=227,fmask=337,context=u:object_r:bt_firmware_file:s0 on post-fs-data mkdir /data/tombstones 0771 system system @@ -79,7 +79,6 @@ on post-fs-data mkdir /persist/data/sfs 0700 system system mkdir /persist/data/tz 0700 system system mkdir /data/misc/dts 0770 media audio - mkdir /data/usf 0700 system system mkdir /data/misc/tloc/ 0700 system drmrpc mkdir /data/misc/qvop 0660 system system mkdir /data/misc/audio_pp 0771 media audio @@ -98,6 +97,9 @@ on boot write /proc/sys/kernel/sched_boost 1 write /sys/devices/soc/75ba000.i2c/i2c-12/12-0020/input/input0/update_fw 1 + chmod 0664 /sys/devices/virtual/graphics/fb0/msm_cmd_autorefresh_en + chown system graphics /sys/devices/virtual/graphics/fb0/msm_cmd_autorefresh_en + # I2C tool chown system system /sys/class/htc_sensorhub/sensor_hub/mcu_wakeup chmod 664 /sys/class/htc_sensorhub/sensor_hub/mcu_wakeup @@ -237,70 +239,6 @@ service audiod /system/bin/audiod user system group system - -service usf_tester /system/bin/usf_tester - user system - group system inet - disabled - oneshot - -service usf_epos /system/bin/usf_epos - class main - user system - group system inet - disabled - oneshot - -service usf_gesture /system/bin/usf_gesture - user system - group system inet - disabled - oneshot - -service usf_sync_gesture /system/bin/usf_sync_gesture - user system - group system inet audio - disabled - oneshot - -service usf_p2p /system/bin/usf_p2p - user system - group system inet - disabled - oneshot - -service usf_hovering /system/bin/usf_hovering - user system - group system inet - disabled - oneshot - -service usf_proximity /system/bin/usf_proximity - class late_start - user system - group system inet audio - -service usf_pairing /system/bin/usf_pairing - user system - group system inet - disabled - oneshot - -service usf_sw_calib /system/bin/usf_sw_calib - user system - group system inet - disabled - oneshot - -service usf-post-boot /system/bin/sh /system/etc/usf_post_boot.sh - class late_start - user root - disabled - oneshot - -on property:init.svc.bootanim=stopped - start usf-post-boot - service imsqmidaemon /system/bin/imsqmidaemon class main user system diff --git a/marlin/BoardConfig.mk b/marlin/BoardConfig.mk index 14765b58..da81e920 100644 --- a/marlin/BoardConfig.mk +++ b/marlin/BoardConfig.mk @@ -82,7 +82,10 @@ OVERRIDE_RS_DRIVER:= libRSDriver_adreno.so TARGET_USERIMAGES_USE_EXT4 := true BOARD_BOOTIMAGE_PARTITION_SIZE := 0x04000000 BOARD_RECOVERYIMAGE_PARTITION_SIZE := 0x04000000 -BOARD_SYSTEMIMAGE_PARTITION_SIZE := 3221225472 +BOARD_SYSTEMIMAGE_PARTITION_SIZE := 2457600000 +#BOARD_SYSTEMIMAGE_FILE_SYSTEM_TYPE := squashfs +#BOARD_SYSTEMIMAGE_JOURNAL_SIZE := 0 +#BOARD_SYSTEMIMAGE_SQUASHFS_COMPRESSOR := lz4 BOARD_USERDATAIMAGE_PARTITION_SIZE := 10737418240 BOARD_CACHEIMAGE_PARTITION_SIZE := 268435456 BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := ext4 @@ -96,7 +99,7 @@ ifneq ($(TARGET_USES_AOSP),true) TARGET_USES_QCOM_BSP := true endif -BOARD_KERNEL_CMDLINE := console=ttyHSL0,115200,n8 androidboot.console=ttyHSL0 androidboot.hardware=qcom user_debug=31 msm_rtb.filter=0x237 ehci-hcd.park=3 lpm_levels.sleep_disabled=1 cma=16M@0-0xffffffff +BOARD_KERNEL_CMDLINE := console=ttyHSL0,115200,n8 androidboot.console=ttyHSL0 androidboot.hardware=qcom user_debug=31 msm_rtb.filter=0x237 ehci-hcd.park=3 lpm_levels.sleep_disabled=1 cma=16M@0-0xffffffff androidboot.selinux=permissive BOARD_EGL_CFG := device/google/marlin/egl.cfg BOARD_KERNEL_SEPARATED_DT := true @@ -135,17 +138,20 @@ TARGET_PD_SERVICE_ENABLED := true BOARD_QTI_CAMERA_32BIT_ONLY := true TARGET_BOOTIMG_SIGNED := true -# Enable dex pre-opt to speed up initial boot -ifeq ($(HOST_OS),linux) - ifeq ($(WITH_DEXPREOPT),) - WITH_DEXPREOPT := true - WITH_DEXPREOPT_PIC := true - ifneq ($(TARGET_BUILD_VARIANT),user) - # Retain classes.dex in APK's for non-user builds - DEX_PREOPT_DEFAULT := nostripping - endif - endif -endif +WITH_DEXPREOPT_BOOT_IMG_ONLY := true +WITH_DEXPREOPT := false +WITH_DEXPREOPT_PIC := false +## Enable dex pre-opt to speed up initial boot +#ifeq ($(HOST_OS),linux) +# ifeq ($(WITH_DEXPREOPT),) +# WITH_DEXPREOPT := true +# WITH_DEXPREOPT_PIC := true +# ifneq ($(TARGET_BUILD_VARIANT),user) +# # Retain classes.dex in APK's for non-user builds +# DEX_PREOPT_DEFAULT := nostripping +# endif +# endif +#endif # Enable sensor multi HAL USE_SENSOR_MULTI_HAL := true @@ -153,7 +159,7 @@ USE_SENSOR_MULTI_HAL := true # HTC_SENSOR_HUB LIBHTC_SENSORHUB_PROJECT := g_project -TARGET_LDPRELOAD := libNimsWrap.so +#TARGET_LDPRELOAD := libNimsWrap.so # TARGET_COMPILE_WITH_MSM_KERNEL := true diff --git a/sailfish/BoardConfig.mk b/sailfish/BoardConfig.mk index 647c102d..8d94422c 100644 --- a/sailfish/BoardConfig.mk +++ b/sailfish/BoardConfig.mk @@ -96,7 +96,7 @@ ifneq ($(TARGET_USES_AOSP),true) TARGET_USES_QCOM_BSP := true endif -BOARD_KERNEL_CMDLINE := console=ttyHSL0,115200,n8 androidboot.console=ttyHSL0 androidboot.hardware=qcom user_debug=31 msm_rtb.filter=0x237 ehci-hcd.park=3 lpm_levels.sleep_disabled=1 cma=16M@0-0xffffffff +BOARD_KERNEL_CMDLINE := console=ttyHSL0,115200,n8 androidboot.console=ttyHSL0 androidboot.hardware=qcom user_debug=31 msm_rtb.filter=0x237 ehci-hcd.park=3 lpm_levels.sleep_disabled=1 cma=16M@0-0xffffffff androidboot.selinux=permissive BOARD_EGL_CFG := device/google/marlin/egl.cfg BOARD_KERNEL_SEPARATED_DT := true @@ -153,7 +153,7 @@ USE_SENSOR_MULTI_HAL := true # HTC_SENSOR_HUB LIBHTC_SENSORHUB_PROJECT := g_project -TARGET_LDPRELOAD := libNimsWrap.so +#TARGET_LDPRELOAD := libNimsWrap.so # TARGET_COMPILE_WITH_MSM_KERNEL := true diff --git a/common/sec_config b/sec_config similarity index 100% rename from common/sec_config rename to sec_config diff --git a/common/rootdir/etc/ueventd.qcom.rc b/ueventd.common.rc similarity index 100% rename from common/rootdir/etc/ueventd.qcom.rc rename to ueventd.common.rc diff --git a/usf_post_boot.sh b/usf_post_boot.sh deleted file mode 100644 index 9a9d8af9..00000000 --- a/usf_post_boot.sh +++ /dev/null @@ -1,82 +0,0 @@ -#!/system/bin/sh -# Copyright (c) 2011-2013, The Linux Foundation. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# * Neither the name of The Linux Foundation nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED -# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT -# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS -# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# -# - -dir0=/data/usf -pcm_ind_file=$dir0/pcm_inds.txt -pcm_file=/proc/asound/pcm - -tx_rx_patterns=(tx2- rx2-) -dev_ids=("0" "0") -cards=("0" "0") -found_num=0 - -# Run usf_settings script -if [ -f /system/etc/usf_settings.sh ]; then - /system/bin/sh /system/etc/usf_settings.sh -fi - -while read pcm_entry; do - for i in 0 1; do - echo $pcm_entry - id="${pcm_entry##*"${tx_rx_patterns[$i]}"}" - case "$pcm_entry" in - "$id") - ;; - - *) - cards[$i]=${pcm_entry:0:2} - dev_ids[$i]=${pcm_entry:3:2} - found_num=$(( $found_num + 1)) - i=2 - ;; - esac - - case $i in - 2) - break - ;; - esac - done - - case $found_num in - 2) - break - ;; - esac - -done < $pcm_file - -echo ${dev_ids[0]}" "${dev_ids[1]}" "${cards[0]}" "${cards[1]}>$pcm_ind_file -chmod 0644 $pcm_ind_file - -# Post-boot start of selected USF based calculators -for i in $(cat $dir0/auto_start.txt); do - start $i -done diff --git a/usf_settings.sh b/usf_settings.sh deleted file mode 100644 index c892201c..00000000 --- a/usf_settings.sh +++ /dev/null @@ -1,101 +0,0 @@ -#!/system/bin/sh -# Copyright (c) 2015, The Linux Foundation. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# * Neither the name of The Linux Foundation nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED -# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT -# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS -# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# -# - -clean_copy_dir=/system/etc/usf -dir0=/data/usf -h_dir=$dir0/hovering -g_dir=$dir0/gesture -sg_dir=$dir0/sync_gesture -t_dir=$dir0/tester -e_dir=$dir0/epos -p2p_dir=$dir0/p2p -prox_dir=$dir0/proximity -pairing_dir=$dir0/pairing -sw_calib_dir=$dir0/sw_calib -ucm_dir=$dir0/ucm -mixer_dir=$dir0/mixer - -trigger_file=$dir0/form_factor.cfg - -if [ ! -e $trigger_file ]; then - # Configurations select upon the current platform - platform=`cat /sys/devices/soc0/hw_platform` - type="" - - case $platform in - "Liquid") - type="liquid" - ;; - "Fluid") - type="fluid" - ;; - "MTP") - type="mtp" - ;; - "Dragon") - type="dragon" - ;; - esac - - cp -r $clean_copy_dir/* $dir0 - - # The USF based calculators have system permissions - chown -R system $dir0 - - ln -s $dir0/form_factor_"$type".cfg $dir0/form_factor.cfg - ln -s $t_dir/cfg_"$type" $t_dir/cfg - ln -s $e_dir/cfg_"$type" $e_dir/cfg - ln -s $h_dir/cfg_"$type" $h_dir/cfg - ln -s $p2p_dir/cfg_"$type" $p2p_dir/cfg - ln -s $g_dir/cfg_"$type" $g_dir/cfg - ln -s $sg_dir/cfg_"$type" $sg_dir/cfg - ln -s $prox_dir/cfg_"$type" $prox_dir/cfg - ln -s $pairing_dir/cfg_"$type" $pairing_dir/cfg - ln -s $sw_calib_dir/cfg_"$type" $sw_calib_dir/cfg - - ln -s $e_dir/cfg/usf_epos_"$type".cfg $e_dir/usf_epos.cfg - ln -s $t_dir/cfg/usf_tester_epos_"$type".cfg $t_dir/usf_tester.cfg - ln -s $h_dir/cfg/usf_hovering_"$type".cfg $h_dir/usf_hovering.cfg - ln -s $p2p_dir/cfg/usf_p2p_"$type".cfg $p2p_dir/usf_p2p.cfg - ln -s $g_dir/cfg/usf_gesture_"$type".cfg $g_dir/usf_gesture.cfg - ln -s $sg_dir/cfg/usf_sync_gesture_"$type".cfg $sg_dir/usf_sync_gesture.cfg - ln -s $prox_dir/cfg/usf_proximity_"$type".cfg $prox_dir/usf_proximity.cfg - ln -s $pairing_dir/cfg/usf_pairing_"$type".cfg $pairing_dir/usf_pairing.cfg - ln -s $sw_calib_dir/cfg/usf_sw_calib_"$type".cfg $sw_calib_dir/usf_sw_calib.cfg - ln -s $sw_calib_dir/cfg/usf_sw_calib_tester_"$type".cfg $sw_calib_dir/usf_sw_calib_tester.cfg - - ln -s $e_dir/cfg/service_settings_"$type".xml $e_dir/service_settings.xml - - ln -s $mixer_dir/mixer_paths_"$type".xml $mixer_dir/mixer_paths.xml - -fi - -# Set enabled properties for daemon -setprop ro.qc.sdk.us.proximity 1 diff --git a/common/vendorsetup.sh b/vendorsetup.sh similarity index 100% rename from common/vendorsetup.sh rename to vendorsetup.sh diff --git a/whitelistedapps.xml b/whitelistedapps.xml deleted file mode 100644 index c4c7f7ce..00000000 --- a/whitelistedapps.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - -