Merge from froyo

This moves the radio requirement up to 2.22.26.07,
and includes the matching kernel, board-info, and
other changes.

Change-Id: I26c63f69bd47115bc6c80912ce8b0bd60e81cd4e
diff --git a/AndroidProducts.mk b/AndroidProducts.mk
index b3d69f9..c57754a 100644
--- a/AndroidProducts.mk
+++ b/AndroidProducts.mk
@@ -26,5 +26,4 @@
 #
 
 PRODUCT_MAKEFILES := \
-    $(LOCAL_DIR)/generic_sapphire.mk \
     $(LOCAL_DIR)/full_sapphire.mk
diff --git a/board-info.txt b/board-info.txt
index 320e783..0a4ec92 100644
--- a/board-info.txt
+++ b/board-info.txt
@@ -1,5 +1,5 @@
 reject serialno=HT7*|HT80*|HT81*
 require board=sapphire
-require version-bootloader=1.33.0011|1.33.2011|1.33.3011|1.33.0013|1.33.2013|1.33.3013
+require version-bootloader=1.33.0004|1.33.2004|1.33.3004|1.33.0005|1.33.2005|1.33.3005|1.33.0006|1.33.2006|1.33.3006|1.33.0007|1.33.2007|1.33.3007|1.33.0008|1.33.2008|1.33.3008|1.33.0011|1.33.2011|1.33.3011|1.33.0013|1.33.2013|1.33.3013
 require version-baseband=2.22.27.08
 require version-cpld=10|12
diff --git a/device_sapphire.mk b/device_sapphire.mk
index 0f9b455..a03ab21 100644
--- a/device_sapphire.mk
+++ b/device_sapphire.mk
@@ -19,6 +19,19 @@
 PRODUCT_PACKAGES := \
     sensors.sapphire
 
+# The kernel
+PRODUCT_COPY_FILES += \
+    device/htc/sapphire/wlan.ko:system/lib/modules/wlan.ko
+
+ifeq ($(TARGET_PREBUILT_KERNEL),)
+LOCAL_KERNEL := device/htc/sapphire/kernel
+else
+LOCAL_KERNEL := $(TARGET_PREBUILT_KERNEL)
+endif
+
+PRODUCT_COPY_FILES += \
+    $(LOCAL_KERNEL):kernel
+
 # proprietary side of the device
 $(call inherit-product-if-exists, vendor/htc/sapphire/device_sapphire-vendor.mk)
 
diff --git a/extract-files.sh b/extract-files.sh
index 80cf75d..4f3f5c9 100755
--- a/extract-files.sh
+++ b/extract-files.sh
@@ -14,6 +14,8 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+# This file is generated by device/htc/common/generate-blob-scripts.sh - DO NOT EDIT
+
 DEVICE=sapphire
 
 mkdir -p ../../../vendor/htc/$DEVICE/proprietary
@@ -38,9 +40,7 @@
 adb pull /system/lib/libOmxH264Dec.so ../../../vendor/htc/$DEVICE/proprietary/libOmxH264Dec.so
 adb pull /system/lib/libOmxMpeg4Dec.so ../../../vendor/htc/$DEVICE/proprietary/libOmxMpeg4Dec.so
 adb pull /system/lib/libOmxVidEnc.so ../../../vendor/htc/$DEVICE/proprietary/libOmxVidEnc.so
-adb pull /system/lib/libopencorehw.so ../../../vendor/htc/$DEVICE/proprietary/libopencorehw.so
 adb pull /system/lib/libqcomm_omx.so ../../../vendor/htc/$DEVICE/proprietary/libqcomm_omx.so
-adb pull /system/lib/libstagefrighthw.so ../../../vendor/htc/$DEVICE/proprietary/libstagefrighthw.so
 
 (cat << EOF) | sed s/__DEVICE__/$DEVICE/g > ../../../vendor/htc/$DEVICE/device_$DEVICE-vendor-blobs.mk
 # Copyright (C) 2010 The Android Open Source Project
@@ -57,12 +57,14 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-# This file is generated by device/htc/__DEVICE__/extract-files.sh
+# This file is generated by device/htc/__DEVICE__/extract-files.sh - DO NOT EDIT
 
+# Prebuilt libraries that are needed to build open-source libraries
 PRODUCT_COPY_FILES := \\
-    vendor/htc/__DEVICE__/proprietary/libgps.so:obj/lib/libgps.so \\
-    vendor/htc/__DEVICE__/proprietary/libcamera.so:obj/lib/libcamera.so
+    vendor/htc/__DEVICE__/proprietary/libcamera.so:obj/lib/libcamera.so \\
+    vendor/htc/__DEVICE__/proprietary/libgps.so:obj/lib/libgps.so
 
+# All the blobs necessary for sapphire
 PRODUCT_COPY_FILES += \\
     vendor/htc/__DEVICE__/proprietary/akmd:system/bin/akmd \\
     vendor/htc/__DEVICE__/proprietary/01_qcomm_omx.cfg:system/etc/01_qcomm_omx.cfg \\
@@ -84,9 +86,7 @@
     vendor/htc/__DEVICE__/proprietary/libOmxH264Dec.so:system/lib/libOmxH264Dec.so \\
     vendor/htc/__DEVICE__/proprietary/libOmxMpeg4Dec.so:system/lib/libOmxMpeg4Dec.so \\
     vendor/htc/__DEVICE__/proprietary/libOmxVidEnc.so:system/lib/libOmxVidEnc.so \\
-    vendor/htc/__DEVICE__/proprietary/libopencorehw.so:system/lib/libopencorehw.so \\
-    vendor/htc/__DEVICE__/proprietary/libqcomm_omx.so:system/lib/libqcomm_omx.so \\
-    vendor/htc/__DEVICE__/proprietary/libstagefrighthw.so:system/lib/libstagefrighthw.so
+    vendor/htc/__DEVICE__/proprietary/libqcomm_omx.so:system/lib/libqcomm_omx.so
 EOF
 
 ./setup-makefiles.sh
diff --git a/full_sapphire.mk b/full_sapphire.mk
index 37e0303..cab34bd 100644
--- a/full_sapphire.mk
+++ b/full_sapphire.mk
@@ -21,6 +21,8 @@
 
 # Inherit from those products. Most specific first.
 $(call inherit-product, $(SRC_TARGET_DIR)/product/languages_small.mk)
+# This is where we'd set a backup provider if we had one
+#$(call inherit-product, device/sample/products/backup_overlay.mk)
 $(call inherit-product, device/htc/sapphire/device_sapphire_us.mk)
 $(call inherit-product, $(SRC_TARGET_DIR)/product/full.mk)
 
diff --git a/generic_sapphire.mk b/generic_sapphire.mk
deleted file mode 100644
index d8f29e6..0000000
--- a/generic_sapphire.mk
+++ /dev/null
@@ -1,28 +0,0 @@
-# Copyright (C) 2009 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 the build configuration for a generic Android
-# build for sapphire hardware. This cleanly combines a set of
-# device-specific aspects (drivers) with a device-agnostic
-# product configuration (apps).
-#
-
-# Inherit from those products. Most specific first.
-$(call inherit-product, device/htc/sapphire/device_sapphire_us.mk)
-$(call inherit-product, $(SRC_TARGET_DIR)/product/generic.mk)
-
-# Discard inherited values and use our own instead.
-PRODUCT_NAME := generic_sapphire
-PRODUCT_DEVICE := sapphire
diff --git a/kernel b/kernel
new file mode 100644
index 0000000..6993e15
--- /dev/null
+++ b/kernel
Binary files differ
diff --git a/unzip-files.sh b/unzip-files.sh
index 6d4580f..1e8d77b 100755
--- a/unzip-files.sh
+++ b/unzip-files.sh
@@ -14,11 +14,33 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+# This file is generated by device/htc/common/generate-blob-scripts.sh - DO NOT EDIT
+
 DEVICE=sapphire
 
 mkdir -p ../../../vendor/htc/$DEVICE/proprietary
-unzip -j -o ../../../${DEVICE}_update.zip system/bin/akmd system/etc/01_qcomm_omx.cfg system/etc/AudioFilter.csv system/etc/AudioPara4.csv system/etc/AudioPreProcess.csv system/etc/firmware/brf6300.bin system/etc/wifi/Fw1251r1c.bin system/lib/egl/libGLES_qcom.so system/lib/libaudioeq.so system/lib/libcamera.so system/lib/libgps.so system/lib/libhtc_acoustic.so system/lib/libhtc_ril.so system/lib/liblvmxipc.so system/lib/libmm-adspsvc.so system/lib/liboemcamera.so system/lib/libOmxCore.so system/lib/libOmxH264Dec.so system/lib/libOmxMpeg4Dec.so system/lib/libOmxVidEnc.so system/lib/libopencorehw.so system/lib/libqcomm_omx.so system/lib/libstagefrighthw.so -d ../../../vendor/htc/$DEVICE/proprietary
+unzip -j -o ../../../${DEVICE}_update.zip system/bin/akmd -d ../../../vendor/htc/$DEVICE/proprietary
 chmod 755 ../../../vendor/htc/$DEVICE/proprietary/akmd
+unzip -j -o ../../../${DEVICE}_update.zip system/etc/01_qcomm_omx.cfg -d ../../../vendor/htc/$DEVICE/proprietary
+unzip -j -o ../../../${DEVICE}_update.zip system/etc/AudioFilter.csv -d ../../../vendor/htc/$DEVICE/proprietary
+unzip -j -o ../../../${DEVICE}_update.zip system/etc/AudioPara4.csv -d ../../../vendor/htc/$DEVICE/proprietary
+unzip -j -o ../../../${DEVICE}_update.zip system/etc/AudioPreProcess.csv -d ../../../vendor/htc/$DEVICE/proprietary
+unzip -j -o ../../../${DEVICE}_update.zip system/etc/firmware/brf6300.bin -d ../../../vendor/htc/$DEVICE/proprietary
+unzip -j -o ../../../${DEVICE}_update.zip system/etc/wifi/Fw1251r1c.bin -d ../../../vendor/htc/$DEVICE/proprietary
+unzip -j -o ../../../${DEVICE}_update.zip system/lib/egl/libGLES_qcom.so -d ../../../vendor/htc/$DEVICE/proprietary
+unzip -j -o ../../../${DEVICE}_update.zip system/lib/libaudioeq.so -d ../../../vendor/htc/$DEVICE/proprietary
+unzip -j -o ../../../${DEVICE}_update.zip system/lib/libcamera.so -d ../../../vendor/htc/$DEVICE/proprietary
+unzip -j -o ../../../${DEVICE}_update.zip system/lib/libgps.so -d ../../../vendor/htc/$DEVICE/proprietary
+unzip -j -o ../../../${DEVICE}_update.zip system/lib/libhtc_acoustic.so -d ../../../vendor/htc/$DEVICE/proprietary
+unzip -j -o ../../../${DEVICE}_update.zip system/lib/libhtc_ril.so -d ../../../vendor/htc/$DEVICE/proprietary
+unzip -j -o ../../../${DEVICE}_update.zip system/lib/liblvmxipc.so -d ../../../vendor/htc/$DEVICE/proprietary
+unzip -j -o ../../../${DEVICE}_update.zip system/lib/libmm-adspsvc.so -d ../../../vendor/htc/$DEVICE/proprietary
+unzip -j -o ../../../${DEVICE}_update.zip system/lib/liboemcamera.so -d ../../../vendor/htc/$DEVICE/proprietary
+unzip -j -o ../../../${DEVICE}_update.zip system/lib/libOmxCore.so -d ../../../vendor/htc/$DEVICE/proprietary
+unzip -j -o ../../../${DEVICE}_update.zip system/lib/libOmxH264Dec.so -d ../../../vendor/htc/$DEVICE/proprietary
+unzip -j -o ../../../${DEVICE}_update.zip system/lib/libOmxMpeg4Dec.so -d ../../../vendor/htc/$DEVICE/proprietary
+unzip -j -o ../../../${DEVICE}_update.zip system/lib/libOmxVidEnc.so -d ../../../vendor/htc/$DEVICE/proprietary
+unzip -j -o ../../../${DEVICE}_update.zip system/lib/libqcomm_omx.so -d ../../../vendor/htc/$DEVICE/proprietary
 
 (cat << EOF) | sed s/__DEVICE__/$DEVICE/g > ../../../vendor/htc/$DEVICE/device_$DEVICE-vendor-blobs.mk
 # Copyright (C) 2010 The Android Open Source Project
@@ -35,12 +57,14 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-# This file is generated by device/htc/__DEVICE__/extract-files.sh
+# This file is generated by device/htc/__DEVICE__/unzip-files.sh - DO NOT EDIT
 
+# Prebuilt libraries that are needed to build open-source libraries
 PRODUCT_COPY_FILES := \\
-    vendor/htc/__DEVICE__/proprietary/libgps.so:obj/lib/libgps.so \\
-    vendor/htc/__DEVICE__/proprietary/libcamera.so:obj/lib/libcamera.so
+    vendor/htc/__DEVICE__/proprietary/libcamera.so:obj/lib/libcamera.so \\
+    vendor/htc/__DEVICE__/proprietary/libgps.so:obj/lib/libgps.so
 
+# All the blobs necessary for sapphire
 PRODUCT_COPY_FILES += \\
     vendor/htc/__DEVICE__/proprietary/akmd:system/bin/akmd \\
     vendor/htc/__DEVICE__/proprietary/01_qcomm_omx.cfg:system/etc/01_qcomm_omx.cfg \\
@@ -62,9 +86,7 @@
     vendor/htc/__DEVICE__/proprietary/libOmxH264Dec.so:system/lib/libOmxH264Dec.so \\
     vendor/htc/__DEVICE__/proprietary/libOmxMpeg4Dec.so:system/lib/libOmxMpeg4Dec.so \\
     vendor/htc/__DEVICE__/proprietary/libOmxVidEnc.so:system/lib/libOmxVidEnc.so \\
-    vendor/htc/__DEVICE__/proprietary/libopencorehw.so:system/lib/libopencorehw.so \\
-    vendor/htc/__DEVICE__/proprietary/libqcomm_omx.so:system/lib/libqcomm_omx.so \\
-    vendor/htc/__DEVICE__/proprietary/libstagefrighthw.so:system/lib/libstagefrighthw.so
+    vendor/htc/__DEVICE__/proprietary/libqcomm_omx.so:system/lib/libqcomm_omx.so
 EOF
 
 ./setup-makefiles.sh
diff --git a/wlan.ko b/wlan.ko
new file mode 100644
index 0000000..46a5827
--- /dev/null
+++ b/wlan.ko
Binary files differ