Prepare for CM-10.1
diff --git a/BoardConfig.mk b/BoardConfig.mk
index a74dc2e..da05878 100644
--- a/BoardConfig.mk
+++ b/BoardConfig.mk
@@ -1,8 +1,42 @@
-USE_CAMERA_STUB := true
+# Copyright (C) 2013 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 sets variables that control the way modules are built
+# thorughout the system. It should not be used to conditionally
+# disable makefiles (the proper mechanism to control what gets
+# included in a build is to use PRODUCT_PACKAGES in a product
+# definition file).
+#
+
+# WARNING: This line must come *before* including the proprietary
+# variant, so that it gets overwritten by the parent (which goes
+# against the traditional rules of inheritance).
+
+BOARD_VENDOR := htc
 
 # inherit from the proprietary version
 -include vendor/htc/m7/BoardConfigVendor.mk
 
+# Flags
+TARGET_GLOBAL_CFLAGS += -mfpu=neon -mfloat-abi=softfp
+TARGET_GLOBAL_CPPFLAGS += -mfpu=neon -mfloat-abi=softfp
+COMMON_GLOBAL_CFLAGS += -DQCOM_HARDWARE
+
+# QCOM hardware
+BOARD_USES_QCOM_HARDWARE := true
+
 # Platform
 TARGET_BOARD_PLATFORM := msm8960
 TARGET_BOARD_PLATFORM_GPU := qcom-adreno200
@@ -15,46 +49,92 @@
 TARGET_CPU_ABI2 := armeabi
 TARGET_CPU_SMP := true
 
+# Bootloader
+TARGET_NO_BOOTLOADER := true
+TARGET_BOOTLOADER_BOARD_NAME := m7
+
+# Kernel
 BOARD_KERNEL_CMDLINE := console=ttyHSL0,115200,n8 androidboot.hardware=m7 user_debug=31
 BOARD_KERNEL_BASE := 0x80600000
 BOARD_KERNEL_PAGESIZE := 2048
 BOARD_MKBOOTIMG_ARGS := --ramdisk_offset 0x01400000
+TARGET_KERNEL_VERSION := 3.4
+TARGET_KERNEL_CONFIG := m7_defconfig
+TARGET_KERNEL_SOURCE := kernel/htc/m7-$(TARGET_KERNEL_VERSION)
 
-# fix this up by examining /proc/mtd on a running device
+# Audio
+BOARD_USES_ALSA_AUDIO:= true
+BOARD_USES_FLUENCE_INCALL := true
+BOARD_USES_SEPERATED_AUDIO_INPUT := true
+BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := device/htc/m7/bluetooth
+
+# Bluetooth
+BOARD_HAVE_BLUETOOTH := true
+BOARD_HAVE_BLUETOOTH_QCOM := true
+BLUETOOTH_HCI_USE_MCT := true
+
+# Camera
+TARGET_PROVIDES_CAMERA_HAL := true
+
+# Ril
+BOARD_RIL_CLASS := "../../../device/htc/msm8960-common/libril/"
+BOARD_PROVIDES_LIBRIL := true
+
+# HTClog
+COMMON_GLOBAL_CFLAGS += -DHTCLOG
+
+# Graphics
+USE_OPENGL_RENDERER := true
+TARGET_USES_C2D_COMPOSITION := true
+TARGET_USES_ION := true
+TARGET_QCOM_DISPLAY_VARIANT := caf
+BOARD_HAVE_OLD_ION_API := true
+BOARD_EGL_CFG := device/htc/msm8960-common/configs/egl.cfg
+
+# Lights
+TARGET_PROVIDES_LIBLIGHTS := true
+
+# Power
+TARGET_PROVIDES_POWERHAL := true
+
+# USB
+TARGET_USE_CUSTOM_LUN_FILE_PATH := /sys/devices/platform/msm_hsusb/gadget/lun%d/file
+
+# Wifi
+WIFI_BAND := 802_11_ABG
+WPA_SUPPLICANT_VERSION := VER_0_8_X
+BOARD_WPA_SUPPLICANT_DRIVER := NL80211
+BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_bcmdhd
+BOARD_HOSTAPD_DRIVER := NL80211
+BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_bcmdhd
+BOARD_WLAN_DEVICE := bcmdhd
+
+WIFI_DRIVER_MODULE_PATH := "/system/lib/modules/bcmdhd.ko"
+WIFI_DRIVER_MODULE_NAME := "bcmdhd"
+WIFI_DRIVER_MODULE_ARG := "firmware_path=/system/etc/firmware/fw_bcm4334.bin nvram_path=/system/etc/calibration"
+WIFI_DRIVER_MODULE_AP_ARG := "firmware_path=/system/etc/firmware/fw_bcm4334_apsta.bin nvram_path=/system/etc/calibration"
+WIFI_DRIVER_FW_PATH_STA := "/system/etc/firmware/fw_bcm4334.bin"
+WIFI_DRIVER_FW_PATH_AP := "/system/etc/firmware/fw_bcm4334_apsta.bin"
+WIFI_DRIVER_FW_PATH_P2P := "/system/etc/firmware/fw_bcm4334_p2p.bin"
+
+# GPS
+BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE := $(TARGET_BOARD_PLATFORM)
+TARGET_NO_RPC := true
+
+# Filesystem
 BOARD_BOOTIMAGE_PARTITION_SIZE := 16777216
 BOARD_RECOVERYIMAGE_PARTITION_SIZE := 16776704
 BOARD_SYSTEMIMAGE_PARTITION_SIZE := 1946156032
 BOARD_USERDATAIMAGE_PARTITION_SIZE := 27917287424
 BOARD_FLASH_BLOCK_SIZE := 131072
 
+# Custom Recovery
 TARGET_PREBUILT_KERNEL := device/htc/m7/kernel
-
 BOARD_USE_CUSTOM_RECOVERY_FONT := \"roboto_23x41.h\"
 TARGET_RECOVERY_INITRC := device/htc/m7/recovery/init.rc
 BOARD_HAS_NO_SELECT_BUTTON := true
 BOARD_HAS_LARGE_FILESYSTEM := true
 
-
-# cat /proc/emmc:
-# dev: size erasesize name
-# mmcblk0p19: 000ffa00 00000200 "misc"
-# mmcblk0p34: 00fffe00 00000200 "recovery"
-# mmcblk0p33: 01000000 00000200 "boot"
-# mmcblk0p35: 73fffc00 00000200 "system"
-# mmcblk0p26: 00140200 00000200 "local"
-# mmcblk0p36: 27fffe00 00000200 "cache"
-# mmcblk0p37: 680000000 00000200 "userdata"
-# mmcblk0p22: 01400000 00000200 "devlog"
-# mmcblk0p24: 00040000 00000200 "pdata"
-# mmcblk0p27: 00010000 00000200 "extra"
-# mmcblk0p31: 04b00200 00000200 "radio"
-# mmcblk0p16: 03c00400 00000200 "adsp"
-# mmcblk0p15: 00100000 00000200 "dsps"
-# mmcblk0p17: 007ffa00 00000200 "radio_config"
-# mmcblk0p20: 00400000 00000200 "modem_st1"
-# mmcblk0p21: 00400000 00000200 "modem_st2"
-# mmcblk0p28: 00100000 00000200 "cdma_record"
-# mmcblk0p18: 02000000 00000200 "reserve_1"
-# mmcblk0p30: 034ffa00 00000200 "reserve_2"
-# mmcblk0p32: 05fffc00 00000200 "reserve_3"
-# mmcblk0p29: 06069e00 00000200 "reserve"
+# Webkit
+ENABLE_WEBGL := true
+TARGET_FORCE_CPU_UPLOAD := true
\ No newline at end of file