Use elelinux method to fix GSM
This commit is contained in:
parent
3de6b49843
commit
4c1d2b6750
5 changed files with 183 additions and 23 deletions
|
@ -133,7 +133,7 @@ TARGET_NO_RPC := true
|
||||||
|
|
||||||
# Vendor Init
|
# Vendor Init
|
||||||
TARGET_UNIFIED_DEVICE := true
|
TARGET_UNIFIED_DEVICE := true
|
||||||
TARGET_INIT_VENDOR_LIB := libinit_msm
|
TARGET_INIT_VENDOR_LIB := libinit_klte
|
||||||
TARGET_LIBINIT_DEFINES_FILE := device/samsung/klte/init/init_klte.c
|
TARGET_LIBINIT_DEFINES_FILE := device/samsung/klte/init/init_klte.c
|
||||||
|
|
||||||
TARGET_RELEASETOOLS_EXTENSIONS := device/samsung/klte
|
TARGET_RELEASETOOLS_EXTENSIONS := device/samsung/klte
|
||||||
|
|
139
BoardConfig.mk~
Normal file
139
BoardConfig.mk~
Normal file
|
@ -0,0 +1,139 @@
|
||||||
|
# Copyright (C) 2009 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.
|
||||||
|
|
||||||
|
#
|
||||||
|
# This file sets variables that control the way modules are built
|
||||||
|
# thorughout the system. It should not be used to conditionally
|
||||||
|
# disable makefiles (the proper mechanism to control what gets
|
||||||
|
# included in a build is to use PRODUCT_PACKAGES in a product
|
||||||
|
# definition file).
|
||||||
|
#
|
||||||
|
|
||||||
|
# inherit from common msm8960
|
||||||
|
-include device/samsung/msm8960-common/BoardConfigCommon.mk
|
||||||
|
|
||||||
|
TARGET_SPECIFIC_HEADER_PATH := device/samsung/klte/include
|
||||||
|
|
||||||
|
# overrides msm8960
|
||||||
|
TARGET_BOARD_PLATFORM := msm8974
|
||||||
|
TARGET_BOARD_PLATFORM_GPU := qcom-adreno330
|
||||||
|
TARGET_BOOTLOADER_BOARD_NAME := MSM8974
|
||||||
|
|
||||||
|
# Kernel Configs
|
||||||
|
TARGET_KERNEL_SOURCE := kernel/samsung/klte
|
||||||
|
TARGET_KERNEL_CONFIG := msm8974_sec_defconfig
|
||||||
|
TARGET_KERNEL_SELINUX_CONFIG := selinux_defconfig
|
||||||
|
TARGET_KERNEL_VARIANT_CONFIG := msm8974pro_sec_klte_spr_defconfig
|
||||||
|
# Kernel
|
||||||
|
BOARD_KERNEL_CMDLINE := console=null androidboot.hardware=qcom user_debug=31 msm_rtb.filter=0x37 ehci-hcd.park=3
|
||||||
|
BOARD_KERNEL_BASE := 0x00000000
|
||||||
|
BOARD_KERNEL_PAGESIZE := 2048
|
||||||
|
BOARD_MKBOOTIMG_ARGS := --ramdisk_offset 0x02000000 --tags_offset 0x01e00000
|
||||||
|
BOARD_KERNEL_SEPARATED_DT := true
|
||||||
|
BOARD_CUSTOM_BOOTIMG_MK := device/samsung/klte/mkbootimg.mk
|
||||||
|
|
||||||
|
# Graphics
|
||||||
|
BOARD_EGL_CFG := device/samsung/klte/egl.cfg
|
||||||
|
|
||||||
|
# Recovery
|
||||||
|
TARGET_RECOVERY_PIXEL_FORMAT := "RGBX_8888"
|
||||||
|
BOARD_CUSTOM_RECOVERY_KEYMAPPING := ../../device/samsung/klte/recovery/recovery_keys.c
|
||||||
|
BOARD_USE_CUSTOM_RECOVERY_FONT := \"roboto_23x41.h\"
|
||||||
|
BOARD_USES_MMCUTILS := true
|
||||||
|
BOARD_HAS_LARGE_FILESYSTEM := true
|
||||||
|
BOARD_HAS_NO_MISC_PARTITION := true
|
||||||
|
BOARD_HAS_NO_SELECT_BUTTON := true
|
||||||
|
TARGET_RECOVERY_FSTAB := device/samsung/klte/rootdir/etc/fstab.qcom
|
||||||
|
|
||||||
|
TARGET_USERIMAGES_USE_EXT4 := true
|
||||||
|
BOARD_BOOTIMAGE_PARTITION_SIZE := 11534336
|
||||||
|
BOARD_RECOVERYIMAGE_PARTITION_SIZE := 13631488
|
||||||
|
BOARD_SYSTEMIMAGE_PARTITION_SIZE := 1572864000
|
||||||
|
BOARD_USERDATAIMAGE_PARTITION_SIZE := 28651290624
|
||||||
|
BOARD_FLASH_BLOCK_SIZE := 131072
|
||||||
|
|
||||||
|
BOARD_RECOVERY_SWIPE := true
|
||||||
|
|
||||||
|
# bluetooth
|
||||||
|
BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := device/samsung/klte/bluetooth
|
||||||
|
BOARD_BLUEDROID_VENDOR_CONF := device/samsung/klte/bluetooth/vnd_klte.txt
|
||||||
|
BOARD_BLUETOOTH_USES_HCIATTACH_PROPERTY := false
|
||||||
|
|
||||||
|
# NFC
|
||||||
|
BOARD_NFC_HAL_SUFFIX := msm8974
|
||||||
|
|
||||||
|
# Samsung's nonstandard csd-client
|
||||||
|
BOARD_HAVE_NEW_QCOM_CSDCLIENT := true
|
||||||
|
|
||||||
|
# QCOM support
|
||||||
|
BOARD_USES_QCOM_HARDWARE := true
|
||||||
|
TARGET_QCOM_MEDIA_VARIANT := caf-new
|
||||||
|
TARGET_QCOM_DISPLAY_VARIANT := caf-new
|
||||||
|
BOARD_USES_LEGACY_ALSA_AUDIO :=
|
||||||
|
TARGET_QCOM_AUDIO_VARIANT := caf
|
||||||
|
TARGET_USES_QCOM_BSP := true
|
||||||
|
|
||||||
|
# Audio settings
|
||||||
|
BOARD_USES_CUSTOM_AUDIO_PLATFORM_PATH := device/samsung/klte/audio/platform
|
||||||
|
AUDIO_FEATURE_DISABLED_MULTI_VOICE_SESSIONS := true
|
||||||
|
AUDIO_FEATURE_DISABLED_FM := true
|
||||||
|
AUDIO_FEATURE_DISABLED_ANC_HEADSET := true
|
||||||
|
|
||||||
|
WIFI_DRIVER_FW_PATH_P2P :=
|
||||||
|
|
||||||
|
# Don't use qcom camera HAL
|
||||||
|
#USE_DEVICE_SPECIFIC_CAMERA := true
|
||||||
|
TARGET_PROVIDES_CAMERA_HAL_MSM8974 := true
|
||||||
|
TARGET_PROVIDES_CAMERA_HAL :=
|
||||||
|
|
||||||
|
# Build lights
|
||||||
|
TARGET_PROVIDES_LIBLIGHT := true
|
||||||
|
|
||||||
|
# Time services
|
||||||
|
BOARD_USES_QC_TIME_SERVICES := true
|
||||||
|
|
||||||
|
# Display
|
||||||
|
NUM_FRAMEBUFFER_SURFACE_BUFFERS := 3
|
||||||
|
OVERRIDE_RS_DRIVER:= libRSDriver_adreno.so
|
||||||
|
TARGET_FORCE_HWC_FOR_VIRTUAL_DISPLAYS := true
|
||||||
|
|
||||||
|
# Shader cache config options
|
||||||
|
# Maximum size of the GLES Shaders that can be cached for reuse.
|
||||||
|
# Increase the size if shaders of size greater than 12KB are used.
|
||||||
|
MAX_EGL_CACHE_KEY_SIZE := 12*1024
|
||||||
|
|
||||||
|
# Maximum GLES shader cache size for each app to store the compiled shader
|
||||||
|
# binaries. Decrease the size if RAM or Flash Storage size is a limitation
|
||||||
|
# of the device.
|
||||||
|
MAX_EGL_CACHE_SIZE := 2048*1024
|
||||||
|
|
||||||
|
# Assert
|
||||||
|
TARGET_OTA_ASSERT_DEVICE := kltexx,kltespr,kltetmo,kltecan,klteatt,kltevzw,klte
|
||||||
|
|
||||||
|
# PowerHAL
|
||||||
|
TARGET_POWERHAL_VARIANT := qcom
|
||||||
|
TARGET_POWERHAL_SET_INTERACTIVE_EXT := device/samsung/klte/power/power_ext.c
|
||||||
|
|
||||||
|
# The "new" GPS is really the old GPS, override it.
|
||||||
|
BOARD_HAVE_NEW_QC_GPS :=
|
||||||
|
|
||||||
|
# We don't use old-ass RPC
|
||||||
|
TARGET_NO_RPC := true
|
||||||
|
|
||||||
|
# Vendor Init
|
||||||
|
TARGET_UNIFIED_DEVICE := true
|
||||||
|
TARGET_INIT_VENDOR_LIB := libinit_msm
|
||||||
|
TARGET_LIBINIT_DEFINES_FILE := device/samsung/klte/init/init_klte.c
|
||||||
|
|
||||||
|
TARGET_RELEASETOOLS_EXTENSIONS := device/samsung/klte
|
10
init/Android.mk
Normal file
10
init/Android.mk
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
LOCAL_PATH := $(call my-dir)
|
||||||
|
|
||||||
|
include $(CLEAR_VARS)
|
||||||
|
|
||||||
|
LOCAL_MODULE_TAGS := optional
|
||||||
|
LOCAL_C_INCLUDES := system/core/init
|
||||||
|
LOCAL_CFLAGS := -Wall -DANDROID_TARGET=\"$(TARGET_BOARD_PLATFORM)\"
|
||||||
|
LOCAL_SRC_FILES := init_klte.c
|
||||||
|
LOCAL_MODULE := libinit_klte
|
||||||
|
include $(BUILD_STATIC_LIBRARY)
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (c) 2013, The Linux Foundation. All rights reserved.
|
Copyright (c) 2014, The Linux Foundation. All rights reserved.
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without
|
Redistribution and use in source and binary forms, with or without
|
||||||
modification, are permitted provided that the following conditions are
|
modification, are permitted provided that the following conditions are
|
||||||
|
@ -34,8 +34,6 @@
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
|
|
||||||
#include "init_msm.h"
|
|
||||||
|
|
||||||
void init_msm_properties(unsigned long msm_id, unsigned long msm_ver, char *board_type)
|
void init_msm_properties(unsigned long msm_id, unsigned long msm_ver, char *board_type)
|
||||||
{
|
{
|
||||||
char platform[PROP_VALUE_MAX];
|
char platform[PROP_VALUE_MAX];
|
||||||
|
@ -56,43 +54,59 @@ void init_msm_properties(unsigned long msm_id, unsigned long msm_ver, char *boar
|
||||||
|
|
||||||
if (strstr(bootloader, "G900W8")) {
|
if (strstr(bootloader, "G900W8")) {
|
||||||
/* kltecan */
|
/* kltecan */
|
||||||
property_set("ro.build.fingerprint", "samsung/kltevl/kltecan:4.3/JSS15J/N900W8VLUBMJ4:user/release-keys");
|
gsm_properties();
|
||||||
property_set("ro.build.description", "kltevl-user 4.3 JSS15J N900W8VLUBMJ4 release-keys");property_set("ro.product.model", "SM-G900W8");
|
property_set("ro.build.fingerprint", "samsung/kltecan/klte:4.4.2/KOT49H/G900W8VLUBMJ4:user/release-keys");
|
||||||
|
property_set("ro.build.description", "kltecan-user 4.4.2 KOT49H G900W8VLUBMJ4 release-keys");
|
||||||
|
property_set("ro.product.model", "SM-G900W8");
|
||||||
property_set("ro.product.device", "kltecan");
|
property_set("ro.product.device", "kltecan");
|
||||||
property_set("ro.telephony.ril.v3", "newDialCode");
|
|
||||||
} else if (strstr(bootloader, "G900P")) {
|
} else if (strstr(bootloader, "G900P")) {
|
||||||
/* kltespr */
|
/* kltespr */
|
||||||
property_set("ro.build.fingerprint", "samsung/kltespr/kltespr:4.4.2/KOT49H/G900PVPU1ANCB:user/release-keys");
|
cdma_properties("1");
|
||||||
property_set("ro.build.description", "kltespr-user 4.4.2 KOT49H G900PVPU1ANCB release-keys");
|
property_set("ro.build.fingerprint", "samsung/kltespr/klte:4.4.2/KOT49H/G900PVPUBMJ4:user/release-keys");
|
||||||
|
property_set("ro.build.description", "kltespr-user 4.4.2 KOT49H G900PVPUBMJ4 release-keys");
|
||||||
property_set("ro.product.model", "SM-G900P");
|
property_set("ro.product.model", "SM-G900P");
|
||||||
property_set("ro.product.device", "kltespr");
|
property_set("ro.product.device", "kltespr");
|
||||||
property_set("ro.telephony.ril.v3", "newDriverCallU,newDialCode");
|
|
||||||
} else if (strstr(bootloader, "G900T")) {
|
} else if (strstr(bootloader, "G900T")) {
|
||||||
/* kltetmo */
|
/* kltetmo */
|
||||||
property_set("ro.build.fingerprint", "samsung/kltetmo/kltetmo:4.4.2/KOT49H/G900TUVU1ANCH:user/release-keys");
|
gsm_properties();
|
||||||
property_set("ro.build.description", "kltetmo-user 4.4.2 KOT49H G900TUVU1ANCH release-keys");
|
property_set("ro.build.fingerprint", "samsung/kltetmo/klte:4.4.2/KOT49H/G900TUVUBMI7:user/release-keys");
|
||||||
|
property_set("ro.build.description", "kltetmo-user 4.4.2 KOT49H G900TUVUBMI7 release-keys");
|
||||||
property_set("ro.product.model", "SM-G900T");
|
property_set("ro.product.model", "SM-G900T");
|
||||||
property_set("ro.product.device", "kltetmo");
|
property_set("ro.product.device", "kltetmo");
|
||||||
property_set("ro.telephony.ril.v3", "newDialCode");
|
|
||||||
} else if (strstr(bootloader, "G900V")) {
|
} else if (strstr(bootloader, "G900V")) {
|
||||||
/* hltevzw */
|
/* kltevzw */
|
||||||
property_set("ro.build.fingerprint", "Verizon/kltevzw/kltevzw:4.4.2/KOT49H/G900VVRU1ANCG:user/release-keys");
|
cdma_properties("1");
|
||||||
property_set("ro.build.description", "kltevzw-user 4.4.2 KOT49H G900VVRU1ANCG release-keys");
|
property_set("ro.build.fingerprint", "Verizon/kltevzw/klte:4.4.2/KOT49H/G900VOYUBMJ3:user/release-keys");
|
||||||
|
property_set("ro.build.description", "kltevzw-user 4.4.2 KOT49H G900VOYUBMJ3 release-keys");
|
||||||
property_set("ro.product.model", "SM-G900V");
|
property_set("ro.product.model", "SM-G900V");
|
||||||
property_set("ro.product.device", "hltevzw");
|
property_set("ro.product.device", "kltevzw");
|
||||||
property_set("ro.telephony.ril.v3", "newDriverCallU,newDialCode");
|
|
||||||
property_set("ro.telephony.default_cdma_sub", "0");
|
property_set("ro.telephony.default_cdma_sub", "0");
|
||||||
property_set("ro.cdma.home.operator.alpha", "Verizon");
|
property_set("ro.cdma.home.operator.alpha", "Verizon");
|
||||||
property_set("ro.cdma.home.operator.numeric", "311480");
|
property_set("ro.cdma.home.operator.numeric", "311480");
|
||||||
} else {
|
} else if (strstr(bootloader, "G900F")) {
|
||||||
/* kltexx */
|
/* kltexx */
|
||||||
|
gsm_properties();
|
||||||
property_set("ro.build.fingerprint", "samsung/kltexx/klte:4.4.2/KOT49H/G900FXXU1ANCE:user/release-keys");
|
property_set("ro.build.fingerprint", "samsung/kltexx/klte:4.4.2/KOT49H/G900FXXU1ANCE:user/release-keys");
|
||||||
property_set("ro.build.description", "kltexx-user 4.4.2 KOT49H G900FXXU1ANCE release-keys");
|
property_set("ro.build.description", "kltexx-user 4.4.2 KOT49H G900FXXU1ANCE release-keys");
|
||||||
property_set("ro.product.model", "SM-G900F");
|
property_set("ro.product.model", "SM-G900F");
|
||||||
property_set("ro.product.device", "kltexx");
|
property_set("ro.product.device", "kltexx");
|
||||||
property_set("ro.telephony.ril.v3", "newDialCode");
|
|
||||||
}
|
}
|
||||||
property_get("ro.product.device", device);
|
property_get("ro.product.device", device);
|
||||||
strlcpy(devicename, device, sizeof(devicename));
|
strlcpy(devicename, device, sizeof(devicename));
|
||||||
ERROR("Found bootloader id %s setting build properties for %s device\n", bootloader, devicename);
|
ERROR("Found bootloader id %s setting build properties for %s device\n", bootloader, devicename);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void gsm_properties()
|
||||||
|
{
|
||||||
|
property_set("telephony.lteOnGsmDevice", "1");
|
||||||
|
property_set("ro.telephony.default_network", "9");
|
||||||
|
}
|
||||||
|
|
||||||
|
void cdma_properties(char cdma_sub[])
|
||||||
|
{
|
||||||
|
property_set("ro.telephony.default_cdma_sub", cdma_sub); // 0: RUIM/SIM 1: NV
|
||||||
|
property_set("ro.gps.set_privacy", "1");
|
||||||
|
property_set("ro.telephony.ril.v3", "newDriverCallU");
|
||||||
|
property_set("telephony.lteOnCdmaDevice", "1");
|
||||||
|
property_set("ro.telephony.default_network", "10");
|
||||||
|
}
|
||||||
|
|
|
@ -1,7 +1,4 @@
|
||||||
rild.libargs=-d /dev/smd0
|
rild.libargs=-d /dev/smd0
|
||||||
telephony.lteOnCdmaDevice=1
|
|
||||||
ro.telephony.default_network=10
|
|
||||||
persist.radio.mode_pref_nv10=1
|
|
||||||
|
|
||||||
ro.qc.sdk.izat.premium_enabled=0
|
ro.qc.sdk.izat.premium_enabled=0
|
||||||
ro.qc.sdk.izat.service_mask=0x0
|
ro.qc.sdk.izat.service_mask=0x0
|
||||||
|
|
Loading…
Reference in a new issue