-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
inital commit for w5, universal for d320 d325
- Loading branch information
0 parents
commit 774c376
Showing
23 changed files
with
2,308 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
LOCAL_PATH := $(call my-dir) | ||
|
||
include $(CLEAR_VARS) | ||
|
||
# include the non-open-source counterpart to this file | ||
-include vendor/lge/w3ds/AndroidBoardVendor.mk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
PRODUCT_MAKEFILES := \ | ||
$(LOCAL_DIR)/full_w5.mk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# | ||
# Copyright (C) 2014 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). | ||
# | ||
|
||
-include device/lge/msm8610-common/BoardConfigCommon.mk | ||
|
||
TARGET_KERNEL_CONFIG := w5_global_com_defconfig | ||
BOARD_CUSTOM_BOOTIMG_MK := device/lge/w5/mkbootimg.mk | ||
|
||
TARGET_LIBINIT_DEFINES_FILE := device/lge/w5/init/init_w5.c | ||
|
||
DEVICE_RESOLUTION := 480x800 | ||
|
||
TARGET_OTA_ASSERT_DEVICE := w5,w5ds | ||
|
||
# Nfc | ||
BOARD_NFC_HAL_SUFFIX := w5 | ||
BOARD_NFC_CHIPSET := pn547 | ||
|
||
-include vendor/lge/w5/BoardConfigVendor.mk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
CyanogenMod 11.0 device configuration for LG L70 D320 D320n D325 | ||
|
||
How to build: | ||
------------- | ||
|
||
Initializing a Build Environment: | ||
|
||
https://source.android.com/source/initializing.html | ||
|
||
Initialize repo: | ||
|
||
repo init -u git://github.com/CyanogenMod/android.git -b cm-11.0 | ||
|
||
curl --create-dirs -L -o .repo/local_manifests/local_manifest.xml -O -L https://raw.githubusercontent.com/vm03/android_local_manifest/master/local_manifest.xml | ||
repo sync | ||
vendor/cm/get-prebuilts | ||
|
||
Compile: | ||
|
||
. build/envsetup.sh | ||
brunch cm_w5-userdebug |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
[ | ||
{ | ||
"repository": "android_device_qcom_common", | ||
"target_path": "device/qcom/common" | ||
}, | ||
{ | ||
"repository": "android_hardware_qcom_fm", | ||
"target_path": "hardware/qcom/fm" | ||
}, | ||
{ | ||
"repository": "android_hardware_qcom_display-caf-new", | ||
"target_path": "hardware/qcom/display-caf-new" | ||
}, | ||
{ | ||
"repository": "android_hardware_qcom_media-caf-new", | ||
"target_path": "hardware/qcom/media-caf-new" | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Inherit some common CM stuff. | ||
$(call inherit-product, vendor/cm/config/common_full_phone.mk) | ||
|
||
# Boot animation | ||
TARGET_SCREEN_WIDTH := 480 | ||
TARGET_SCREEN_HEIGHT := 800 | ||
|
||
# Release name | ||
PRODUCT_RELEASE_NAME := LG L70 | ||
PRODUCT_NAME := cm_w5 | ||
|
||
$(call inherit-product, device/lge/w5/full_w5.mk) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# | ||
# Copyright (C) 2013 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. | ||
# | ||
|
||
$(call inherit-product, frameworks/native/build/phone-hdpi-512-dalvik-heap.mk) | ||
|
||
$(call inherit-product, $(SRC_TARGET_DIR)/product/languages_full.mk) | ||
|
||
# Specific overlay | ||
DEVICE_PACKAGE_OVERLAYS += device/lge/w5/overlay | ||
|
||
PRODUCT_PACKAGES += Torch | ||
|
||
# NFC packages | ||
PRODUCT_PACKAGES += \ | ||
NfcNci \ | ||
Tag \ | ||
nfc_nci.w5 \ | ||
com.android.nfc_extras | ||
|
||
NFCEE_ACCESS_PATH := device/lge/w5/prebuilt/etc/nfcee_access.xml | ||
|
||
PRODUCT_PROPERTY_OVERRIDES += \ | ||
ro.sf.lcd_density=240 | ||
|
||
PRODUCT_COPY_FILES += \ | ||
device/lge/w5/mixer_paths.xml:system/etc/mixer_paths.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 \ | ||
frameworks/native/data/etc/com.android.nfc_extras.xml:system/etc/permissions/com.android.nfc_extras.xml \ | ||
device/lge/w5/prebuilt/etc/libnfc-brcm.conf:system/etc/libnfc-brcm.conf \ | ||
device/lge/w5/prebuilt/etc/nfc-nci.conf:system/etc/nfc-nci.conf \ | ||
device/lge/w5/prebuilt/etc/libnfc-nxp.conf:system/etc/libnfc-nxp.conf \ | ||
device/lge/w5/prebuilt/etc/nfcee_access.xml:system/etc/nfcee_access.xml \ | ||
device/lge/w5/prebuilt/etc/init.d/10nfc_checker:system/etc/init.d/10nfc_checker \ | ||
device/lge/w5/prebuilt/etc/init.d/11keys_checker:system/etc/init.d/11keys_checker \ | ||
device/lge/w5/prebuilt/usr/keylayout/gpio-keys_d320.kl:system/usr/keylayout/gpio-keys_d320.kl \ | ||
device/lge/w5/prebuilt/usr/keylayout/gpio-keys_d325.kl:system/usr/keylayout/gpio-keys_d325.kl | ||
|
||
PRODUCT_LOCALES := en_US | ||
PRODUCT_LOCALES += hdpi | ||
PRODUCT_AAPT_CONFIG := normal hdpi | ||
PRODUCT_AAPT_PREF_CONFIG := hdpi | ||
|
||
# Inherit from msm8610-common | ||
$(call inherit-product, device/lge/msm8610-common/msm8610.mk) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# | ||
# Copyright (C) 2014 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. | ||
# | ||
|
||
# Inherit from those products. Most specific first. | ||
$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base_telephony.mk) | ||
$(call inherit-product, device/lge/w5/device_w5.mk) | ||
|
||
## Device identifier. This must come after all inclusions | ||
PRODUCT_DEVICE := w5 | ||
PRODUCT_NAME := full_w5 | ||
PRODUCT_BRAND := lge | ||
PRODUCT_MODEL := w5 | ||
PRODUCT_MANUFACTURER := LGE | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
/* | ||
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. | ||
*/ | ||
|
||
#include <stdlib.h> | ||
#include <stdio.h> | ||
#include <string.h> | ||
|
||
#include "vendor_init.h" | ||
#include "property_service.h" | ||
#include "log.h" | ||
#include "util.h" | ||
|
||
#include "init_msm.h" | ||
|
||
#define CHUNK 2048 /* read 2048 bytes at a time */ | ||
|
||
int check_cmdline(char param[]) { | ||
|
||
char buf[CHUNK]; | ||
FILE *file; | ||
size_t nread; | ||
file = fopen("/proc/cmdline", "r"); | ||
if (file) { | ||
while ((nread = fread(buf, 1, sizeof buf, file)) > 0) { | ||
/* fwrite(buf, 1, nread, stdout); */ | ||
char delims[] = " "; | ||
char *word = NULL; | ||
word = strtok(buf, delims); | ||
|
||
while(word != NULL) { | ||
if (!strcmp(param,word)) { | ||
fclose(file); | ||
return 1; | ||
} | ||
word = strtok(NULL, delims); | ||
} | ||
} | ||
} | ||
fclose(file); | ||
return 0; | ||
} | ||
|
||
|
||
void init_msm_properties(unsigned long msm_id, unsigned long msm_ver, char *board_type) | ||
{ | ||
char serial[PROP_VALUE_MAX]; | ||
char device[PROP_VALUE_MAX]; | ||
char devicename[PROP_VALUE_MAX]; | ||
|
||
UNUSED(msm_id); | ||
UNUSED(msm_ver); | ||
UNUSED(board_type); | ||
|
||
property_get("ro.boot.serialno", serial); | ||
if (strncmp(serial, "LGD320", 6) == 0) { | ||
if (check_cmdline("model.name=LG-D320n") == 1) { | ||
property_set("ro.product.device", "w5"); | ||
property_set("ro.product.model", "LG-D320n"); | ||
property_set("ro.nfc.port", "I2C"); | ||
} else { | ||
property_set("ro.product.device", "w5"); | ||
property_set("ro.product.model", "LG-D320"); | ||
} | ||
property_set("ro.build.description", "w5_global_com-user 4.4.2 KOT49I.A1398228431 1398228431 release-keys"); | ||
property_set("ro.build.fingerprint", "lge/w5_global_com/w5:4.4.2/KOT49I.A1398228431/1398228431:user/release-keys"); | ||
property_set("persist.radio.multisim.config", ""); | ||
property_set("telephony.lteOnCdmaDevice", "0"); | ||
} else if (strncmp(serial, "LGD325", 6) == 0) { | ||
property_set("ro.product.device", "w5ds"); | ||
property_set("ro.product.model", "LG-D325"); | ||
property_set("ro.build.description", "w5ds_global_com-user 4.4.2 KOT49I.D41510c D41510c.1393916607 release-keys"); | ||
property_set("ro.build.fingerprint", "lge/w5ds_global_com-user/w5ds:4.4.2/KOT49I.D41510c/D41510c.1393916607:user/release-keys"); | ||
property_set("persist.radio.multisim.config", "dsds"); | ||
property_set("telephony.lteOnCdmaDevice", "0"); | ||
} else { | ||
/* XXX */ | ||
property_set("ro.product.device", "w5"); | ||
property_set("ro.product.model", "Please write your model name to [email protected]"); | ||
property_set("persist.radio.multisim.config", ""); | ||
property_set("telephony.lteOnCdmaDevice", "0"); | ||
} | ||
property_get("ro.product.device", device); | ||
strlcpy(devicename, device, sizeof(devicename)); | ||
ERROR("Found hardware id: %s setting build properties for %s device\n", serial, devicename); | ||
} |
Oops, something went wrong.