From 29622989009b285eb0b830a6ded852703fc76c3b Mon Sep 17 00:00:00 2001 From: Dan Pasanen Date: Fri, 15 Jul 2016 11:20:02 -0500 Subject: [PATCH 1/3] [HACK] m8: don't start rild until after boot completed * For whatever reason m8vzw (at least) won't boot with data somewhere around 75% of the time. Killing rild fixes the issue until another reboot. Fuck the race condition real hard and start rild way late. * By admitting that I'm not proud of this patch, I automatically absolve myself of any wrong-doing. Change-Id: I51661cafc1d5cd0108537329fb4bb14eb6469188 --- device.mk | 4 ++++ rootdir/Android.mk | 10 ++++++++++ rootdir/etc/init.variant.rc | 11 +++++++++++ 3 files changed, 25 insertions(+) create mode 100644 rootdir/Android.mk create mode 100644 rootdir/etc/init.variant.rc diff --git a/device.mk b/device.mk index ae790aef6..608f2ccf4 100644 --- a/device.mk +++ b/device.mk @@ -19,3 +19,7 @@ DEVICE_PACKAGE_OVERLAYS += device/htc/m8/overlay # Inherit from m8-common $(call inherit-product, device/htc/m8-common/m8-common.mk) + +# Init +PRODUCT_PACKAGES += \ + init.variant.rc diff --git a/rootdir/Android.mk b/rootdir/Android.mk new file mode 100644 index 000000000..51576ba2b --- /dev/null +++ b/rootdir/Android.mk @@ -0,0 +1,10 @@ +LOCAL_PATH:= $(call my-dir) +include $(CLEAR_VARS) + +include $(CLEAR_VARS) +LOCAL_MODULE := init.variant.rc +LOCAL_MODULE_TAGS := optional eng +LOCAL_MODULE_CLASS := ETC +LOCAL_SRC_FILES := etc/init.variant.rc +LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) +include $(BUILD_PREBUILT) diff --git a/rootdir/etc/init.variant.rc b/rootdir/etc/init.variant.rc new file mode 100644 index 000000000..6526c4d2c --- /dev/null +++ b/rootdir/etc/init.variant.rc @@ -0,0 +1,11 @@ +service_redefine ril-daemon /system/bin/rild + class main + socket rild stream 660 root radio + socket sap_uim_socket1 stream 660 bluetooth bluetooth + socket rild-debug stream 660 radio system + user root + group radio cache inet misc audio log qcom_diag + disabled + +on property:sys.boot_completed=1 + start ril-daemon From e0d4b6af84db1bd03b71fe7acf5039a320db5548 Mon Sep 17 00:00:00 2001 From: Bruno Martins Date: Sun, 17 Jul 2016 11:20:52 +0100 Subject: [PATCH 2/3] m8: Update extract files * In order to use the new generic extract utils in vendor/cm Change-Id: If033782bd20d11cbbb6d76ea8b643998ece58add --- extract-files.sh | 18 +++++++++++++++++- setup-makefiles.sh | 18 +++++++++++++++++- 2 files changed, 34 insertions(+), 2 deletions(-) diff --git a/extract-files.sh b/extract-files.sh index d5be19507..12e190959 100755 --- a/extract-files.sh +++ b/extract-files.sh @@ -1,8 +1,24 @@ #!/bin/bash +# +# Copyright (C) 2016 The CyanogenMod 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. +# set -e export DEVICE=m8 +export DEVICE_COMMON=m8-common export VENDOR=htc -./../m8-common/extract-files.sh $@ +./../$DEVICE_COMMON/extract-files.sh $@ diff --git a/setup-makefiles.sh b/setup-makefiles.sh index e986bc1bb..d22cc2c7b 100755 --- a/setup-makefiles.sh +++ b/setup-makefiles.sh @@ -1,8 +1,24 @@ #!/bin/bash +# +# Copyright (C) 2016 The CyanogenMod 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. +# set -e export DEVICE=m8 +export DEVICE_COMMON=m8-common export VENDOR=htc -./../m8-common/setup-makefiles.sh $@ +./../$DEVICE_COMMON/setup-makefiles.sh $@ From 974b883d39da4ef5a037286b247e53925f51ab31 Mon Sep 17 00:00:00 2001 From: Dan Pasanen Date: Mon, 18 Jul 2016 08:55:34 -0500 Subject: [PATCH 3/3] m8: de-commonize gps blobs/configs Change-Id: Ia24f89b3a5f960e1f3861f01949d80770b7a01fd --- device-proprietary-files.txt | 56 +++++++++++++++++++++++++++++------- 1 file changed, 45 insertions(+), 11 deletions(-) diff --git a/device-proprietary-files.txt b/device-proprietary-files.txt index 03f9532db..5ed494125 100644 --- a/device-proprietary-files.txt +++ b/device-proprietary-files.txt @@ -1,17 +1,51 @@ # Device-specific proprietary files # GPS -lib/hw/gps.default.so -lib/libgps.utils.so -lib/libloc_api_v02.so -lib/libloc_core.so -lib/libloc_ds_api.so -lib/libloc_eng.so -vendor/lib/hw/flp.default.so -vendor/lib/libflp.so -vendor/lib/libgeofence.so -vendor/lib/libizat_core.so -vendor/lib/liblbs_core.so +blobs/gsm/etc/flp.conf +blobs/gsm/etc/gps.conf +blobs/gsm/etc/izat.conf +blobs/gsm/etc/sap.conf +blobs/gsm/lib/hw/gps.default.so +blobs/gsm/lib/libgps.utils.so +blobs/gsm/lib/libloc_api_v02.so +blobs/gsm/lib/libloc_core.so +blobs/gsm/lib/libloc_ds_api.so +blobs/gsm/lib/libloc_eng.so +blobs/gsm/vendor/lib/hw/flp.default.so +blobs/gsm/vendor/lib/libflp.so +blobs/gsm/vendor/lib/libgeofence.so +blobs/gsm/vendor/lib/libizat_core.so +blobs/gsm/vendor/lib/liblbs_core.so +blobs/spr/etc/flp.conf +blobs/spr/etc/gps.conf +blobs/spr/etc/izat.conf +blobs/spr/etc/sap.conf +blobs/spr/lib/hw/gps.default.so +blobs/spr/lib/libgps.utils.so +blobs/spr/lib/libloc_api_v02.so +blobs/spr/lib/libloc_core.so +blobs/spr/lib/libloc_ds_api.so +blobs/spr/lib/libloc_eng.so +blobs/spr/vendor/lib/hw/flp.default.so +blobs/spr/vendor/lib/libflp.so +blobs/spr/vendor/lib/libgeofence.so +blobs/spr/vendor/lib/libizat_core.so +blobs/spr/vendor/lib/liblbs_core.so +blobs/vzw/etc/flp.conf +blobs/vzw/etc/gps.conf +blobs/vzw/etc/izat.conf +blobs/vzw/etc/sap.conf +blobs/vzw/lib/hw/gps.default.so +blobs/vzw/lib/libgps.utils.so +blobs/vzw/lib/libloc_api_v02.so +blobs/vzw/lib/libloc_core.so +blobs/vzw/lib/libloc_ds_api.so +blobs/vzw/lib/libloc_eng.so +blobs/vzw/vendor/lib/hw/flp.default.so +blobs/vzw/vendor/lib/libflp.so +blobs/vzw/vendor/lib/libgeofence.so +blobs/vzw/vendor/lib/libizat_core.so +blobs/vzw/vendor/lib/liblbs_core.so # QMI bin/irsc_util