From d204b68f86631f31a54e728d47a760622524db1c Mon Sep 17 00:00:00 2001 From: charansingh Date: Wed, 2 Feb 2011 01:35:29 +0530 Subject: [PATCH] Add leo related vendor files in Cyanogen Vendor Change-Id: Idb55f5a74dd07a2964fbc87d98f522bb1d921947 --- prebuilt/leo/etc/init.d/01modules | 10 ++++++ products/AndroidProducts.mk | 1 + products/cyanogen_leo.mk | 56 +++++++++++++++++++++++++++++++ tools/leoupdate | 31 +++++++++++++++++ vendorsetup.sh | 2 ++ 5 files changed, 100 insertions(+) create mode 100755 prebuilt/leo/etc/init.d/01modules create mode 100644 products/cyanogen_leo.mk create mode 100755 tools/leoupdate diff --git a/prebuilt/leo/etc/init.d/01modules b/prebuilt/leo/etc/init.d/01modules new file mode 100755 index 00000000..77c2becf --- /dev/null +++ b/prebuilt/leo/etc/init.d/01modules @@ -0,0 +1,10 @@ +#!/system/bin/sh +# +# Load MODULES +sleep 1 +insmod /system/lib/modules/msm_rmnet.ko +insmod /system/lib/modules/tun.ko +insmod /system/lib/modules/cifs.ko +insmod /system/lib/modules/nls_utf8.ko +insmod /system/lib/modules/fuse.ko +echo "+++ RMNET / TUN / CIFS activated +++"; diff --git a/products/AndroidProducts.mk b/products/AndroidProducts.mk index 21c433c3..09bf0195 100644 --- a/products/AndroidProducts.mk +++ b/products/AndroidProducts.mk @@ -11,6 +11,7 @@ PRODUCT_MAKEFILES := \ $(LOCAL_DIR)/cyanogen_glacier.mk \ $(LOCAL_DIR)/cyanogen_harmony.mk \ $(LOCAL_DIR)/cyanogen_legend.mk \ + $(LOCAL_DIR)/cyanogen_leo.mk \ $(LOCAL_DIR)/cyanogen_liberty.mk \ $(LOCAL_DIR)/cyanogen_one.mk \ $(LOCAL_DIR)/cyanogen_passion.mk \ diff --git a/products/cyanogen_leo.mk b/products/cyanogen_leo.mk new file mode 100644 index 00000000..ba520636 --- /dev/null +++ b/products/cyanogen_leo.mk @@ -0,0 +1,56 @@ +# Inherit AOSP device configuration for leo. +$(call inherit-product, device/htc/leo/full_leo.mk) + +# Inherit some common cyanogenmod stuff. +$(call inherit-product, vendor/cyanogen/products/common_full.mk) + +# Include GSM stuff +$(call inherit-product, vendor/cyanogen/products/gsm.mk) + +# +# Setup device specific product configuration. +# + +PRODUCT_NAME := cyanogen_leo +PRODUCT_BRAND := htc_wwe +PRODUCT_DEVICE := leo +PRODUCT_MODEL := HTC HD2 +PRODUCT_MANUFACTURER := HTC +PRODUCT_BUILD_PROP_OVERRIDES += PRODUCT_NAME=passion BUILD_ID=FRG83D BUILD_DISPLAY_ID=GRH78C BUILD_FINGERPRINT=google/passion/passion/mahimahi:2.2.1/FRG83D/75603:user/release-keys PRIVATE_BUILD_DESC="passion-user 2.2.1 FRG83D 75603 release-keys" + +# Extra leo overlay +PRODUCT_PACKAGE_OVERLAYS += vendor/cyanogen/products/overlay + +# This file is used to install the enable RMNET and corresponding modules which dont get activated by normal module script +PRODUCT_COPY_FILES += \ + vendor/cyanogen/prebuilt/leo/etc/init.d/01modules:system/etc/init.d/01modules + +# Extra RIL settings +PRODUCT_PROPERTY_OVERRIDES += \ + ro.ril.enable.managed.roaming=1 \ + ro.ril.oem.nosim.ecclist=911,112,113,115,117,999,000,08,118,120,122,110,119,995 \ + ro.ril.emc.mode=2 + + +# +# Set ro.modversion +# +ifdef CYANOGEN_NIGHTLY + PRODUCT_PROPERTY_OVERRIDES += \ + ro.modversion=CyanogenMod-7-$(shell date +%m%d%Y)-NIGHTLY-LEO +else + ifdef CYANOGEN_RELEASE + PRODUCT_PROPERTY_OVERRIDES += \ + ro.modversion=CyanogenMod-7.0.0-RC0-LEO + else + PRODUCT_PROPERTY_OVERRIDES += \ + ro.modversion=CyanogenMod-7.0.0-RC0-LEO-KANG + endif +endif + + +# +# Copy leo specific prebuilt files +# +PRODUCT_COPY_FILES += \ + vendor/cyanogen/prebuilt/hdpi/media/bootanimation.zip:system/media/bootanimation.zip diff --git a/tools/leoupdate b/tools/leoupdate new file mode 100755 index 00000000..e282e56f --- /dev/null +++ b/tools/leoupdate @@ -0,0 +1,31 @@ +#!/bin/bash + +export LOC="$PWD/out/target/product/leo" + +mkdir -p "$LOC"/temp + +cd "$LOC"/temp +echo "extract update.zip" +unzip -o -qq "$LOC"/$TARGET_PRODUCT-ota-$TARGET_BUILD_VARIANT.$LOGNAME.zip + +echo "Making Leo Compatible Update script" +cd "$LOC" +cd "$LOC"/temp/META-INF/com/google/android +echo 'mount("yaffs2", "MTD", "boot", "/boot");' >> temp +echo 'package_extract_dir("boot", "/boot");' >> temp +grep -vw assert updater-script >> temp +rm -rf updater-script +grep -vw boot.img temp > updater-script +rm -rf temp +echo Zipping Package +cd "$LOC"/temp +rm -rf boot.img +cp -a "$LOC"/boot boot +rm -rf "$LOC"/$TARGET_PRODUCT-ota-$TARGET_BUILD_VARIANT.$LOGNAME.zip +zip -9yr "$LOC"/$TARGET_PRODUCT-ota-$TARGET_BUILD_VARIANT.$LOGNAME.zip * > /dev/null +cd "$LOC" + +echo Cleanup... +rm -rf "$LOC"/temp + +echo done diff --git a/vendorsetup.sh b/vendorsetup.sh index e35fc4d3..c9a80235 100644 --- a/vendorsetup.sh +++ b/vendorsetup.sh @@ -12,6 +12,7 @@ add_lunch_combo cyanogen_hero-eng #add_lunch_combo cyanogen_heroc-eng add_lunch_combo cyanogen_inc-eng add_lunch_combo cyanogen_legend-eng +add_lunch_combo cyanogen_leo-eng add_lunch_combo cyanogen_liberty-eng add_lunch_combo cyanogen_one-eng add_lunch_combo cyanogen_passion-eng @@ -20,4 +21,5 @@ add_lunch_combo cyanogen_supersonic-eng add_lunch_combo cyanogen_vision-eng add_lunch_combo cyanogen_z71-eng + PATH=$PATH:$PWD/vendor/cyanogen/tools ; export PATH