diff options
| author | TheStrix <parthbhatia98@gmail.com> | 2016-11-03 14:02:35 +0530 |
|---|---|---|
| committer | TheStrix <parthbhatia98@gmail.com> | 2016-11-20 13:37:12 +0530 |
| commit | 249c273e1a3601406d38e441d0786dd4bd1be638 (patch) | |
| tree | ac001fea26052474a8d47c7365a1494059dae770 | |
| parent | e4b6e2afd010ab0dc6c73ac26e999d780886afbe (diff) | |
hydrogen: Initial commit
Change-Id: I366f78ddf27114fd48be2d874ae9bea4c8633254
| -rw-r--r-- | Android.mk | 26 | ||||
| -rw-r--r-- | AndroidProducts.mk | 17 | ||||
| -rw-r--r-- | BoardConfig.mk | 31 | ||||
| -rw-r--r-- | cm.dependencies | 6 | ||||
| -rw-r--r-- | cm.mk | 38 | ||||
| -rw-r--r-- | device.mk | 21 | ||||
| -rwxr-xr-x | extract-files.sh | 57 | ||||
| -rw-r--r-- | full_hydrogen.mk | 29 | ||||
| -rwxr-xr-x | proprietary-files.txt | 1 | ||||
| -rwxr-xr-x | setup-makefiles.sh | 47 | ||||
| -rw-r--r-- | system.prop | 1 |
11 files changed, 274 insertions, 0 deletions
diff --git a/Android.mk b/Android.mk new file mode 100644 index 0000000..4e5ddac --- /dev/null +++ b/Android.mk @@ -0,0 +1,26 @@ +# +# 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. + +# WARNING: Everything listed here will be built on ALL platforms, +# including x86, the emulator, and the SDK. Modules must be uniquely +# named (liblights.tuna), and must build everywhere, or limit themselves +# to only building on ARM if they include assembly. Individual makefiles +# are responsible for having their own logic, for fine-grained control. + +LOCAL_PATH := $(call my-dir) + +ifeq ($(TARGET_DEVICE),hydrogen) +include $(call all-makefiles-under,$(LOCAL_PATH)) +endif diff --git a/AndroidProducts.mk b/AndroidProducts.mk new file mode 100644 index 0000000..9e50372 --- /dev/null +++ b/AndroidProducts.mk @@ -0,0 +1,17 @@ +# +# 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. + +PRODUCT_MAKEFILES := \ + $(LOCAL_DIR)/full_hydrogen.mk diff --git a/BoardConfig.mk b/BoardConfig.mk new file mode 100644 index 0000000..ce4795c --- /dev/null +++ b/BoardConfig.mk @@ -0,0 +1,31 @@ +# +# 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. + +# inherit from common msm8956-common +-include device/xiaomi/msm8956-common/BoardConfigCommon.mk + +DEVICE_PATH := device/xiaomi/hydrogen + +# Assert +TARGET_OTA_ASSERT_DEVICE := hydrogen + +# Kernel +TARGET_KERNEL_CONFIG := cyanogenmod_hydrogen_defconfig + +# Properties +TARGET_SYSTEM_PROP += $(DEVICE_PATH)/system.prop + +# inherit from the proprietary version +-include vendor/xiaomi/hydrogen/BoardConfigVendor.mk diff --git a/cm.dependencies b/cm.dependencies new file mode 100644 index 0000000..fb01359 --- /dev/null +++ b/cm.dependencies @@ -0,0 +1,6 @@ +[ + { + "repository": "android_device_xiaomi_msm8956-common", + "target_path": "device/xiaomi/msm8956-common" + } +] @@ -0,0 +1,38 @@ +# +# Copyright 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. +# + +$(call inherit-product, device/xiaomi/hydrogen/full_hydrogen.mk) + +# Inherit some common CM stuff. +$(call inherit-product, vendor/cm/config/common_full_phone.mk) + +# Set those variables here to overwrite the inherited values. +BOARD_VENDOR := Xiaomi +PRODUCT_BRAND := Xiaomi +PRODUCT_DEVICE := hydrogen +PRODUCT_NAME := cm_hydrogen +PRODUCT_MANUFACTURER := Xiaomi +PRODUCT_MODEL := Mi Max +TARGET_VENDOR := Xiaomi + +PRODUCT_GMS_CLIENTID_BASE := android-xiaomi + +# Use the latest approved GMS identifiers unless running a signed build +ifneq ($(SIGN_BUILD),true) +PRODUCT_BUILD_PROP_OVERRIDES += \ + BUILD_FINGERPRINT=Xiaomi/hydrogen/hydrogen:6.0.1/MMB29M/6.10.27:user/release-keys \ + PRIVATE_BUILD_DESC="hydrogen-user 6.0.1 MMB29M 6.10.27 release-keys" +endif diff --git a/device.mk b/device.mk new file mode 100644 index 0000000..687fa4a --- /dev/null +++ b/device.mk @@ -0,0 +1,21 @@ +# +# 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. +# + +# call the proprietary setup +$(call inherit-product-if-exists, vendor/xiaomi/hydrogen/hydrogen-vendor.mk) + +# Inherit from msm8956-common +$(call inherit-product, device/xiaomi/msm8956-common/msm8956.mk) diff --git a/extract-files.sh b/extract-files.sh new file mode 100755 index 0000000..262c045 --- /dev/null +++ b/extract-files.sh @@ -0,0 +1,57 @@ +#!/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 + +DEVICE=hydrogen +VENDOR=xiaomi + +# Load extractutils and do some sanity checks +MY_DIR="${BASH_SOURCE%/*}" +if [[ ! -d "$MY_DIR" ]]; then MY_DIR="$PWD"; fi + +CM_ROOT="$MY_DIR"/../../.. + +HELPER="$CM_ROOT"/vendor/cm/build/tools/extract_utils.sh +if [ ! -f "$HELPER" ]; then + echo "Unable to find helper script at $HELPER" + exit 1 +fi +. "$HELPER" + +if [ $# -eq 0 ]; then + SRC=adb +else + if [ $# -eq 1 ]; then + SRC=$1 + else + echo "$0: bad number of arguments" + echo "" + echo "usage: $0 [PATH_TO_EXPANDED_ROM]" + echo "" + echo "If PATH_TO_EXPANDED_ROM is not specified, blobs will be extracted from" + echo "the device using adb pull." + exit 1 + fi +fi + +# Initialize the helper +setup_vendor "$DEVICE" "$VENDOR" "$CM_ROOT" + +extract "$MY_DIR"/proprietary-files.txt "$SRC" + +"$MY_DIR"/setup-makefiles.sh diff --git a/full_hydrogen.mk b/full_hydrogen.mk new file mode 100644 index 0000000..7062c36 --- /dev/null +++ b/full_hydrogen.mk @@ -0,0 +1,29 @@ +# +# Copyright (C) 2015 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/core_64_bit.mk) +$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base_telephony.mk) + +# Inherit from kipper device +$(call inherit-product, device/xiaomi/hydrogen/device.mk) + +# Device identifier. This must come after all inclusions +PRODUCT_DEVICE := hydrogen +PRODUCT_NAME := full_hydrogen +PRODUCT_BRAND := Xiaomi +PRODUCT_MODEL := hydrogen +PRODUCT_MANUFACTURER := Xiaomi diff --git a/proprietary-files.txt b/proprietary-files.txt new file mode 100755 index 0000000..cfb285a --- /dev/null +++ b/proprietary-files.txt @@ -0,0 +1 @@ +# Wait for it!
\ No newline at end of file diff --git a/setup-makefiles.sh b/setup-makefiles.sh new file mode 100755 index 0000000..d52b414 --- /dev/null +++ b/setup-makefiles.sh @@ -0,0 +1,47 @@ +#!/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 + +# Required! +DEVICE=hydrogen +VENDOR=xiaomi + +# Load extractutils and do some sanity checks +MY_DIR="${BASH_SOURCE%/*}" +if [[ ! -d "$MY_DIR" ]]; then MY_DIR="$PWD"; fi + +CM_ROOT="$MY_DIR"/../../.. + +HELPER="$CM_ROOT"/vendor/cm/build/tools/extract_utils.sh +if [ ! -f "$HELPER" ]; then + echo "Unable to find helper script at $HELPER" + exit 1 +fi +. "$HELPER" + +# Initialize the helper +setup_vendor "$DEVICE" "$VENDOR" "$CM_ROOT" + +# Copyright headers and guards +write_headers + +# The blobs +write_makefiles "$MY_DIR"/proprietary-files.txt + +# We are done! +write_footers diff --git a/system.prop b/system.prop new file mode 100644 index 0000000..c5cf7cf --- /dev/null +++ b/system.prop @@ -0,0 +1 @@ +# Dummy for now |
