diff --git a/Android.mk b/Android.mk new file mode 100644 index 0000000..ca86791 --- /dev/null +++ b/Android.mk @@ -0,0 +1,3 @@ +ifneq ($(filter ville,$(TARGET_DEVICE)),) + include $(all-subdir-makefiles) +endif diff --git a/AndroidBoard.mk b/AndroidBoard.mk new file mode 100644 index 0000000..2a066fe --- /dev/null +++ b/AndroidBoard.mk @@ -0,0 +1,8 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) + +ALL_PREBUILT += $(INSTALLED_KERNEL_TARGET) + +# include the non-open-source counterpart to this file +-include vendor/htc/ville/AndroidBoardVendor.mk diff --git a/AndroidProducts.mk b/AndroidProducts.mk new file mode 100644 index 0000000..bb79829 --- /dev/null +++ b/AndroidProducts.mk @@ -0,0 +1,2 @@ +PRODUCT_MAKEFILES := \ + $(LOCAL_DIR)/device_ville.mk diff --git a/BoardConfig.mk b/BoardConfig.mk new file mode 100644 index 0000000..6bae621 --- /dev/null +++ b/BoardConfig.mk @@ -0,0 +1,51 @@ +USE_CAMERA_STUB := true + +# inherit from the proprietary version +-include vendor/htc/ville/BoardConfigVendor.mk + +TARGET_NO_BOOTLOADER := true +TARGET_BOOTLOADER_BOARD_NAME := ville + +# Platform +TARGET_BOARD_PLATFORM := msm8660 +TARGET_BOARD_PLATFORM_GPU := qcom-adreno200 + +# Flags +TARGET_GLOBAL_CFLAGS += -mfpu=neon -mfloat-abi=softfp +TARGET_GLOBAL_CPPFLAGS += -mfpu=neon -mfloat-abi=softfp +COMMON_GLOBAL_CFLAGS += -DREFRESH_RATE=60 -DQCOM_HARDWARE + +# Architecture +TARGET_CPU_ABI := armeabi-v7a +TARGET_CPU_ABI2 := armeabi +TARGET_ARCH_VARIANT := armv7-a-neon +TARGET_CPU_SMP := true +ARCH_ARM_HAVE_TLS_REGISTER := true + + +BOARD_KERNEL_CMDLINE := console=ttyHSL0,115200,n8 androidboot.hardware=vitte +BOARD_KERNEL_BASE := 0x80400000 +BOARD_FORCE_RAMDISK_ADDRESS := 0x81800000 +BOARD_KERNEL_PAGESIZE := 4096 + +BOARD_BOOTIMAGE_PARTITION_SIZE := 0x01000000 +BOARD_RECOVERYIMAGE_PARTITION_SIZE := 0x00fffe00 +BOARD_SYSTEMIMAGE_PARTITION_SIZE := 0x67fffc00 +BOARD_USERDATAIMAGE_PARTITION_SIZE := 0x105c0000 +BOARD_FLASH_BLOCK_SIZE := 131072 + +TARGET_PREBUILT_KERNEL := device/htc/ville/kernel + +TARGET_USE_CUSTOM_LUN_FILE_PATH := /sys/class/android_usb/android0/f_mass_storage/lun0/file + +# Recovery:Start + +# Use this flag if the board has a ext4 partition larger than 2gb +BOARD_HAS_LARGE_FILESYSTEM := true + +# Recovery: set depending on recovery being built for. (CWM or TWRP) +# both init scripts can be found in the recovery folder +TARGET_RECOVERY_INITRC := device/htc/ville/recovery/init-twrp.rc + +# TWRP specific build flags +DEVICE_RESOLUTION := 540x960 diff --git a/cm.mk b/cm.mk new file mode 100644 index 0000000..3976199 --- /dev/null +++ b/cm.mk @@ -0,0 +1,15 @@ +# Release name +PRODUCT_RELEASE_NAME := ville + +# Inherit some common CM stuff. +$(call inherit-product, vendor/cm/config/common_full_phone.mk) + +# Inherit device configuration +$(call inherit-product, device/htc/ville/device_ville.mk) + +## Device identifier. This must come after all inclusions +PRODUCT_DEVICE := ville +PRODUCT_NAME := cm_ville +PRODUCT_BRAND := htc +PRODUCT_MODEL := ville +PRODUCT_MANUFACTURER := htc diff --git a/device_ville.mk b/device_ville.mk new file mode 100644 index 0000000..a45f54f --- /dev/null +++ b/device_ville.mk @@ -0,0 +1,27 @@ +$(call inherit-product, $(SRC_TARGET_DIR)/product/languages_full.mk) + +# The gps config appropriate for this device +$(call inherit-product, device/common/gps/gps_us_supl.mk) + +$(call inherit-product-if-exists, vendor/htc/ville/ville-vendor.mk) + +DEVICE_PACKAGE_OVERLAYS += device/htc/ville/overlay + +LOCAL_PATH := device/htc/ville +ifeq ($(TARGET_PREBUILT_KERNEL),) + LOCAL_KERNEL := $(LOCAL_PATH)/kernel +else + LOCAL_KERNEL := $(TARGET_PREBUILT_KERNEL) +endif + +PRODUCT_COPY_FILES += \ + $(LOCAL_KERNEL):kernel + +PRODUCT_COPY_FILES += \ + device/htc/ville/recovery/sbin/choice_fn:recovery/root/sbin/choice_fn \ + device/htc/ville/recovery/sbin/detect_key:recovery/root/sbin/detect_key \ + device/htc/ville/recovery/sbin/offmode_charging:recovery/root/sbin/offmode_charging \ + device/htc/ville/recovery/sbin/power_test:recovery/root/sbin/power_test + +$(call inherit-product, build/target/product/full.mk) + diff --git a/kernel b/kernel new file mode 100644 index 0000000..2c25de4 Binary files /dev/null and b/kernel differ diff --git a/recovery.fstab b/recovery.fstab new file mode 100644 index 0000000..7af2ba9 --- /dev/null +++ b/recovery.fstab @@ -0,0 +1,9 @@ +# mount point fstype device [device2] + +/recovery emmc /dev/block/mmcblk0p22 +/boot emmc /dev/block/mmcblk0p21 +/cache ext4 /dev/block/mmcblk0p34 +/data ext4 /dev/block/mmcblk0p35 +/sdcard vfat /dev/block/mmcblk0p36 +/system ext4 /dev/block/mmcblk0p33 +/misc emmc /dev/block/mmcblk0p23 diff --git a/recovery/init-cwm.rc b/recovery/init-cwm.rc new file mode 100755 index 0000000..6177826 --- /dev/null +++ b/recovery/init-cwm.rc @@ -0,0 +1,78 @@ +on early-init + start ueventd + +on init + export PATH /sbin + export ANDROID_ROOT /system + export ANDROID_DATA /data + export EXTERNAL_STORAGE /sdcard + + symlink /system/etc /etc + symlink /sbin/busybox /sbin/sh + + chmod 0755 /sbin/busybox + + mkdir /sdcard + mkdir /system + mkdir /data + mkdir /data/data + mkdir /cache + mkdir /mtdcache + mkdir /devlog + mkdir /internal_sdcard + mount /tmp /tmp tmpfs + +on boot + + ifup lo + hostname localhost + domainname localdomain + + class_start default + +service choice_fn /sbin/choice_fn + oneshot + +service power_test /sbin/power_test + disabled + oneshot + +service offmode_charging /sbin/offmode_charging + disabled + oneshot + +service detect_key /sbin/detect_key + disabled + oneshot + +service ueventd /sbin/ueventd + critical + +service recovery /sbin/recovery + disabled + +service adbd /sbin/adbd recovery + disabled + +# Always start adbd on userdebug and eng builds +on property:ro.debuggable=1 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/idVendor 18D1 + write /sys/class/android_usb/android0/idProduct D001 + write /sys/class/android_usb/android0/functions adb + write /sys/class/android_usb/android0/enable 1 + write /sys/class/android_usb/android0/iManufacturer $ro.product.manufacturer + write /sys/class/android_usb/android0/iProduct $ro.product.model + write /sys/class/android_usb/android0/iSerial $ro.serialno + +on property:ro.debuggable=1 + start adbd + +on property:ro.debuggable=0 + stop adbd + +# Restart adbd so it can run as root +on property:service.adb.root=1 + write /sys/class/android_usb/android0/enable 0 + restart adbd + write /sys/class/android_usb/android0/enable 1 diff --git a/recovery/init-twrp.rc b/recovery/init-twrp.rc new file mode 100755 index 0000000..fd9df28 --- /dev/null +++ b/recovery/init-twrp.rc @@ -0,0 +1,79 @@ +on early-init + start ueventd + +on init + export PATH /sbin + export LD_LIBRARY_PATH .:/sbin + export ANDROID_ROOT /system + export ANDROID_DATA /data + export EXTERNAL_STORAGE /sdcard + + symlink /system/etc /etc + symlink /sbin/busybox /sbin/sh + + chmod 0755 /sbin/busybox + + mkdir /sdcard + mkdir /system + mkdir /data + mkdir /data/data + mkdir /cache + mkdir /mtdcache + mkdir /devlog + mkdir /internal_sdcard + mount /tmp /tmp tmpfs + +on boot + + ifup lo + hostname localhost + domainname localdomain + + class_start default + +service choice_fn /sbin/choice_fn + oneshot + +service power_test /sbin/power_test + disabled + oneshot + +service offmode_charging /sbin/offmode_charging + disabled + oneshot + +service detect_key /sbin/detect_key + disabled + oneshot + +service ueventd /sbin/ueventd + critical + +service recovery /sbin/recovery + disabled + +service adbd /sbin/adbd recovery + disabled + +# Always start adbd on userdebug and eng builds +on property:ro.debuggable=1 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/idVendor 18D1 + write /sys/class/android_usb/android0/idProduct D001 + write /sys/class/android_usb/android0/functions adb + write /sys/class/android_usb/android0/enable 1 + write /sys/class/android_usb/android0/iManufacturer $ro.product.manufacturer + write /sys/class/android_usb/android0/iProduct $ro.product.model + write /sys/class/android_usb/android0/iSerial $ro.serialno + +on property:ro.debuggable=1 + start adbd + +on property:ro.debuggable=0 + stop adbd + +# Restart adbd so it can run as root +on property:service.adb.root=1 + write /sys/class/android_usb/android0/enable 0 + restart adbd + write /sys/class/android_usb/android0/enable 1 diff --git a/recovery/sbin/choice_fn b/recovery/sbin/choice_fn new file mode 100755 index 0000000..eeac8a3 Binary files /dev/null and b/recovery/sbin/choice_fn differ diff --git a/recovery/sbin/detect_key b/recovery/sbin/detect_key new file mode 100755 index 0000000..7aa4105 Binary files /dev/null and b/recovery/sbin/detect_key differ diff --git a/recovery/sbin/offmode_charging b/recovery/sbin/offmode_charging new file mode 100755 index 0000000..d8a216b Binary files /dev/null and b/recovery/sbin/offmode_charging differ diff --git a/recovery/sbin/power_test b/recovery/sbin/power_test new file mode 100755 index 0000000..beae49d Binary files /dev/null and b/recovery/sbin/power_test differ diff --git a/system.prop b/system.prop new file mode 100644 index 0000000..5fced32 --- /dev/null +++ b/system.prop @@ -0,0 +1,3 @@ +# +# system.prop for ville +# diff --git a/vendorsetup.sh b/vendorsetup.sh new file mode 100755 index 0000000..514422c --- /dev/null +++ b/vendorsetup.sh @@ -0,0 +1,24 @@ +# +# Copyright (C) 2008 The Android Open Source 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 is executed by build/envsetup.sh, and can use anything +# defined in envsetup.sh. +# +# In particular, you can add lunch options with the add_lunch_combo +# function: add_lunch_combo generic-eng + +add_lunch_combo htc_ville-userdebug +add_lunch_combo htc_ville-eng