Skip to content

Commit

Permalink
Unified device tree for falcon (Moto G)
Browse files Browse the repository at this point in the history
Change-Id: I73f3358f49709527a568f157487d67d470fb60ee
  • Loading branch information
dhacker29 committed Jan 30, 2014
1 parent a05a700 commit a1ba166
Show file tree
Hide file tree
Showing 12 changed files with 129 additions and 60 deletions.
2 changes: 1 addition & 1 deletion AndroidBoard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ include $(CLEAR_VARS)
ALL_PREBUILT += $(INSTALLED_KERNEL_TARGET)

# include the non-open-source counterpart to this file
-include vendor/motorola/xt1034/AndroidBoardVendor.mk
-include vendor/motorola/falcon/AndroidBoardVendor.mk
2 changes: 1 addition & 1 deletion AndroidProducts.mk
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
# limitations under the License.

PRODUCT_MAKEFILES := \
$(LOCAL_DIR)/full_xt1034.mk
$(LOCAL_DIR)/full_falcon.mk
8 changes: 6 additions & 2 deletions BoardConfig.mk
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,13 @@
-include device/motorola/msm8226-common/BoardConfigCommon.mk

# inherit from the proprietary version
-include vendor/motorola/xt1034/BoardConfigVendor.mk
-include vendor/motorola/falcon/BoardConfigVendor.mk

LOCAL_PATH := device/motorola/xt1034
LOCAL_PATH := device/motorola/falcon

# Vendor Init
TARGET_INIT_VENDOR_LIB := libinit_msm
TARGET_LIBINIT_DEFINES_FILE := device/motorola/falcon/init/init_falcon.c

#bluetooth
BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := $(LOCAL_PATH)/bluetooth
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Device configuration for the Moto G (XT1034) (falcon_umts) (Retail US)
Universal device configuration for the Moto G (falcon)
===============================

Copyright 2013 - The CyanogenMod Project
2 changes: 1 addition & 1 deletion bluetooth/bdroid_buildcfg.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#ifndef _BDROID_BUILDCFG_H
#define _BDROID_BUILDCFG_H

#define BTM_DEF_LOCAL_NAME "Moto G - XT1034"
#define BTM_DEF_LOCAL_NAME "Moto G"
#define BTA_DISABLE_DELAY 1000 /* in milliseconds */
#define BLUETOOTH_QCOM_SW TRUE
#define BLUETOOTH_QCOM_LE_INTL_SCAN TRUE
Expand Down
10 changes: 2 additions & 8 deletions cm.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,6 @@ TARGET_SCREEN_HEIGHT := 1280

# Release name
PRODUCT_RELEASE_NAME := MOTO G
PRODUCT_NAME := cm_xt1034
PRODUCT_NAME := cm_falcon

$(call inherit-product, device/motorola/xt1034/full_xt1034.mk)

PRODUCT_BUILD_PROP_OVERRIDES += \
PRODUCT_BRAND=motorola \
PRODUCT_NAME=XT1034 \
BUILD_PRODUCT=falcon_umts \
BUILD_FINGERPRINT=motorola/falcon_retuaws/falcon_umts:4.4.2/KXB20.9-1.8-1.4/4:user/release-keys
$(call inherit-product, device/motorola/falcon/full_falcon.mk)
17 changes: 8 additions & 9 deletions device_xt1034.mk → device_falcon.mk
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,23 @@ $(call inherit-product, $(SRC_TARGET_DIR)/product/languages_full.mk)

$(call inherit-product, device/motorola/msm8226-common/msm8226.mk)

LOCAL_PATH := device/motorola/xt1034
LOCAL_PATH := device/motorola/falcon

# xt1053 specific overlay
# falcon specific overlay
DEVICE_PACKAGE_OVERLAYS += $(LOCAL_PATH)/overlay

PRODUCT_LOCALES := en_US
PRODUCT_LOCALES += xhdpi
PRODUCT_AAPT_CONFIG := normal hdpi xhdpi
PRODUCT_AAPT_PREF_CONFIG := xhdpi

#telephony
# CDMA, GSM/WCDMA
PRODUCT_PROPERTY_OVERRIDES += \
telephony.lteOnGsmDevice=0 \
telephony.lteOnCdmaDevice=0 \
ro.telephony.default_network=3 \
ro.telephony.default_network=5 \
telephony.lteOnCdmaDevice=1 \
persist.radio.mode_pref_nv10=1 \
persist.radio.no_wait_for_card=1 \
persist.radio.dfr_mode_set=1 \
ro.mot.build.customerid=retusa_aws
persist.radio.dfr_mode_set=1

$(call inherit-product, device/motorola/msm8226-common/keylayout/keylayout.mk)
$(call inherit-product, vendor/motorola/xt1034/xt1034-vendor.mk)
$(call inherit-product, vendor/motorola/falcon/falcon-vendor.mk)
2 changes: 1 addition & 1 deletion extract-files.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

export VENDOR=motorola
export DEVICE=xt1034
export DEVICE=falcon

../msm8226-common/extract-files.sh $@
12 changes: 6 additions & 6 deletions full_xt1034.mk → full_falcon.mk
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,21 @@

#
# This file is the build configuration for a full Android
# build for xt1034 hardware. This cleanly combines a set of
# build for falcon hardware. This cleanly combines a set of
# device-specific aspects (drivers) with a device-agnostic
# product configuration (apps). Except for a few implementation
# details, it only fundamentally contains two inherit-product
# lines, full and xt1034, hence its name.
# lines, full and falcon, hence its name.
#

# Inherit from those products. Most specific first.
$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base_telephony.mk)
# Inherit from xt1034 device
$(call inherit-product, device/motorola/xt1034/device_xt1034.mk)
$(call inherit-product, device/motorola/falcon/device_falcon.mk)

## Device identifier. This must come after all inclusions
PRODUCT_DEVICE := xt1034
PRODUCT_NAME := full_xt1034
PRODUCT_DEVICE := falcon
PRODUCT_NAME := full_falcon
PRODUCT_BRAND := motorola
PRODUCT_MODEL := XT1034
PRODUCT_MODEL := falcon
PRODUCT_MANUFACTURER := motorola
101 changes: 101 additions & 0 deletions init/init_falcon.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
/*
Copyright (c) 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.
*/

#include <stdlib.h>

#include "vendor_init.h"
#include "property_service.h"
#include "log.h"
#include "util.h"

#include "init_msm.h"

void init_msm_properties(unsigned long msm_id, unsigned long msm_ver, char *board_type)
{
char platform[PROP_VALUE_MAX];
char radio[PROP_VALUE_MAX];
int rc;

UNUSED(msm_id);
UNUSED(msm_ver);
UNUSED(board_type);

rc = property_get("ro.board.platform", platform);
if (!rc || !ISMATCH(platform, ANDROID_TARGET))
return;

property_get("ro.boot.radio", radio);
if (ISMATCH(radio, "0x1")) {
/* xt1032 */
property_set("ro.product.device", "falcon_umts");
property_set("ro.product.model", "Moto G");
property_set("ro.build.description", "falcon_retgb-user 4.3 14.10.0Q3.X-76-LGG-8 54 release-keys");
property_set("ro.build.fingerprint", "motorola/falcon_retgb/falcon_umts:4.3/14.10.0Q3.X-76-LGG-8/54:user/release-keys");
property_set("ro.mot.build.customerid ","RTGB");
property_set("persist.radio.multisim.config", "");
} else if (ISMATCH(radio, "0x3")) {
/* cdma xt1028 */
property_set("ro.product.device", "falcon_cdma");
property_set("ro.product.model", "Moto G");
property_set("ro.build.description", "falcon_verizon-user 4.3 14.10.0Q3.X-84-14 16 release-keys");
property_set("ro.build.fingerprint", "motorola/falcon_verizon/falcon_cdma:4.3/14.10.0Q3.X-84-14/16:user/release-keys");
property_set("persist.radio.multisim.config", "");
property_set("ro.mot.build.customerid ","verizon");
property_set("ro.telephony.gsm-routes-us-smsc", "1");
property_set("persist.radio.vrte_logic", "2");
property_set("persist.radio.0x9e_not_callname", "1");
property_set("persist.radio.skip_data_check", "1");
property_set("persist.ril.max.crit.qmi.fails", "4");
property_set("ro.cdma.home.operator.isnan", "1");
property_set("ro.cdma.otaspnumschema","SELC,1,80,99");
property_set("ro.cdma.data_retry_config", "max_retries=infinite,0,0,10000,10000,100000,10000,10000,10000,10000,140000,540000,960000");
property_set("ro.gsm.data_retry_config", "default_randomization=2000,max_retries=infinite,1000,1000,80000,125000,485000,905000");
property_set("ro.com.google.clientidbase.ms", "android-verizon");
property_set("ro.com.google.clientidbase.am", "android-verizon");
property_set("ro.com.google.clientidbase.yt", "android-verizon");
} else if (ISMATCH(radio, "0x5")) {
/* xt1033 */
property_set("ro.product.device", "falcon_umtsds");
property_set("ro.product.model", "Moto G");
property_set("ro.build.description", "falcon_retbr_ds-user 4.3 14.10.0Q3.X-76-LCG-8 60 release-keys");
property_set("ro.build.fingerprint", "motorola/falcon_retbr_ds/falcon_umtsds:4.3/14.10.0Q3.X-76-LCG-8/60:user/release-keys");
property_set("ro.mot.build.customerid ","RETBR");
property_set("persist.radio.multisim.config", "dsds");
property_set("persist.radio.dont_use_dsd", "true");
} else if (ISMATCH(radio, "0x6")) {
/* xt1034 */
property_set("ro.product.device", "falcon_umts");
property_set("ro.product.model", "Moto G");
property_set("ro.build.description", "falcon_retuaws-user 4.4.2 KXB20.9-1.8-1.4 4 release-keys");
property_set("ro.build.fingerprint", "motorola/falcon_retuaws/falcon_umts:4.4.2/KXB20.9-1.8-1.4/4:user/release-keys");
property_set("ro.mot.build.customerid ","retusa_aws");
property_set("persist.radio.multisim.config", "");
}
ERROR("Found radio=%s setting build properties\n", radio);
}
29 changes: 0 additions & 29 deletions overlay/frameworks/base/core/res/res/values/config.xml

This file was deleted.

2 changes: 1 addition & 1 deletion vendorsetup.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
add_lunch_combo cm_xt1034-userdebug
add_lunch_combo cm_falcon-userdebug

0 comments on commit a1ba166

Please sign in to comment.