m7wls: inherit 8960 common, clean up.

Change-Id: I07df81bc84060bbb7130bbac9577fbeba66af375
diff --git a/BoardConfig.mk b/BoardConfig.mk
index 118b298..4996326 100644
--- a/BoardConfig.mk
+++ b/BoardConfig.mk
@@ -24,104 +24,24 @@
 # 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/m7wls/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
-
-# Architecture
-TARGET_ARCH := arm
-TARGET_ARCH_VARIANT := armv7-a-neon
-TARGET_ARCH_VARIANT_CPU := cortex-a9
-TARGET_CPU_ABI := armeabi-v7a
-TARGET_CPU_ABI2 := armeabi
-TARGET_CPU_SMP := true
+# inherit from common msm8960
+-include device/htc/msm8960-common/BoardConfigCommon.mk
 
 # Bootloader
-TARGET_NO_BOOTLOADER := true
+TARGET_BOOTLOADER_BOARD_NAME := m7wls
 
 # 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 := m7wls_defconfig
-TARGET_KERNEL_SOURCE := kernel/htc/msm8960
-
-# Audio
-BOARD_USES_ALSA_AUDIO:= true
-BOARD_USES_FLUENCE_INCALL := true
-BOARD_USES_SEPERATED_AUDIO_INPUT := true
-TARGET_QCOM_AUDIO_VARIANT := caf
 
 # Bluetooth
-BOARD_HAVE_BLUETOOTH := true
-BOARD_HAVE_BLUETOOTH_QCOM := true
-BLUETOOTH_HCI_USE_MCT := true
 BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := device/htc/m7wls/bluetooth
 
-# Camera
-TARGET_PROVIDES_CAMERA_HAL := false
-USE_CAMERA_STUB := true
-
-# Ril
-BOARD_RIL_CLASS := "../../../device/htc/m7wls/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/m7wls/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_bcm4335.bin nvram_path=/system/etc/calibration"
-WIFI_DRIVER_MODULE_AP_ARG := "firmware_path=/system/etc/firmware/fw_bcm4335_apsta.bin nvram_path=/system/etc/calibration"
-WIFI_DRIVER_FW_PATH_STA := "/system/etc/firmware/fw_bcm4335.bin"
-WIFI_DRIVER_FW_PATH_AP := "/system/etc/firmware/fw_bcm4335_apsta.bin"
-WIFI_DRIVER_FW_PATH_P2P := "/system/etc/firmware/fw_bcm4335_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
@@ -129,13 +49,28 @@
 BOARD_USERDATAIMAGE_PARTITION_SIZE := 27917287424
 BOARD_FLASH_BLOCK_SIZE := 131072
 
-# Custom Recovery
-TARGET_PREBUILT_KERNEL := device/htc/m7wls/kernel
-BOARD_USE_CUSTOM_RECOVERY_FONT := \"roboto_23x41.h\"
-TARGET_RECOVERY_INITRC := device/htc/m7wls/recovery/init.rc
-BOARD_HAS_NO_SELECT_BUTTON := true
-BOARD_HAS_LARGE_FILESYSTEM := true
-
-# Webkit
-ENABLE_WEBGL := true
-TARGET_FORCE_CPU_UPLOAD := true
+# cat /proc/emmc:
+# dev: size erasesize name
+# mmcblk0p19: 000ffa00 00000200 "misc"
+# mmcblk0p36: 00fffe00 00000200 "recovery"
+# mmcblk0p35: 01000000 00000200 "boot"
+# mmcblk0p37: 73fffc00 00000200 "system"
+# mmcblk0p26: 00140200 00000200 "local"
+# mmcblk0p38: 27fffe00 00000200 "cache"
+# mmcblk0p39: 680000000 00000200 "userdata"
+# mmcblk0p22: 01400000 00000200 "devlog"
+# mmcblk0p24: 00040000 00000200 "pdata"
+# mmcblk0p27: 00010000 00000200 "extra"
+# mmcblk0p33: 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"
+# mmcblk0p29: 00040000 00000200 "skylink"
+# mmcblk0p30: 01900000 00000200 "carrier"
+# mmcblk0p28: 00100000 00000200 "cdma_record"
+# mmcblk0p18: 02000000 00000200 "reserve_1"
+# mmcblk0p32: 034ffa00 00000200 "reserve_2"
+# mmcblk0p34: 05fffc00 00000200 "reserve_3"
+# mmcblk0p31: 04729a00 00000200 "reserve"