Skip to content

Commit

Permalink
Add files duh
Browse files Browse the repository at this point in the history
  • Loading branch information
rhcp011235 committed May 28, 2012
1 parent c2bc9fe commit 46ffd45
Show file tree
Hide file tree
Showing 16 changed files with 299 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Android.mk
@@ -0,0 +1,3 @@
ifneq ($(filter ville,$(TARGET_DEVICE)),)
include $(all-subdir-makefiles)
endif
8 changes: 8 additions & 0 deletions 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
2 changes: 2 additions & 0 deletions AndroidProducts.mk
@@ -0,0 +1,2 @@
PRODUCT_MAKEFILES := \
$(LOCAL_DIR)/device_ville.mk
51 changes: 51 additions & 0 deletions 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
15 changes: 15 additions & 0 deletions 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
27 changes: 27 additions & 0 deletions 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)

Binary file added kernel
Binary file not shown.
9 changes: 9 additions & 0 deletions 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
78 changes: 78 additions & 0 deletions 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
79 changes: 79 additions & 0 deletions 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
Binary file added recovery/sbin/choice_fn
Binary file not shown.
Binary file added recovery/sbin/detect_key
Binary file not shown.
Binary file added recovery/sbin/offmode_charging
Binary file not shown.
Binary file added recovery/sbin/power_test
Binary file not shown.
3 changes: 3 additions & 0 deletions system.prop
@@ -0,0 +1,3 @@
#
# system.prop for ville
#
24 changes: 24 additions & 0 deletions 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

0 comments on commit 46ffd45

Please sign in to comment.