summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Android.mk21
-rwxr-xr-xBoardConfig.mk8
-rwxr-xr-xBoardConfigCommon.mk20
-rw-r--r--CleanSpec.mk1
-rw-r--r--bcm4329.kobin267700 -> 267700 bytes
-rw-r--r--cypress-touchkey.kcm79
-rw-r--r--cypress-touchkey.kl14
-rw-r--r--device.mk7
-rw-r--r--device_base.mk64
-rwxr-xr-xextract-files.sh8
-rw-r--r--full_crespo.mk7
-rw-r--r--gps.conf6
-rwxr-xr-xgps.xml40
-rw-r--r--herring-keypad.kcm15
-rw-r--r--herring-keypad.kl24
-rwxr-xr-xinit.herring.rc48
-rw-r--r--kernelbin2856948 -> 2867576 bytes
-rw-r--r--libaudio/Android.mk30
-rw-r--r--libaudio/AudioHardware.cpp9
-rw-r--r--libaudio/AudioHardware.h10
-rw-r--r--libaudio/AudioPolicyManager.cpp2
-rw-r--r--libaudio/AudioPolicyManager.h2
-rw-r--r--libcamera/Android.mk29
-rwxr-xr-xlibcamera/SecCamera.cpp100
-rw-r--r--libcamera/SecCamera.h21
-rw-r--r--libcamera/SecCameraHWInterface.cpp1026
-rw-r--r--libcamera/SecCameraHWInterface.h71
-rwxr-xr-xliblight/Android.mk4
-rw-r--r--liboverlay/Android.mk4
-rw-r--r--libs3cjpeg/Android.mk2
-rw-r--r--libsensors/Android.mk4
-rw-r--r--libstagefrighthw/Android.mk4
-rw-r--r--libstagefrighthw/SecHardwareRenderer.cpp228
-rw-r--r--libstagefrighthw/SecHardwareRenderer.h78
-rw-r--r--libstagefrighthw/stagefright_overlay_output.cpp51
-rw-r--r--media_profiles.xml10
-rw-r--r--mxt224_ts_input.idc4
-rwxr-xr-xnvram_net.txt58
-rw-r--r--overlay/frameworks/base/core/res/res/values/config.xml41
-rw-r--r--overlay/packages/wallpapers/Basic/res/drawable-hdpi/nexus_thumb.pngbin14743 -> 0 bytes
-rw-r--r--overlay/packages/wallpapers/Basic/res/drawable-hdpi/pyramid_background.pngbin688177 -> 0 bytes
-rw-r--r--overlay/packages/wallpapers/Basic/res/raw/nexus.rs313
-rw-r--r--overlay/packages/wallpapers/Basic/res/values/surfacemode.xml18
-rw-r--r--qwerty.kl90
-rw-r--r--recovery/recovery_ui.c3
-rw-r--r--s3c-keypad.kcm79
-rw-r--r--s3c-keypad.kl14
-rw-r--r--samsung_mfc_fw.binbin0 -> 300352 bytes
-rw-r--r--sec_jack.kcm15
-rw-r--r--sec_jack.kl14
-rw-r--r--sec_mm/sec_omx/sec_codecs/video/mfc_c110/dec/Android.mk2
-rw-r--r--sec_mm/sec_omx/sec_codecs/video/mfc_c110/enc/Android.mk2
-rw-r--r--sec_mm/sec_omx/sec_omx_component/common/Android.mk2
-rw-r--r--sec_mm/sec_omx/sec_omx_component/common/SEC_OMX_Basecomponent.c4
-rw-r--r--sec_mm/sec_omx/sec_omx_component/video/dec/h264dec/Android.mk2
-rw-r--r--sec_mm/sec_omx/sec_omx_component/video/dec/mpeg4dec/Android.mk2
-rw-r--r--sec_mm/sec_omx/sec_omx_component/video/enc/h264enc/Android.mk2
-rw-r--r--sec_mm/sec_omx/sec_omx_component/video/enc/mpeg4enc/Android.mk2
-rw-r--r--sec_mm/sec_omx/sec_omx_core/Android.mk2
-rw-r--r--sec_mm/sec_omx/sec_osal/Android.mk2
-rw-r--r--self-extractors/PART112
-rw-r--r--self-extractors/PART222
-rw-r--r--self-extractors/PART312
-rw-r--r--self-extractors/PROLOGUE2
-rw-r--r--self-extractors/akm/COPYRIGHT1
-rw-r--r--self-extractors/akm/LICENSE1
-rw-r--r--self-extractors/akm/staging/BoardConfigCrespo.mk13
-rw-r--r--self-extractors/akm/staging/device-crespo.mk17
-rw-r--r--self-extractors/broadcom/COPYRIGHT1
-rw-r--r--self-extractors/broadcom/LICENSE218
-rw-r--r--self-extractors/broadcom/staging/BoardConfigCrespo.mk13
-rw-r--r--self-extractors/broadcom/staging/device-crespo.mk19
-rw-r--r--self-extractors/cypress/COPYRIGHT1
-rw-r--r--self-extractors/cypress/LICENSE1
-rw-r--r--self-extractors/cypress/staging/BoardConfigCrespo.mk13
-rw-r--r--self-extractors/cypress/staging/device-crespo.mk17
-rwxr-xr-xself-extractors/generate-packages.sh118
-rw-r--r--self-extractors/imgtec/COPYRIGHT1
-rw-r--r--self-extractors/imgtec/LICENSE218
-rw-r--r--self-extractors/imgtec/staging/BoardConfigCrespo.mk13
-rw-r--r--self-extractors/imgtec/staging/device-crespo.mk29
-rw-r--r--self-extractors/nxp/COPYRIGHT1
-rw-r--r--self-extractors/nxp/LICENSE218
-rw-r--r--self-extractors/nxp/staging/BoardConfigCrespo.mk13
-rw-r--r--self-extractors/nxp/staging/device-crespo.mk17
-rw-r--r--self-extractors/root/BoardConfigVendor.mk20
-rw-r--r--self-extractors/root/device-vendor.mk20
-rw-r--r--self-extractors/samsung/COPYRIGHT1
-rw-r--r--self-extractors/samsung/LICENSE225
-rw-r--r--self-extractors/samsung/staging/BoardConfigCrespo.mk13
-rw-r--r--self-extractors/samsung/staging/device-crespo.mk22
-rwxr-xr-xsetup-makefiles.sh59
-rw-r--r--setup_fs.c75
-rwxr-xr-xunzip-files.sh8
-rw-r--r--vold.fstab5
95 files changed, 2517 insertions, 1640 deletions
diff --git a/Android.mk b/Android.mk
index dc8cf1a..1020702 100644
--- a/Android.mk
+++ b/Android.mk
@@ -14,27 +14,6 @@
LOCAL_PATH := $(call my-dir)
-ifneq ($(filter crespo crespo4g,$(TARGET_DEVICE)),)
-
-include $(CLEAR_VARS)
-LOCAL_SRC_FILES := s3c-keypad.kcm
-LOCAL_MODULE_TAGS := optional
-include $(BUILD_KEY_CHAR_MAP)
-
-include $(CLEAR_VARS)
-LOCAL_SRC_FILES := cypress-touchkey.kcm
-LOCAL_MODULE_TAGS := optional
-include $(BUILD_KEY_CHAR_MAP)
-
-include $(CLEAR_VARS)
-LOCAL_SRC_FILES := setup_fs.c
-LOCAL_MODULE := setup_fs
-LOCAL_MODULE_TAGS := optional
-#LOCAL_SHARED_LIBRARIES += libext4_utils libz
-include $(BUILD_EXECUTABLE)
-
-endif
-
ifneq ($(TARGET_SIMULATOR),true)
include $(call all-makefiles-under,$(LOCAL_PATH))
endif
diff --git a/BoardConfig.mk b/BoardConfig.mk
index e198b9b..2927c72 100755
--- a/BoardConfig.mk
+++ b/BoardConfig.mk
@@ -17,14 +17,6 @@
# Product-specific compile-time definitions.
#
-# Set this up here so that BoardConfigVendor.mk can override it
-BOARD_USES_GENERIC_AUDIO := false
-
-BOARD_USES_LIBSECRIL_STUB := true
-
-BOARD_NO_PAGE_FLIPPING := true
-BOARD_NO_32BPP := true
-
# Use the non-open-source parts, if they're present
-include vendor/samsung/crespo/BoardConfigVendor.mk
diff --git a/BoardConfigCommon.mk b/BoardConfigCommon.mk
index 3fd9019..132b76b 100755
--- a/BoardConfigCommon.mk
+++ b/BoardConfigCommon.mk
@@ -38,17 +38,19 @@ TARGET_SEC_INTERNAL_STORAGE := false
TARGET_ARCH_VARIANT := armv7-a-neon
ARCH_ARM_HAVE_TLS_REGISTER := true
-USE_CAMERA_STUB := false
-ifeq ($(USE_CAMERA_STUB),false)
-BOARD_CAMERA_LIBRARIES := libcamera
-endif
+# USE_CAMERA_STUB := true
+# ifeq ($(USE_CAMERA_STUB),false)
+# BOARD_CAMERA_LIBRARIES := libcamera
+# endif
BOARD_USES_HGL := true
-BOARD_USES_OVERLAY := true
+##BOARD_USES_OVERLAY := true
+BOARD_USES_GENERIC_AUDIO := false
DEFAULT_FB_NUM := 2
-BOARD_NAND_PAGE_SIZE := 4096 -s 128
+BOARD_NAND_PAGE_SIZE := 4096
+BOARD_NAND_SPARE_SIZE := 128
BOARD_KERNEL_BASE := 0x30000000
BOARD_KERNEL_PAGESIZE := 4096
@@ -63,12 +65,12 @@ BOARD_USERDATAIMAGE_PARTITION_SIZE := 1073741824
BOARD_FLASH_BLOCK_SIZE := 4096
# Connectivity - Wi-Fi
-WPA_SUPPLICANT_VERSION := VER_0_6_X
+WPA_SUPPLICANT_VERSION := VER_0_8_X
BOARD_WPA_SUPPLICANT_DRIVER := WEXT
BOARD_WLAN_DEVICE := bcm4329
+BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_wext
WIFI_DRIVER_MODULE_PATH := "/system/modules/bcm4329.ko"
WIFI_DRIVER_FW_STA_PATH := "/vendor/firmware/fw_bcm4329.bin"
WIFI_DRIVER_FW_AP_PATH := "/vendor/firmware/fw_bcm4329_apsta.bin"
WIFI_DRIVER_MODULE_NAME := "bcm4329"
-WIFI_DRIVER_MODULE_ARG := "firmware_path=/vendor/firmware/fw_bcm4329.bin nvram_path=/vendor/firmware/nvram_net.txt"
-
+WIFI_DRIVER_MODULE_ARG := "iface_name=wlan0 firmware_path=/vendor/firmware/fw_bcm4329.bin nvram_path=/vendor/firmware/nvram_net.txt"
diff --git a/CleanSpec.mk b/CleanSpec.mk
index 6921642..369698e 100644
--- a/CleanSpec.mk
+++ b/CleanSpec.mk
@@ -58,3 +58,4 @@ $(call add-clean-step, rm -rf $(OUT_DIR)/target/product/crespo/system/etc/asound
$(call add-clean-step, rm -rf $(OUT_DIR)/target/product/crespo/system/usr/share/alsa)
$(call add-clean-step, rm -rf $(OUT_DIR)/target/product/crespo/obj/PACKAGING/systemimage_intermediates)
$(call add-clean-step, rm -rf $(OUT_DIR)/target/product/crespo/obj/SHARED_LIBRARIES/libaudio_intermediates)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/root/default.prop)
diff --git a/bcm4329.ko b/bcm4329.ko
index 0e85bf3..44f3585 100644
--- a/bcm4329.ko
+++ b/bcm4329.ko
Binary files differ
diff --git a/cypress-touchkey.kcm b/cypress-touchkey.kcm
index 8056364..7ee6e5a 100644
--- a/cypress-touchkey.kcm
+++ b/cypress-touchkey.kcm
@@ -1,64 +1,15 @@
-[type=QWERTY]
-
-# keycode display number base caps fn caps_fn
-
-A 'A' '2' 'a' 'A' '#' 0x00
-B 'B' '2' 'b' 'B' '<' 0x00
-C 'C' '2' 'c' 'C' '9' 0x00E7
-D 'D' '3' 'd' 'D' '5' 0x00
-E 'E' '3' 'e' 'E' '2' 0x0301
-F 'F' '3' 'f' 'F' '6' 0x00A5
-G 'G' '4' 'g' 'G' '-' '_'
-H 'H' '4' 'h' 'H' '[' '{'
-I 'I' '4' 'i' 'I' '$' 0x0302
-J 'J' '5' 'j' 'J' ']' '}'
-K 'K' '5' 'k' 'K' '"' '~'
-L 'L' '5' 'l' 'L' ''' '`'
-M 'M' '6' 'm' 'M' '!' 0x00
-N 'N' '6' 'n' 'N' '>' 0x0303
-O 'O' '6' 'o' 'O' '(' 0x00
-P 'P' '7' 'p' 'P' ')' 0x00
-Q 'Q' '7' 'q' 'Q' '*' 0x0300
-R 'R' '7' 'r' 'R' '3' 0x20AC
-S 'S' '7' 's' 'S' '4' 0x00DF
-T 'T' '8' 't' 'T' '+' 0x00A3
-U 'U' '8' 'u' 'U' '&' 0x0308
-V 'V' '8' 'v' 'V' '=' '^'
-W 'W' '9' 'w' 'W' '1' 0x00
-X 'X' '9' 'x' 'X' '8' 0xEF00
-Y 'Y' '9' 'y' 'Y' '%' 0x00A1
-Z 'Z' '9' 'z' 'Z' '7' 0x00
-
-# on pc keyboards
-COMMA ',' ',' ',' ';' ';' '|'
-PERIOD '.' '.' '.' ':' ':' 0x2026
-AT '@' '0' '@' '0' '0' 0x2022
-SLASH '/' '/' '/' '?' '?' '\'
-
-SPACE 0x20 0x20 0x20 0x20 0xEF01 0xEF01
-ENTER 0xa 0xa 0xa 0xa 0xa 0xa
-
-TAB 0x9 0x9 0x9 0x9 0x9 0x9
-0 '0' '0' '0' ')' ')' ')'
-1 '1' '1' '1' '!' '!' '!'
-2 '2' '2' '2' '@' '@' '@'
-3 '3' '3' '3' '#' '#' '#'
-4 '4' '4' '4' '$' '$' '$'
-5 '5' '5' '5' '%' '%' '%'
-6 '6' '6' '6' '^' '^' '^'
-7 '7' '7' '7' '&' '&' '&'
-8 '8' '8' '8' '*' '*' '*'
-9 '9' '9' '9' '(' '(' '('
-
-GRAVE '`' '`' '`' '~' '`' '~'
-MINUS '-' '-' '-' '_' '-' '_'
-EQUALS '=' '=' '=' '+' '=' '+'
-LEFT_BRACKET '[' '[' '[' '{' '[' '{'
-RIGHT_BRACKET ']' ']' ']' '}' ']' '}'
-BACKSLASH '\' '\' '\' '|' '\' '|'
-SEMICOLON ';' ';' ';' ':' ';' ':'
-APOSTROPHE ''' ''' ''' '"' ''' '"'
-STAR '*' '*' '*' '*' '*' '*'
-POUND '#' '#' '#' '#' '#' '#'
-PLUS '+' '+' '+' '+' '+' '+'
-
+# Copyright (C) 2010 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.
+
+type SPECIAL_FUNCTION
diff --git a/cypress-touchkey.kl b/cypress-touchkey.kl
index 79d6480..c884476 100644
--- a/cypress-touchkey.kl
+++ b/cypress-touchkey.kl
@@ -1,3 +1,17 @@
+# Copyright (C) 2010 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.
+
key 139 MENU VIRTUAL
key 102 HOME VIRTUAL
key 158 BACK VIRTUAL
diff --git a/device.mk b/device.mk
index c738286..b028f3c 100644
--- a/device.mk
+++ b/device.mk
@@ -36,7 +36,12 @@
# These are the hardware-specific features
PRODUCT_COPY_FILES := \
- frameworks/base/data/etc/android.hardware.telephony.gsm.xml:system/etc/permissions/android.hardware.telephony.gsm.xml \
+ frameworks/base/data/etc/android.hardware.telephony.gsm.xml:system/etc/permissions/android.hardware.telephony.gsm.xml
+
+# GPS config
+PRODUCT_COPY_FILES += \
+ device/samsung/crespo/gps.xml:system/vendor/etc/gps.xml \
+ device/samsung/crespo/gps.conf:system/etc/gps.conf
$(call inherit-product, device/samsung/crespo/device_base.mk)
diff --git a/device_base.mk b/device_base.mk
index 705820e..724c1b6 100644
--- a/device_base.mk
+++ b/device_base.mk
@@ -51,12 +51,28 @@ PRODUCT_COPY_FILES += \
device/samsung/crespo/init.herring.rc:root/init.herring.rc \
device/samsung/crespo/ueventd.herring.rc:root/ueventd.herring.rc
-# Prebuilt kl keymaps
+# Prebuilt kl and kcm keymaps
PRODUCT_COPY_FILES += \
device/samsung/crespo/s3c-keypad.kl:system/usr/keylayout/s3c-keypad.kl \
+ device/samsung/crespo/s3c-keypad.kcm:system/usr/keychars/s3c-keypad.kcm \
+ device/samsung/crespo/herring-keypad.kl:system/usr/keylayout/herring-keypad.kl \
+ device/samsung/crespo/herring-keypad.kcm:system/usr/keychars/herring-keypad.kcm \
device/samsung/crespo/cypress-touchkey.kl:system/usr/keylayout/cypress-touchkey.kl \
+ device/samsung/crespo/cypress-touchkey.kcm:system/usr/keychars/cypress-touchkey.kcm \
device/samsung/crespo/sec_jack.kl:system/usr/keylayout/sec_jack.kl \
- device/samsung/crespo/herring-keypad.kl:system/usr/keylayout/herring-keypad.kl
+ device/samsung/crespo/sec_jack.kcm:system/usr/keychars/sec_jack.kcm
+
+#Bluetooth setup
+PRODUCT_COPY_FILES += \
+ system/bluetooth/data/main.conf:system/etc/bluetooth/main.conf \
+
+#NVRAM setup
+PRODUCT_COPY_FILES += \
+ device/samsung/crespo/nvram_net.txt:system/vendor/firmware/nvram_net.txt
+
+#MFC Firmware
+PRODUCT_COPY_FILES += \
+ device/samsung/crespo/samsung_mfc_fw.bin:system/vendor/firmware/samsung_mfc_fw.bin
# Generated kcm keymaps
PRODUCT_PACKAGES := \
@@ -90,12 +106,37 @@ PRODUCT_PACKAGES += \
overlay.s5pc110 \
sensors.herring
+# Camera
+PRODUCT_PACKAGES += \
+ camera.s5pc110
+
+# audio
+PRODUCT_PACKAGES += \
+ audio_policy.herring \
+ audio.primary.herring \
+ audio.a2dp.default
+
# Libs
PRODUCT_PACKAGES += \
libcamera \
libstagefrighthw \
com.android.future.usb.accessory
+# NFC
+PRODUCT_PACKAGES += \
+ libnfc \
+ libnfc_jni \
+ Nfc \
+ Tag
+
+# Live Wallpapers
+PRODUCT_PACKAGES += \
+ LiveWallpapers \
+ LiveWallpapersPicker \
+ MagicSmokeWallpapers \
+ VisualizationWallpapers \
+ librs_jni
+
# Input device calibration files
PRODUCT_COPY_FILES += \
device/samsung/crespo/mxt224_ts_input.idc:system/usr/idc/mxt224_ts_input.idc
@@ -125,19 +166,20 @@ PRODUCT_PROPERTY_OVERRIDES := \
# Note that the only such settings should be the ones that are too low-level to
# be reachable from resources or other mechanisms.
PRODUCT_PROPERTY_OVERRIDES += \
- wifi.interface=eth0 \
- wifi.supplicant_scan_interval=15 \
- dalvik.vm.heapsize=32m
+ wifi.interface=wlan0 \
+ wifi.supplicant_scan_interval=15
+
+# Set default USB interface
+PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \
+ persist.sys.usb.config=mass_storage
+
+include frameworks/base/build/phone-hdpi-512-dalvik-heap.mk
# we have enough storage space to hold precise GC data
PRODUCT_TAGS += dalvik.gc.type-precise
-# Screen density is actually considered a locale (since it is taken into account
-# the the build-time selection of resources). The product definitions including
-# this file must pay attention to the fact that the first entry in the final
-# PRODUCT_LOCALES expansion must not be a density.
-PRODUCT_LOCALES := hdpi
-
+# Screen size is "normal", density is "hdpi"
+PRODUCT_AAPT_CONFIG := normal hdpi
ifeq ($(TARGET_PREBUILT_WIFI_MODULE),)
LOCAL_WIFI_MODULE := device/samsung/crespo/bcm4329.ko
diff --git a/extract-files.sh b/extract-files.sh
index ae73d55..e500c9b 100755
--- a/extract-files.sh
+++ b/extract-files.sh
@@ -20,18 +20,14 @@ DEVICE=crespo
MANUFACTURER=samsung
mkdir -p ../../../vendor/$MANUFACTURER/$DEVICE/proprietary
-adb pull /system/etc/gps.conf ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/gps.conf
adb pull /system/lib/libpn544_fw.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/libpn544_fw.so
adb pull /system/lib/libsecril-client.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/libsecril-client.so
adb pull /system/vendor/bin/gpsd ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/gpsd
chmod 755 ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/gpsd
adb pull /system/vendor/bin/pvrsrvinit ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/pvrsrvinit
chmod 755 ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/pvrsrvinit
-adb pull /system/vendor/etc/gps.xml ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/gps.xml
adb pull /system/vendor/firmware/bcm4329.hcd ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/bcm4329.hcd
adb pull /system/vendor/firmware/cypress-touchkey.bin ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/cypress-touchkey.bin
-adb pull /system/vendor/firmware/nvram_net.txt ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/nvram_net.txt
-adb pull /system/vendor/firmware/samsung_mfc_fw.bin ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/samsung_mfc_fw.bin
adb pull /system/vendor/lib/egl/libEGL_POWERVR_SGX540_120.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/libEGL_POWERVR_SGX540_120.so
adb pull /system/vendor/lib/egl/libGLESv1_CM_POWERVR_SGX540_120.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/libGLESv1_CM_POWERVR_SGX540_120.so
adb pull /system/vendor/lib/egl/libGLESv2_POWERVR_SGX540_120.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/libGLESv2_POWERVR_SGX540_120.so
@@ -71,16 +67,12 @@ PRODUCT_COPY_FILES := \\
# All the blobs necessary for crespo
PRODUCT_COPY_FILES += \\
- vendor/__MANUFACTURER__/__DEVICE__/proprietary/gps.conf:system/etc/gps.conf \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/libpn544_fw.so:system/lib/libpn544_fw.so \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/libsecril-client.so:system/lib/libsecril-client.so \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/gpsd:system/vendor/bin/gpsd \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/pvrsrvinit:system/vendor/bin/pvrsrvinit \\
- vendor/__MANUFACTURER__/__DEVICE__/proprietary/gps.xml:system/vendor/etc/gps.xml \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/bcm4329.hcd:system/vendor/firmware/bcm4329.hcd \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/cypress-touchkey.bin:system/vendor/firmware/cypress-touchkey.bin \\
- vendor/__MANUFACTURER__/__DEVICE__/proprietary/nvram_net.txt:system/vendor/firmware/nvram_net.txt \\
- vendor/__MANUFACTURER__/__DEVICE__/proprietary/samsung_mfc_fw.bin:system/vendor/firmware/samsung_mfc_fw.bin \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/libEGL_POWERVR_SGX540_120.so:system/vendor/lib/egl/libEGL_POWERVR_SGX540_120.so \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/libGLESv1_CM_POWERVR_SGX540_120.so:system/vendor/lib/egl/libGLESv1_CM_POWERVR_SGX540_120.so \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/libGLESv2_POWERVR_SGX540_120.so:system/vendor/lib/egl/libGLESv2_POWERVR_SGX540_120.so \\
diff --git a/full_crespo.mk b/full_crespo.mk
index c6957e0..68b8216 100644
--- a/full_crespo.mk
+++ b/full_crespo.mk
@@ -19,14 +19,17 @@
# product configuration (apps).
#
+# Get the long list of APNs
+PRODUCT_COPY_FILES := device/sample/etc/apns-full-conf.xml:system/etc/apns-conf.xml
+
# Inherit from those products. Most specific first.
-$(call inherit-product, $(SRC_TARGET_DIR)/product/languages_full.mk)
+$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base_telephony.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/samsung/crespo/device.mk)
-$(call inherit-product, $(SRC_TARGET_DIR)/product/full.mk)
# Discard inherited values and use our own instead.
PRODUCT_NAME := full_crespo
PRODUCT_DEVICE := crespo
+PRODUCT_BRAND := Android
PRODUCT_MODEL := Full Android on Crespo
diff --git a/gps.conf b/gps.conf
new file mode 100644
index 0000000..bd431a6
--- /dev/null
+++ b/gps.conf
@@ -0,0 +1,6 @@
+NTP_SERVER=north-america.pool.ntp.org
+XTRA_SERVER_1=http://xtra1.gpsonextra.net/xtra.bin
+XTRA_SERVER_2=http://xtra2.gpsonextra.net/xtra.bin
+XTRA_SERVER_3=http://xtra3.gpsonextra.net/xtra.bin
+SUPL_HOST=supl.google.com
+SUPL_PORT=7276
diff --git a/gps.xml b/gps.xml
new file mode 100755
index 0000000..15b7cc6
--- /dev/null
+++ b/gps.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="utf-8"?>
+<glgps xmlns="http://www.glpals.com/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.glpals.com/ glconfig.xsd" >
+ <!--HAL Confguration -->
+ <hal
+ acPortName="/dev/s3c2410_serial1" lBaudRate="115200" cLogEnabled="false" cLogEnableInitState="false" acLogDirectory="/data/gps/log/" ltoFileName="lto2.dat"
+ enhanced-assisted="false" cp-enhanced-assisted="true" TISEnabled="false" RILEnabled="true" LPmode="false" cp-cold-start="false" cp-guard-time-sec="2"
+ arp-supl-enable="true" arp-supl-cap-msb="true" arp-supl-cap-msa="true" arp-supl-cap-ecid="false"
+ acSuplServer="supl.google.com" SuplPort="7276"
+ LbsEnable="true" LbsLocal="false" LbsServer="bcmls2.glpals.com" LbsPort="7275" LbsSyncLto="true" LbsSyncCells="true" LbsWlanEnable="false"
+ LbsSyncLtoThresholdDays="3"
+ gpioNStdbyPath="/sys/class/sec/gps/GPS_PWR_EN/value"
+ gpioNResetPath="/sys/class/sec/gps/GPS_nRST/value"
+ gpioDelayMs="250"
+ lcsApiSockName="/dev/socket/gps"
+ acNvStoDir="/data/gps/"
+ />
+
+ <!-- Parameters passed to GlEngine -->
+ <!--gll
+ LogPriMask="LOG_DEBUG"
+ LogFacMask="LOG_GLLAPI | LOG_DEVIA | LOG_NMEA | LOG_RAWDATA | LOG_DEVMS | LOG_ASIC_IO | LOG_BBTEST | LOG_DEVET | LOG_MESM | LOG_DEVKF | LOG_DEVJG | LOG_DEVMR"
+ FrqPlan="FRQ_PLAN_10MHZ_2PPM_10MHZ_100PPB" FrqPlan="FRQ_PLAN_10MHZ_2PPM" "FRQ_PLAN_16_8MHZ_2PPM"
+ RfType="GL_RF_PALS7" "GL_RF_BARRACUDA" "GL_RF_2075_LN22" "GL_RF_2075_BRCM" "GL_RF_PALS7_BRCM" "GL_RF_BARRACUDA_BRCM" "GL_RF_BARRACUDA_EXT_LNA"
+ NOTE: "GL_RF_BARRACUDA_EXT_LNA" should be used for BAS
+ LbsEnable="true" LbsLocal="true" LbsServer="bcmlbsqa1.glpals.com" LbsPort="7275" LbsSyncTimeSec = "60" LbsSyncLto="true" LbsSyncCells="true"
+ /-->
+
+ <!-- NOTE: BrcmRFwildBase, BrcmRFclkDiv, anBrcmRFclkRefHz only needed for Broadcom RF front end test chips
+ ( i.e. GL_RF_2075_BRCM and GL_RF_PALS7_BRCM ) -->
+
+ <gll
+ LogPriMask="LOG_DEBUG"
+ LogFacMask="LOG_GLLAPI | LOG_DEVIA | LOG_NMEA | LOG_RAWDATA | LOG_DEVMS | LOG_ASIC_IO | LOG_BBTEST | LOG_DEVET | LOG_MESM | LOG_DEVKF | LOG_DEVJG | LOG_DEVMR"
+ FrqPlan="FRQ_PLAN_26MHZ_2PPM_26MHZ_300PPB"
+ RfType="GL_RF_4751_DANUBE_EXT_LNA"
+ WarmStandbyTimeout1Seconds="5"
+ WarmStandbyTimeout2Seconds="10"
+ >
+ </gll>
+</glgps>
diff --git a/herring-keypad.kcm b/herring-keypad.kcm
new file mode 100644
index 0000000..7ee6e5a
--- /dev/null
+++ b/herring-keypad.kcm
@@ -0,0 +1,15 @@
+# Copyright (C) 2010 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.
+
+type SPECIAL_FUNCTION
diff --git a/herring-keypad.kl b/herring-keypad.kl
index 8720050..320a340 100644
--- a/herring-keypad.kl
+++ b/herring-keypad.kl
@@ -1,7 +1,17 @@
-key 115 VOLUME_UP WAKE
-key 114 VOLUME_DOWN WAKE
-key 116 POWER WAKE
-key 139 MENU VIRTUAL
-key 102 HOME VIRTUAL
-key 158 BACK VIRTUAL
-key 217 SEARCH VIRTUAL
+# Copyright (C) 2010 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.
+
+114 VOLUME_DOWN WAKE
+115 VOLUME_UP WAKE
+116 POWER WAKE
diff --git a/init.herring.rc b/init.herring.rc
index 2936b02..4c4d991 100755
--- a/init.herring.rc
+++ b/init.herring.rc
@@ -6,16 +6,14 @@ on boot
setprop ro.radio.noril yes
setprop ro.bt.bdaddr_path "/efs/bluetooth/bt_addr"
+ setprop ro.crypto.keyfile.userdata /efs/userdata_footer
+
# fake some battery state
setprop status.battery.state Slow
setprop status.battery.level 5
setprop status.battery.level_raw 50
setprop status.battery.level_scale 9
-# wi-fi
- mkdir /data/misc/wifi/sockets 0770 wifi wifi
- mkdir /data/misc/dhcp 0770 dhcp dhcp
-
# phone
setprop ro.telephony.call_ring.multiple 0
@@ -37,6 +35,10 @@ on fs
mount ext4 /dev/block/platform/s3c-sdhci.0/by-name/system /system wait ro
mount ext4 /dev/block/platform/s3c-sdhci.0/by-name/userdata /data wait noatime nosuid nodev
+ export EXTERNAL_STORAGE /mnt/sdcard
+ mkdir /mnt/sdcard 0000 system system
+ symlink /mnt/sdcard /sdcard
+
# permissions for bluetooth.
chown bluetooth bluetooth /efs/bluetooth
chown bluetooth bluetooth ro.bt.bdaddr_path
@@ -58,52 +60,80 @@ on fs
# Permissions for System Server and daemons.
chown system system /sys/class/backlight/s5p_bl/brightness
+on post-fs-data
+# wi-fi
+ mkdir /data/misc/wifi/sockets 0770 wifi wifi
+ mkdir /data/misc/dhcp 0770 dhcp dhcp
+
+ setprop vold.post_fs_data_done 1
+
service gpsd /system/vendor/bin/gpsd -c /vendor/etc/gps.xml
+ class main
socket gps seqpacket 0660 gps system
user gps
group system inet
# create filesystems if necessary
service setup_fs /system/bin/setup_fs /dev/block/platform/s3c-sdhci.0/by-name/userdata
+ class core
user root
group root
oneshot
# 3D init
service pvrsrvinit /system/vendor/bin/pvrsrvinit
+ class core
user root
group root
oneshot
-service wpa_supplicant /system/bin/wpa_supplicant -Dwext -ieth0 -c/data/misc/wifi/wpa_supplicant.conf
- socket wpa_eth0 dgram 0660 wifi wifi
+service wpa_supplicant /system/bin/wpa_supplicant -Dwext -iwlan0 -c/data/misc/wifi/wpa_supplicant.conf
+ class main
+ socket wpa_wlan0 dgram 0660 wifi wifi
disabled
oneshot
# DHCPCD
# wi-fi
-service dhcpcd_eth0 /system/bin/dhcpcd -ABKL
+service dhcpcd_wlan0 /system/bin/dhcpcd -ABKL
+ class main
disabled
oneshot
# wimax
service dhcpcd_uwbr0 /system/bin/dhcpcd -ABKL
+ class main
+ disabled
+ oneshot
+
+# bluetooth
+service dhcpcd_bnep0 /system/bin/dhcpcd -ABKL
+ class main
disabled
oneshot
# IP Renew
# wi-fi
-service iprenew_eth0 /system/bin/dhcpcd -n
+service iprenew_wlan0 /system/bin/dhcpcd -n
+ class main
disabled
oneshot
# wimax
service iprenew_uwbr0 /system/bin/dhcpcd -n
+ class main
+ disabled
+ oneshot
+
+# bluetooth
+service iprenew_bnep0 /system/bin/dhcpcd -n
+ class main
disabled
oneshot
service hciattach /system/bin/brcm_patchram_plus --enable_hci --enable_lpm \
--baudrate 3000000 --patchram /vendor/firmware/bcm4329.hcd /dev/s3c2410_serial0
+ class main
user bluetooth
group bluetooth net_bt_admin
disabled
@@ -111,10 +141,12 @@ service hciattach /system/bin/brcm_patchram_plus --enable_hci --enable_lpm \
# bugreport is triggered by holding down volume down, volume up and power
service bugreport /system/bin/dumpstate -d -v -o /sdcard/bugreports/bugreport
+ class main
disabled
oneshot
keycodes 114 115 116
service wimax_route /system/bin/route add default dev uwbr0
+ class main
disabled
oneshot
diff --git a/kernel b/kernel
index 1dc0329..78d5802 100644
--- a/kernel
+++ b/kernel
Binary files differ
diff --git a/libaudio/Android.mk b/libaudio/Android.mk
index 726859b..9dbe57d 100644
--- a/libaudio/Android.mk
+++ b/libaudio/Android.mk
@@ -1,7 +1,5 @@
LOCAL_PATH:= $(call my-dir)
-ifneq ($(filter crespo crespo4g,$(TARGET_DEVICE)),)
-
include $(CLEAR_VARS)
LOCAL_SRC_FILES:= aplay.c alsa_pcm.c alsa_mixer.c
LOCAL_MODULE:= aplay
@@ -25,12 +23,12 @@ include $(BUILD_EXECUTABLE)
include $(CLEAR_VARS)
LOCAL_SRC_FILES:= AudioHardware.cpp alsa_mixer.c alsa_pcm.c
-LOCAL_MODULE:= libaudio
-LOCAL_STATIC_LIBRARIES:= libaudiointerface
-LOCAL_SHARED_LIBRARIES:= libc libcutils libutils libmedia libhardware_legacy
-ifeq ($(BOARD_HAVE_BLUETOOTH),true)
- LOCAL_SHARED_LIBRARIES += liba2dp
-endif
+LOCAL_MODULE := audio.primary.herring
+LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw
+LOCAL_STATIC_LIBRARIES:= libmedia_helper
+LOCAL_SHARED_LIBRARIES:= libcutils libutils libmedia libhardware_legacy
+LOCAL_WHOLE_STATIC_LIBRARIES := libaudiohw_legacy
+LOCAL_MODULE_TAGS := optional
ifeq ($(TARGET_SIMULATOR),true)
LOCAL_LDLIBS += -ldl
@@ -41,13 +39,17 @@ endif
include $(BUILD_SHARED_LIBRARY)
include $(CLEAR_VARS)
-LOCAL_SRC_FILES:= AudioPolicyManager.cpp
-LOCAL_MODULE:= libaudiopolicy
-LOCAL_STATIC_LIBRARIES:= libaudiopolicybase
-LOCAL_SHARED_LIBRARIES:= libc libcutils libutils libmedia
+
+LOCAL_SRC_FILES := AudioPolicyManager.cpp
+LOCAL_SHARED_LIBRARIES := libcutils libutils libmedia
+LOCAL_STATIC_LIBRARIES := libmedia_helper
+LOCAL_WHOLE_STATIC_LIBRARIES := libaudiopolicy_legacy
+LOCAL_MODULE := audio_policy.herring
+LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw
+LOCAL_MODULE_TAGS := optional
+
ifeq ($(BOARD_HAVE_BLUETOOTH),true)
LOCAL_CFLAGS += -DWITH_A2DP
endif
-include $(BUILD_SHARED_LIBRARY)
-endif
+include $(BUILD_SHARED_LIBRARY)
diff --git a/libaudio/AudioHardware.cpp b/libaudio/AudioHardware.cpp
index 2ac7b67..777b6eb 100644
--- a/libaudio/AudioHardware.cpp
+++ b/libaudio/AudioHardware.cpp
@@ -41,7 +41,7 @@ extern "C" {
}
-namespace android {
+namespace android_audio_legacy {
const uint32_t AudioHardware::inputSamplingRates[] = {
8000, 11025, 16000, 22050, 44100
@@ -76,7 +76,6 @@ enum {
const char *AudioHardware::inputPathNameDefault = "Default";
const char *AudioHardware::inputPathNameCamcorder = "Camcorder";
const char *AudioHardware::inputPathNameVoiceRecognition = "Voice Recognition";
-const char *AudioHardware::inputPathNameVoiceCommunication = "Voice Communication";
AudioHardware::AudioHardware() :
mInit(false),
@@ -958,11 +957,9 @@ status_t AudioHardware::setInputSource_l(audio_source source)
const char* sourceName;
switch (source) {
case AUDIO_SOURCE_DEFAULT: // intended fall-through
- case AUDIO_SOURCE_MIC:
- sourceName = inputPathNameDefault;
- break;
+ case AUDIO_SOURCE_MIC: // intended fall-through
case AUDIO_SOURCE_VOICE_COMMUNICATION:
- sourceName = inputPathNameVoiceCommunication;
+ sourceName = inputPathNameDefault;
break;
case AUDIO_SOURCE_CAMCORDER:
sourceName = inputPathNameCamcorder;
diff --git a/libaudio/AudioHardware.h b/libaudio/AudioHardware.h
index c4f04e8..dc83921 100644
--- a/libaudio/AudioHardware.h
+++ b/libaudio/AudioHardware.h
@@ -34,7 +34,14 @@ extern "C" {
struct mixer_ctl;
};
-namespace android {
+namespace android_audio_legacy {
+ using android::AutoMutex;
+ using android::Mutex;
+ using android::RefBase;
+ using android::SortedVector;
+ using android::sp;
+ using android::String16;
+ using android::Vector;
// TODO: determine actual audio DSP and hardware latency
// Additionnal latency introduced by audio DSP and hardware in ms
@@ -78,7 +85,6 @@ public:
static const char *inputPathNameDefault;
static const char *inputPathNameCamcorder;
static const char *inputPathNameVoiceRecognition;
- static const char *inputPathNameVoiceCommunication;
AudioHardware();
virtual ~AudioHardware();
diff --git a/libaudio/AudioPolicyManager.cpp b/libaudio/AudioPolicyManager.cpp
index c53d1e9..bfa6c00 100644
--- a/libaudio/AudioPolicyManager.cpp
+++ b/libaudio/AudioPolicyManager.cpp
@@ -20,7 +20,7 @@
#include "AudioPolicyManager.h"
#include <media/mediarecorder.h>
-namespace android {
+namespace android_audio_legacy {
diff --git a/libaudio/AudioPolicyManager.h b/libaudio/AudioPolicyManager.h
index 03141e5..d660e78 100644
--- a/libaudio/AudioPolicyManager.h
+++ b/libaudio/AudioPolicyManager.h
@@ -23,7 +23,7 @@
#include <hardware_legacy/AudioPolicyManagerBase.h>
-namespace android {
+namespace android_audio_legacy {
class AudioPolicyManager: public AudioPolicyManagerBase
{
diff --git a/libcamera/Android.mk b/libcamera/Android.mk
index 79f4e3c..8ba100a 100644
--- a/libcamera/Android.mk
+++ b/libcamera/Android.mk
@@ -1,42 +1,25 @@
ifneq ($(filter crespo crespo4g,$(TARGET_DEVICE)),)
-# When zero we link against libqcamera; when 1, we dlopen libqcamera.
-ifeq ($(BOARD_CAMERA_LIBRARIES),libcamera)
-
-DLOPEN_LIBSECCAMERA:=1
-
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
-LOCAL_CFLAGS:=-fno-short-enums
-LOCAL_CFLAGS+=-DDLOPEN_LIBSECCAMERA=$(DLOPEN_LIBSECCAMERA)
+# HAL module implemenation stored in
+# hw/<COPYPIX_HARDWARE_MODULE_ID>.<ro.product.board>.so
+LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw
LOCAL_C_INCLUDES += $(LOCAL_PATH)/../include
LOCAL_C_INCLUDES += $(LOCAL_PATH)/../libs3cjpeg
-
LOCAL_SRC_FILES:= \
- SecCamera.cpp \
- SecCameraHWInterface.cpp
+ SecCamera.cpp SecCameraHWInterface.cpp
-
-LOCAL_SHARED_LIBRARIES:= libutils libui liblog libbinder libcutils
+LOCAL_SHARED_LIBRARIES:= libutils libcutils libbinder liblog libcamera_client libhardware
LOCAL_SHARED_LIBRARIES+= libs3cjpeg
-LOCAL_SHARED_LIBRARIES+= libcamera_client
-ifeq ($(BOARD_USES_OVERLAY),true)
-LOCAL_CFLAGS += -DBOARD_USES_OVERLAY
-endif
-
-ifeq ($(DLOPEN_LIBSECCAMERA),1)
-LOCAL_SHARED_LIBRARIES+= libdl
-endif
-
-LOCAL_MODULE:= libcamera
+LOCAL_MODULE := camera.$(TARGET_BOARD_PLATFORM)
LOCAL_MODULE_TAGS := optional
include $(BUILD_SHARED_LIBRARY)
endif
-endif
diff --git a/libcamera/SecCamera.cpp b/libcamera/SecCamera.cpp
index 4d0705a..e49dab7 100755
--- a/libcamera/SecCamera.cpp
+++ b/libcamera/SecCamera.cpp
@@ -546,6 +546,8 @@ static int fimc_v4l2_s_parm(int fp, struct v4l2_streamparm *streamparm)
SecCamera::SecCamera() :
m_flag_init(0),
m_camera_id(CAMERA_ID_BACK),
+ m_cam_fd(-1),
+ m_cam_fd2(-1),
m_preview_v4lformat(V4L2_PIX_FMT_NV21),
m_preview_width (0),
m_preview_height (0),
@@ -609,12 +611,6 @@ SecCamera::SecCamera() :
LOGV("%s :", __func__);
}
-int SecCamera::flagCreate(void) const
-{
- LOGV("%s : : %d", __func__, m_flag_init);
- return m_flag_init;
-}
-
SecCamera::~SecCamera()
{
LOGV("%s :", __func__);
@@ -632,43 +628,12 @@ int SecCamera::initCamera(int index)
*/
m_camera_af_flag = -1;
- m_cam_fd_temp = -1;
- m_cam_fd2_temp = -1;
-
m_cam_fd = open(CAMERA_DEV_NAME, O_RDWR);
if (m_cam_fd < 0) {
LOGE("ERR(%s):Cannot open %s (error : %s)\n", __func__, CAMERA_DEV_NAME, strerror(errno));
return -1;
}
-
- if (m_cam_fd < 3) { // for 0, 1, 2
- LOGE("ERR(%s):m_cam_fd is %d\n", __func__, m_cam_fd);
-
- close(m_cam_fd);
-
- m_cam_fd_temp = open(CAMERA_DEV_NAME_TEMP, O_CREAT);
-
- LOGE("ERR(%s):m_cam_fd_temp is %d\n", __func__, m_cam_fd_temp);
-
- m_cam_fd = open(CAMERA_DEV_NAME, O_RDWR);
-
- if (m_cam_fd < 3) { // for 0, 1, 2
- LOGE("ERR(%s):retring to open %s is failed, %d\n", __func__, CAMERA_DEV_NAME, m_cam_fd);
-
- if (m_cam_fd < 0) {
- return -1;
- } else {
- close(m_cam_fd);
- m_cam_fd = -1;
- }
-
- if (m_cam_fd_temp != -1){
- close(m_cam_fd_temp);
- m_cam_fd_temp = -1;
- }
- return -1;
- }
- }
+ LOGV("%s: open(%s) --> m_cam_fd %d", __FUNCTION__, CAMERA_DEV_NAME, m_cam_fd);
LOGE("initCamera: m_cam_fd(%d), m_jpeg_fd(%d)", m_cam_fd, m_jpeg_fd);
@@ -680,50 +645,11 @@ int SecCamera::initCamera(int index)
CHECK(ret);
m_cam_fd2 = open(CAMERA_DEV_NAME2, O_RDWR);
+ LOGV("%s: open(%s) --> m_cam_fd2 = %d", __FUNCTION__, CAMERA_DEV_NAME2, m_cam_fd2);
if (m_cam_fd2 < 0) {
LOGE("ERR(%s):Cannot open %s (error : %s)\n", __func__, CAMERA_DEV_NAME2, strerror(errno));
return -1;
}
- if (m_cam_fd2 < 3) { // for 0, 1, 2
- LOGE("ERR(%s):m_cam_fd2 is %d\n", __func__, m_cam_fd2);
-
- close(m_cam_fd2);
-
- m_cam_fd2_temp = open(CAMERA_DEV_NAME2_TEMP, O_CREAT);
-
- LOGE("ERR(%s):m_cam_fd2_temp is %d\n", __func__, m_cam_fd2_temp);
-
- m_cam_fd2 = open(CAMERA_DEV_NAME2, O_RDWR);
-
- if (m_cam_fd2 < 3) { // for 0, 1, 2
- LOGE("ERR(%s):retring to open %s is failed, %d\n", __func__, CAMERA_DEV_NAME2, m_cam_fd2);
-
- if (m_cam_fd2 < 0) {
- return -1;
- }
- else{
- close(m_cam_fd2);
- m_cam_fd2 = -1;
- }
-
- if (m_cam_fd2_temp != -1) {
- close(m_cam_fd2_temp);
- m_cam_fd2_temp = -1;
- }
-
- return -1;
- }
- }
-
- if (m_cam_fd_temp != -1) {
- close(m_cam_fd_temp);
- m_cam_fd_temp = -1;
- }
-
- if (m_cam_fd2_temp != -1) {
- close(m_cam_fd2_temp);
- m_cam_fd2_temp = -1;
- }
LOGE("initCamera: m_cam_fd2(%d)", m_cam_fd2);
@@ -755,6 +681,7 @@ int SecCamera::initCamera(int index)
setExifFixedAttribute();
m_flag_init = 1;
+ LOGI("%s : initialized", __FUNCTION__);
}
return 0;
}
@@ -789,18 +716,9 @@ void SecCamera::DeinitCamera()
m_cam_fd2 = -1;
}
- if (m_cam_fd_temp != -1) {
- close(m_cam_fd_temp);
- m_cam_fd_temp = -1;
- }
-
- if (m_cam_fd2_temp != -1) {
- close(m_cam_fd2_temp);
- m_cam_fd2_temp = -1;
- }
-
m_flag_init = 0;
}
+ else LOGI("%s : already deinitialized", __FUNCTION__);
}
@@ -2746,9 +2664,7 @@ int SecCamera::setDataLineCheck(int chk_dataline)
return -1;
}
- if (m_chk_dataline != chk_dataline) {
- m_chk_dataline = chk_dataline;
- }
+ m_chk_dataline = chk_dataline;
return 0;
}
@@ -3124,7 +3040,7 @@ inline int SecCamera::m_frameSize(int format, int width, int height)
return size;
}
-status_t SecCamera::dump(int fd, const Vector<String16> &args)
+status_t SecCamera::dump(int fd)
{
const size_t SIZE = 256;
char buffer[SIZE];
diff --git a/libcamera/SecCamera.h b/libcamera/SecCamera.h
index c87a0f4..551eb03 100644
--- a/libcamera/SecCamera.h
+++ b/libcamera/SecCamera.h
@@ -33,12 +33,13 @@
#include <sys/poll.h>
#include <sys/stat.h>
+#include <utils/RefBase.h>
#include <linux/videodev2.h>
#include <videodev2_samsung.h>
-#include "JpegEncoder.h"
+#include <utils/String8.h>
-#include <camera/CameraHardwareInterface.h>
+#include "JpegEncoder.h"
namespace android {
@@ -144,8 +145,7 @@ namespace android {
#define BPP 2
#define MIN(x, y) (((x) < (y)) ? (x) : (y))
-#define MAX_BUFFERS 11
-
+#define MAX_BUFFERS 9 // 11
/*
* V 4 L 2 F I M C E X T E N S I O N S
*
@@ -200,8 +200,7 @@ struct camsensor_date_info {
unsigned int date;
};
-
-class SecCamera {
+class SecCamera : public virtual RefBase {
public:
enum CAMERA_ID {
@@ -272,17 +271,14 @@ public:
} gpsInfoAltitude;
SecCamera();
- ~SecCamera();
+ virtual ~SecCamera();
static SecCamera* createInstance(void)
{
static SecCamera singleton;
return &singleton;
}
- status_t dump(int fd, const Vector<String16>& args);
-
- int flagCreate(void) const;
-
+ status_t dump(int fd);
int getCameraId(void);
@@ -490,9 +486,6 @@ private:
int m_cam_fd;
- int m_cam_fd_temp;
- int m_cam_fd2_temp;
-
int m_cam_fd2;
struct pollfd m_events_c2;
int m_flag_record_start;
diff --git a/libcamera/SecCameraHWInterface.cpp b/libcamera/SecCameraHWInterface.cpp
index 8a1275e..b96e362 100644
--- a/libcamera/SecCameraHWInterface.cpp
+++ b/libcamera/SecCameraHWInterface.cpp
@@ -24,13 +24,7 @@
#include <utils/threads.h>
#include <fcntl.h>
#include <sys/mman.h>
-
-#if defined(BOARD_USES_OVERLAY)
-#include <hardware/overlay.h>
-#include <ui/Overlay.h>
-#define CACHEABLE_BUFFERS 0x1
-#define ALL_BUFFERS_FLUSHED -66
-#endif
+#include <camera/Camera.h>
#define VIDEO_COMMENT_MARKER_H 0xFFBE
#define VIDEO_COMMENT_MARKER_L 0xFFBF
@@ -62,38 +56,40 @@ struct addrs_cap {
static const int INITIAL_SKIP_FRAME = 3;
static const int EFFECT_SKIP_FRAME = 1;
-CameraHardwareSec::CameraHardwareSec(int cameraId)
+gralloc_module_t const* CameraHardwareSec::mGrallocHal;
+
+CameraHardwareSec::CameraHardwareSec(int cameraId, camera_device_t *dev)
:
mCaptureInProgress(false),
mParameters(),
- mPreviewHeap(0),
- mRawHeap(0),
- mRecordHeap(0),
- mJpegHeap(0),
- mSecCamera(NULL),
+ mFrameSizeDelta(0),
mCameraSensorName(NULL),
mSkipFrame(0),
-#if defined(BOARD_USES_OVERLAY)
- mUseOverlay(false),
- mOverlayBufferIdx(0),
-#endif
mNotifyCb(0),
mDataCb(0),
mDataCbTimestamp(0),
mCallbackCookie(0),
- mMsgEnabled(0),
+ mMsgEnabled(CAMERA_MSG_RAW_IMAGE),
mRecordRunning(false),
mPostViewWidth(0),
mPostViewHeight(0),
- mPostViewSize(0)
+ mPostViewSize(0),
+ mHalDevice(dev)
{
LOGV("%s :", __func__);
int ret = 0;
+ mPreviewWindow = NULL;
mSecCamera = SecCamera::createInstance();
- if (mSecCamera == NULL) {
- LOGE("ERR(%s):Fail on mSecCamera object creation", __func__);
+ mRawHeap = NULL;
+ mPreviewHeap = NULL;
+ mRecordHeap = NULL;
+
+ if (!mGrallocHal) {
+ ret = hw_get_module(GRALLOC_HARDWARE_MODULE_ID, (const hw_module_t **)&mGrallocHal);
+ if (ret)
+ LOGE("ERR(%s):Fail on loading gralloc HAL", __func__);
}
ret = mSecCamera->initCamera(cameraId);
@@ -101,30 +97,10 @@ CameraHardwareSec::CameraHardwareSec(int cameraId)
LOGE("ERR(%s):Fail on mSecCamera init", __func__);
}
- if (mSecCamera->flagCreate() == 0) {
- LOGE("ERR(%s):Fail on mSecCamera->flagCreate()", __func__);
- }
-
- int recordHeapSize = sizeof(struct addrs) * kBufferCount;
- LOGV("mRecordHeap : MemoryHeapBase(recordHeapSize(%d))", recordHeapSize);
- mRecordHeap = new MemoryHeapBase(recordHeapSize);
- if (mRecordHeap->getHeapID() < 0) {
- LOGE("ERR(%s): Record heap creation fail", __func__);
- mRecordHeap.clear();
- }
-
mSecCamera->getPostViewConfig(&mPostViewWidth, &mPostViewHeight, &mPostViewSize);
LOGV("mPostViewWidth = %d mPostViewHeight = %d mPostViewSize = %d",
mPostViewWidth,mPostViewHeight,mPostViewSize);
- int rawHeapSize = mPostViewSize;
- LOGV("mRawHeap : MemoryHeapBase(previewHeapSize(%d))", rawHeapSize);
- mRawHeap = new MemoryHeapBase(rawHeapSize);
- if (mRawHeap->getHeapID() < 0) {
- LOGE("ERR(%s): Raw heap creation fail", __func__);
- mRawHeap.clear();
- }
-
initDefaultParameters(cameraId);
mExitAutoFocusThread = false;
@@ -133,6 +109,7 @@ CameraHardwareSec::CameraHardwareSec(int cameraId)
* create the thread but it is initially in stopped state.
*/
mPreviewRunning = false;
+ mPreviewStartDeferred = false;
mPreviewThread = new PreviewThread(this);
mAutoFocusThread = new AutoFocusThread(this);
mPictureThread = new PictureThread(this);
@@ -181,19 +158,20 @@ void CameraHardwareSec::initDefaultParameters(int cameraId)
LOGE("getSnapshotMaxSize fail (%d / %d) \n",
snapshot_max_width, snapshot_max_height);
- p.setPreviewFormat(CameraParameters::PIXEL_FORMAT_YUV420SP);
+ p.setPreviewFormat(CameraParameters::PIXEL_FORMAT_RGB565);
+// p.setPreviewFormat(CameraParameters::PIXEL_FORMAT_YUV420P); mFrameSizeDelta = 16;
p.setPreviewSize(preview_max_width, preview_max_height);
p.setPictureFormat(CameraParameters::PIXEL_FORMAT_JPEG);
p.setPictureSize(snapshot_max_width, snapshot_max_height);
p.set(CameraParameters::KEY_JPEG_QUALITY, "100"); // maximum quality
- p.set(CameraParameters::KEY_SUPPORTED_PREVIEW_FORMATS,
- CameraParameters::PIXEL_FORMAT_YUV420SP);
+ p.set(CameraParameters::KEY_SUPPORTED_PREVIEW_FORMATS, CameraParameters::PIXEL_FORMAT_RGB565);
+// p.set(CameraParameters::KEY_SUPPORTED_PREVIEW_FORMATS, CameraParameters::PIXEL_FORMAT_YUV420P);
p.set(CameraParameters::KEY_SUPPORTED_PICTURE_FORMATS,
CameraParameters::PIXEL_FORMAT_JPEG);
- p.set(CameraParameters::KEY_VIDEO_FRAME_FORMAT,
- CameraParameters::PIXEL_FORMAT_YUV420SP);
+ p.set(CameraParameters::KEY_VIDEO_FRAME_FORMAT, CameraParameters::PIXEL_FORMAT_RGB565);
+// p.set(CameraParameters::KEY_VIDEO_FRAME_FORMAT, CameraParameters::PIXEL_FORMAT_YUV420P);
String8 parameterString;
@@ -361,29 +339,117 @@ void CameraHardwareSec::initDefaultParameters(int cameraId)
CameraHardwareSec::~CameraHardwareSec()
{
- LOGV("%s :", __func__);
-
- singleton.clear();
+ LOGV("%s", __func__);
+ mSecCamera->DeinitCamera();
}
-sp<IMemoryHeap> CameraHardwareSec::getPreviewHeap() const
+status_t CameraHardwareSec::setPreviewWindow(preview_stream_ops *w)
{
- return mPreviewHeap;
-}
+ int min_bufs;
-sp<IMemoryHeap> CameraHardwareSec::getRawHeap() const
-{
- return mRawHeap;
+ mPreviewWindow = w;
+ LOGV("%s: mPreviewWindow %p", __func__, mPreviewWindow);
+
+ if (!w) {
+ LOGE("preview window is NULL!");
+ return OK;
+ }
+
+ mPreviewLock.lock();
+
+ if (mPreviewRunning && !mPreviewStartDeferred) {
+ LOGI("stop preview (window change)");
+ stopPreviewInternal();
+ }
+
+ if (w->get_min_undequeued_buffer_count(w, &min_bufs)) {
+ LOGE("%s: could not retrieve min undequeued buffer count", __func__);
+ return INVALID_OPERATION;
+ }
+
+ if (min_bufs >= kBufferCount) {
+ LOGE("%s: min undequeued buffer count %d is too high (expecting at most %d)", __func__,
+ min_bufs, kBufferCount - 1);
+ }
+
+ LOGV("%s: setting buffer count to %d", __func__, kBufferCount);
+ if (w->set_buffer_count(w, kBufferCount)) {
+ LOGE("%s: could not set buffer count", __func__);
+ return INVALID_OPERATION;
+ }
+
+ int preview_width;
+ int preview_height;
+ mParameters.getPreviewSize(&preview_width, &preview_height);
+
+ int hal_pixel_format;
+
+ const char *str_preview_format = mParameters.getPreviewFormat();
+ LOGV("%s: preview format %s", __func__, str_preview_format);
+ mFrameSizeDelta = 16;
+ if (!strcmp(str_preview_format,
+ CameraParameters::PIXEL_FORMAT_RGB565)) {
+ hal_pixel_format = HAL_PIXEL_FORMAT_RGB_565;
+ mFrameSizeDelta = 0;
+ }
+ else if (!strcmp(str_preview_format,
+ CameraParameters::PIXEL_FORMAT_RGBA8888)) {
+ hal_pixel_format = HAL_PIXEL_FORMAT_RGBA_8888;
+ mFrameSizeDelta = 0;
+ }
+ else if (!strcmp(str_preview_format,
+ CameraParameters::PIXEL_FORMAT_YUV420SP))
+ hal_pixel_format = HAL_PIXEL_FORMAT_YCrCb_420_SP;
+ else if (!strcmp(str_preview_format,
+ CameraParameters::PIXEL_FORMAT_YUV420P))
+ hal_pixel_format = HAL_PIXEL_FORMAT_YV12;
+ else if (!strcmp(str_preview_format, "yuv420sp_custom"))
+ hal_pixel_format = V4L2_PIX_FMT_NV12T;
+ else if (!strcmp(str_preview_format, "yuv420p"))
+ hal_pixel_format = V4L2_PIX_FMT_YUV420;
+ else if (!strcmp(str_preview_format, "yuv422i"))
+ hal_pixel_format = V4L2_PIX_FMT_YUYV;
+ else if (!strcmp(str_preview_format, "yuv422p"))
+ hal_pixel_format = V4L2_PIX_FMT_YUV422P;
+ else
+ hal_pixel_format = HAL_PIXEL_FORMAT_YCrCb_420_SP;
+
+ if (w->set_usage(w, GRALLOC_USAGE_SW_WRITE_OFTEN)) {
+ LOGE("%s: could not set usage on gralloc buffer", __func__);
+ return INVALID_OPERATION;
+ }
+
+ if (w->set_buffers_geometry(w,
+ preview_width, preview_height,
+ hal_pixel_format)) {
+ LOGE("%s: could not set buffers geometry to %s",
+ __func__, str_preview_format);
+ return INVALID_OPERATION;
+ }
+
+ if (mPreviewRunning && mPreviewStartDeferred) {
+ LOGV("start/resume preview");
+ status_t ret = startPreviewInternal();
+ if (ret == OK) {
+ mPreviewStartDeferred = false;
+ mPreviewCondition.signal();
+ }
+ }
+ mPreviewLock.unlock();
+
+ return OK;
}
-void CameraHardwareSec::setCallbacks(notify_callback notify_cb,
- data_callback data_cb,
- data_callback_timestamp data_cb_timestamp,
- void *user)
+void CameraHardwareSec::setCallbacks(camera_notify_callback notify_cb,
+ camera_data_callback data_cb,
+ camera_data_timestamp_callback data_cb_timestamp,
+ camera_request_memory get_memory,
+ void *user)
{
mNotifyCb = notify_cb;
mDataCb = data_cb;
mDataCbTimestamp = data_cb_timestamp;
+ mGetMemoryCb = get_memory;
mCallbackCookie = user;
}
@@ -392,6 +458,18 @@ void CameraHardwareSec::enableMsgType(int32_t msgType)
LOGV("%s : msgType = 0x%x, mMsgEnabled before = 0x%x",
__func__, msgType, mMsgEnabled);
mMsgEnabled |= msgType;
+
+ mPreviewLock.lock();
+ if ((msgType & (CAMERA_MSG_PREVIEW_FRAME | CAMERA_MSG_VIDEO_FRAME)) &&
+ mPreviewRunning && mPreviewStartDeferred) {
+ LOGV("%s: starting deferred preview", __func__);
+ if (startPreviewInternal() == OK) {
+ mPreviewStartDeferred = false;
+ mPreviewCondition.signal();
+ }
+ }
+ mPreviewLock.unlock();
+
LOGV("%s : mMsgEnabled = 0x%x", __func__, mMsgEnabled);
}
@@ -455,10 +533,14 @@ int CameraHardwareSec::previewThread()
LOGE("ERR(%s):Fail on SecCamera->getPreview()", __func__);
return UNKNOWN_ERROR;
}
+
+// LOGV("%s: index %d", __func__, index);
+
mSkipFrameLock.lock();
if (mSkipFrame > 0) {
mSkipFrame--;
mSkipFrameLock.unlock();
+ LOGV("%s: index %d skipping frame", __func__, index);
return NO_ERROR;
}
mSkipFrameLock.unlock();
@@ -469,7 +551,8 @@ int CameraHardwareSec::previewThread()
phyCAddr = mSecCamera->getPhyAddrC(index);
if (phyYAddr == 0xffffffff || phyCAddr == 0xffffffff) {
- LOGE("ERR(%s):Fail on SecCamera getPhyAddr Y addr = %0x C addr = %0x", __func__, phyYAddr, phyCAddr);
+ LOGE("ERR(%s):Fail on SecCamera getPhyAddr Y addr = %0x C addr = %0x",
+ __func__, phyYAddr, phyCAddr);
return UNKNOWN_ERROR;
}
@@ -477,38 +560,53 @@ int CameraHardwareSec::previewThread()
mSecCamera->getPreviewSize(&width, &height, &frame_size);
- offset = (frame_size + 16) * index;
- sp<MemoryBase> buffer = new MemoryBase(mPreviewHeap, offset, frame_size);
+ offset = (frame_size + mFrameSizeDelta) * index;
- memcpy(static_cast<unsigned char *>(mPreviewHeap->base()) + (offset + frame_size ), &phyYAddr, 4);
- memcpy(static_cast<unsigned char *>(mPreviewHeap->base()) + (offset + frame_size + 4), &phyCAddr, 4);
-
-#if defined(BOARD_USES_OVERLAY)
- if (mUseOverlay) {
- int ret;
- overlay_buffer_t overlay_buffer;
+#if 0 // FIXME: this does not seem to be necessary. Is it?
+ memcpy((char *)mPreviewHeap->data + offset + frame_size,
+ &phyYAddr, 4);
+ memcpy((char *)mPreviewHeap->data + offset + frame_size + 4,
+ &phyCAddr, 4);
+#endif
- mOverlayBufferIdx ^= 1;
- memcpy(static_cast<unsigned char*>(mPreviewHeap->base()) + offset + frame_size + sizeof(phyYAddr) + sizeof(phyCAddr),
- &mOverlayBufferIdx, sizeof(mOverlayBufferIdx));
+ if (mPreviewWindow && mGrallocHal) {
+ buffer_handle_t *buf_handle;
+ if (0 != mPreviewWindow->dequeue_buffer(mPreviewWindow, &buf_handle)) {
+ LOGE("Could not dequeue gralloc buffer!\n");
+ goto callbacks;
+ }
- ret = mOverlay->queueBuffer((void*)(static_cast<unsigned char *>(mPreviewHeap->base()) + (offset + frame_size)));
+// LOGV("%s: dequeued gralloc buffer %p (%d) from preview window!\n", __func__,
+// buf_handle, index);
+ void *vaddr;
+ if (!mGrallocHal->lock(mGrallocHal,
+ *buf_handle,
+ GRALLOC_USAGE_SW_WRITE_OFTEN,
+ 0, 0, width, height, &vaddr)) {
+ LOGV("%s: vaddr [%p, %p) <-- heap [%p, %p) (base %p offset 0x%x size 0x%x)", __func__,
+ vaddr, vaddr + frame_size + mFrameSizeDelta,
+ ((char *)mPreviewHeap->data) + offset, ((char *)mPreviewHeap->data) + offset + frame_size + mFrameSizeDelta,
+ ((char *)mPreviewHeap->data), offset, frame_size + mFrameSizeDelta);
+ memcpy(vaddr,
+ ((char *)mPreviewHeap->data) + offset,
+ frame_size + mFrameSizeDelta);
+ mGrallocHal->unlock(mGrallocHal, *buf_handle);
+ }
+ else
+ LOGE("%s: could not obtain gralloc buffer", __func__);
- if (ret == -1 ) {
- LOGE("ERR(%s):overlay queueBuffer fail", __func__);
- } else if (ret != ALL_BUFFERS_FLUSHED) {
- ret = mOverlay->dequeueBuffer(&overlay_buffer);
- if (ret == -1) {
- LOGE("ERR(%s):overlay dequeueBuffer fail", __func__);
- }
- }
- }
-#endif
+ if (0 != mPreviewWindow->enqueue_buffer(mPreviewWindow, buf_handle)) {
+ LOGE("Could not enqueue gralloc buffer!\n");
+ goto callbacks;
+ }
+// LOGV("%s: enqueued gralloc buffer %p (%d) to preview window!\n", __func__,
+// buf_handle, index);
+ }
+callbacks:
// Notify the client of a new frame.
- if (mMsgEnabled & CAMERA_MSG_PREVIEW_FRAME) {
- mDataCb(CAMERA_MSG_PREVIEW_FRAME, buffer, mCallbackCookie);
- }
+ if (mMsgEnabled & CAMERA_MSG_PREVIEW_FRAME)
+ mDataCb(CAMERA_MSG_PREVIEW_FRAME, mPreviewHeap, index, mCallbackCookie);
Mutex::Autolock lock(mRecordLock);
if (mRecordRunning == true) {
@@ -522,20 +620,21 @@ int CameraHardwareSec::previewThread()
phyCAddr = mSecCamera->getRecPhyAddrC(index);
if (phyYAddr == 0xffffffff || phyCAddr == 0xffffffff) {
- LOGE("ERR(%s):Fail on SecCamera getRectPhyAddr Y addr = %0x C addr = %0x", __func__, phyYAddr, phyCAddr);
+ LOGE("ERR(%s):Fail on SecCamera getRectPhyAddr Y addr = %0x C addr = %0x", __func__,
+ phyYAddr, phyCAddr);
return UNKNOWN_ERROR;
}
- addrs = (struct addrs *)mRecordHeap->base();
+ addrs = (struct addrs *)mRecordHeap->data;
- sp<MemoryBase> buffer = new MemoryBase(mRecordHeap, index * sizeof(struct addrs), sizeof(struct addrs));
addrs[index].addr_y = phyYAddr;
addrs[index].addr_cbcr = phyCAddr;
addrs[index].buf_index = index;
// Notify the client of a new frame.
if (mMsgEnabled & CAMERA_MSG_VIDEO_FRAME) {
- mDataCbTimestamp(timestamp, CAMERA_MSG_VIDEO_FRAME, buffer, mCallbackCookie);
+ mDataCbTimestamp(timestamp, CAMERA_MSG_VIDEO_FRAME,
+ mRecordHeap, index, mCallbackCookie);
} else {
mSecCamera->releaseRecordFrame(index);
}
@@ -564,96 +663,80 @@ status_t CameraHardwareSec::startPreview()
return INVALID_OPERATION;
}
- setSkipFrame(INITIAL_SKIP_FRAME);
-
- ret = mSecCamera->startPreview();
- LOGV("%s : mSecCamera->startPreview() returned %d", __func__, ret);
+ mPreviewRunning = true;
+ mPreviewStartDeferred = false;
- if (ret < 0) {
- LOGE("ERR(%s):Fail on mSecCamera->startPreview()", __func__);
- return -1; //UNKNOWN_ERROR;
+ if (!mPreviewWindow &&
+ !(mMsgEnabled & CAMERA_MSG_PREVIEW_FRAME) &&
+ !(mMsgEnabled & CAMERA_MSG_VIDEO_FRAME)) {
+ LOGI("%s : deferring", __func__);
+ mPreviewStartDeferred = true;
+ mPreviewLock.unlock();
+ return NO_ERROR;
}
- if (mPreviewHeap != NULL)
- mPreviewHeap.clear();
-
- int width, height, frame_size;
-
- mSecCamera->getPreviewSize(&width, &height, &frame_size);
-
- int previewHeapSize = (frame_size + 16) * kBufferCount;
-
- LOGD("MemoryHeapBase(fd(%d), size(%d), width(%d), height(%d))", (int)mSecCamera->getCameraFd(), (size_t)(previewHeapSize), width, height);
- mPreviewHeap = new MemoryHeapBase((int)mSecCamera->getCameraFd(), (size_t)(previewHeapSize), (uint32_t)0);
-
- mSecCamera->getPostViewConfig(&mPostViewWidth, &mPostViewHeight, &mPostViewSize);
- LOGV("CameraHardwareSec: mPostViewWidth = %d mPostViewHeight = %d mPostViewSize = %d",mPostViewWidth,mPostViewHeight,mPostViewSize);
+ ret = startPreviewInternal();
+ if (ret == OK)
+ mPreviewCondition.signal();
- mPreviewRunning = true;
- mPreviewCondition.signal();
mPreviewLock.unlock();
-
- return NO_ERROR;
+ return ret;
}
-#if defined(BOARD_USES_OVERLAY)
-bool CameraHardwareSec::useOverlay()
+status_t CameraHardwareSec::startPreviewInternal()
{
- LOGV("%s: returning true", __func__);
- return true;
-}
+ LOGV("%s", __func__);
-status_t CameraHardwareSec::setOverlay(const sp<Overlay> &overlay)
-{
- LOGV("%s :", __func__);
-
- int overlayWidth = 0;
- int overlayHeight = 0;
- int overlayFrameSize = 0;
+ int ret = mSecCamera->startPreview();
+ LOGV("%s : mSecCamera->startPreview() returned %d", __func__, ret);
- if (overlay == NULL) {
- LOGV("%s : overlay == NULL", __func__);
- goto setOverlayFail;
+ if (ret < 0) {
+ LOGE("ERR(%s):Fail on mSecCamera->startPreview()", __func__);
+ return UNKNOWN_ERROR;
}
- LOGV("%s : overlay = %p", __func__, overlay->getHandleRef());
- if (overlay->getHandleRef()== NULL && mUseOverlay == true) {
- if (mOverlay != 0)
- mOverlay->destroy();
+ setSkipFrame(INITIAL_SKIP_FRAME);
- mOverlay = NULL;
- mUseOverlay = false;
+ int width, height, frame_size;
- return NO_ERROR;
- }
+ mSecCamera->getPreviewSize(&width, &height, &frame_size);
- if (overlay->getStatus() != NO_ERROR) {
- LOGE("ERR(%s):overlay->getStatus() fail", __func__);
- goto setOverlayFail;
+ LOGD("mPreviewHeap(fd(%d), size(%d), width(%d), height(%d))",
+ mSecCamera->getCameraFd(), frame_size + mFrameSizeDelta, width, height);
+ if (mPreviewHeap) {
+ mPreviewHeap->release(mPreviewHeap);
+ mPreviewHeap = 0;
}
- mSecCamera->getPreviewSize(&overlayWidth, &overlayHeight, &overlayFrameSize);
-
- if (overlay->setCrop(0, 0, overlayWidth, overlayHeight) != NO_ERROR) {
- LOGE("ERR(%s)::(mOverlay->setCrop(0, 0, %d, %d) fail", __func__, overlayWidth, overlayHeight);
- goto setOverlayFail;
- }
+ mPreviewHeap = mGetMemoryCb((int)mSecCamera->getCameraFd(),
+ frame_size + mFrameSizeDelta,
+ kBufferCount,
+ 0); // no cookie
- mOverlay = overlay;
- mUseOverlay = true;
+ mSecCamera->getPostViewConfig(&mPostViewWidth, &mPostViewHeight, &mPostViewSize);
+ LOGV("CameraHardwareSec: mPostViewWidth = %d mPostViewHeight = %d mPostViewSize = %d",
+ mPostViewWidth,mPostViewHeight,mPostViewSize);
return NO_ERROR;
+}
-setOverlayFail :
- if (mOverlay != 0)
- mOverlay->destroy();
- mOverlay = 0;
-
- mUseOverlay = false;
+void CameraHardwareSec::stopPreviewInternal()
+{
+ LOGV("%s :", __func__);
- return UNKNOWN_ERROR;
+ /* request that the preview thread stop. */
+ if (mPreviewRunning) {
+ mPreviewRunning = false;
+ if (!mPreviewStartDeferred) {
+ mPreviewCondition.signal();
+ /* wait until preview thread is stopped */
+ mPreviewStoppedCondition.wait(mPreviewLock);
+ }
+ else
+ LOGV("%s : preview running but deferred, doing nothing", __func__);
+ } else
+ LOGI("%s : preview not running, doing nothing", __func__);
}
-#endif
void CameraHardwareSec::stopPreview()
{
@@ -661,14 +744,7 @@ void CameraHardwareSec::stopPreview()
/* request that the preview thread stop. */
mPreviewLock.lock();
- if (mPreviewRunning) {
- mPreviewRunning = false;
- mPreviewCondition.signal();
- /* wait until preview thread is stopped */
- mPreviewStoppedCondition.wait(mPreviewLock);
- } else {
- LOGI("%s : preview not running, doing nothing", __func__);
- }
+ stopPreviewInternal();
mPreviewLock.unlock();
}
@@ -687,6 +763,16 @@ status_t CameraHardwareSec::startRecording()
Mutex::Autolock lock(mRecordLock);
+ if (mRecordHeap) {
+ mRecordHeap->release(mRecordHeap);
+ mRecordHeap = 0;
+ }
+ mRecordHeap = mGetMemoryCb(-1, sizeof(struct addrs), kBufferCount, NULL);
+ if (!mRecordHeap) {
+ LOGE("ERR(%s): Record heap creation fail", __func__);
+ return UNKNOWN_ERROR;
+ }
+
if (mRecordRunning == false) {
if (mSecCamera->startRecord() < 0) {
LOGE("ERR(%s):Fail on mSecCamera->startRecord()", __func__);
@@ -719,12 +805,9 @@ bool CameraHardwareSec::recordingEnabled()
return mRecordRunning;
}
-void CameraHardwareSec::releaseRecordingFrame(const sp<IMemory>& mem)
+void CameraHardwareSec::releaseRecordingFrame(const void *opaque)
{
- ssize_t offset;
- sp<IMemoryHeap> heap = mem->getMemory(&offset, NULL);
- struct addrs *addrs = (struct addrs *)((uint8_t *)heap->base() + offset);
-
+ struct addrs *addrs = (struct addrs *)opaque;
mSecCamera->releaseRecordFrame(addrs->buf_index);
}
@@ -969,15 +1052,15 @@ int CameraHardwareSec::pictureThread()
LOG_TIME_DEFINE(0)
LOG_TIME_START(0)
- sp<MemoryBase> buffer = new MemoryBase(mRawHeap, 0, mPostViewSize + 8);
+// sp<MemoryBase> buffer = new MemoryBase(mRawHeap, 0, mPostViewSize + 8);
- struct addrs_cap *addrs = (struct addrs_cap *)mRawHeap->base();
+ struct addrs_cap *addrs = (struct addrs_cap *)mRawHeap->data;
addrs[0].width = mPostViewWidth;
addrs[0].height = mPostViewHeight;
LOGV("[5B] mPostViewWidth = %d mPostViewHeight = %d\n",mPostViewWidth,mPostViewHeight);
- sp<MemoryHeapBase> JpegHeap = new MemoryHeapBase(mJpegHeapSize);
+ camera_memory_t *JpegHeap = mGetMemoryCb(-1, mJpegHeapSize, 1, 0);
sp<MemoryHeapBase> PostviewHeap = new MemoryHeapBase(mPostViewSize);
sp<MemoryHeapBase> ThumbnailHeap = new MemoryHeapBase(mThumbSize);
@@ -1006,10 +1089,11 @@ int CameraHardwareSec::pictureThread()
}
} else {
if (mSecCamera->getSnapshotAndJpeg((unsigned char*)PostviewHeap->base(),
- (unsigned char*)JpegHeap->base(), &output_size) < 0) {
+ (unsigned char*)JpegHeap->data, &output_size) < 0) {
mStateLock.lock();
mCaptureInProgress = false;
mStateLock.unlock();
+ JpegHeap->release(JpegHeap);
return UNKNOWN_ERROR;
}
LOGI("snapshotandjpeg done\n");
@@ -1028,16 +1112,19 @@ int CameraHardwareSec::pictureThread()
LOGI("== Camera Sensor Detect %s - Samsung LSI SOC 5M ==\n", mCameraSensorName);
// LSI 5M SOC
if (!SplitFrame(jpeg_data, SecCamera::getInterleaveDataSize(),
- SecCamera::getJpegLineLength(),
- mPostViewWidth * 2, mPostViewWidth,
- JpegHeap->base(), &JpegImageSize,
- PostviewHeap->base(), &mPostViewSize))
+ SecCamera::getJpegLineLength(),
+ mPostViewWidth * 2, mPostViewWidth,
+ JpegHeap->data, &JpegImageSize,
+ PostviewHeap->base(), &mPostViewSize)) {
+ JpegHeap->release(JpegHeap);
return UNKNOWN_ERROR;
+ }
} else {
LOGI("== Camera Sensor Detect %s Sony SOC 5M ==\n", mCameraSensorName);
- decodeInterleaveData(jpeg_data, SecCamera::getInterleaveDataSize(), mPostViewWidth, mPostViewHeight,
- &JpegImageSize, JpegHeap->base(), PostviewHeap->base());
-
+ decodeInterleaveData(jpeg_data,
+ SecCamera::getInterleaveDataSize(),
+ mPostViewWidth, mPostViewHeight,
+ &JpegImageSize, JpegHeap->data, PostviewHeap->base());
}
} else {
JpegImageSize = static_cast<int>(output_size);
@@ -1045,54 +1132,17 @@ int CameraHardwareSec::pictureThread()
scaleDownYuv422((char *)PostviewHeap->base(), mPostViewWidth, mPostViewHeight,
(char *)ThumbnailHeap->base(), mThumbWidth, mThumbHeight);
- memcpy(mRawHeap->base(),PostviewHeap->base(), postviewHeapSize);
-
-#if defined(BOARD_USES_OVERLAY)
- /* Put postview image to Overlay */
- unsigned int index = 0;
- unsigned int offset = ((mPostViewWidth*mPostViewHeight*3/2) + 16) * index;
- unsigned int overlay_header[4];
-
- // Only show postview image if size is VGA since sensor cannot deliver
- // any other sizes.
- int previewWidth, previewHeight, previewSize;
- mSecCamera->getPreviewSize(&previewWidth, &previewHeight, &previewSize);
- if ((previewWidth != 640) || (previewHeight != 480))
- goto PostviewOverlayEnd;
-
- mOverlayBufferIdx ^= 1;
- overlay_header[0]= mSecCamera->getPhyAddrY(index);
- overlay_header[1]= overlay_header[0] + mPostViewWidth*mPostViewHeight;
- overlay_header[2]= mOverlayBufferIdx;
-
- YUY2toNV21(mRawHeap->base(), (void*)(static_cast<unsigned char *>(mPreviewHeap->base()) + offset),
- mPostViewWidth, mPostViewHeight);
-
- memcpy(static_cast<unsigned char*>(mPreviewHeap->base()) + offset + (mPostViewWidth*mPostViewHeight * 3 / 2),
- overlay_header, 16);
-
- ret = mOverlay->queueBuffer((void*)(static_cast<unsigned char *>(mPreviewHeap->base()) + offset +
- (mPostViewWidth*mPostViewHeight * 3 / 2)));
-
- if (ret == -1) {
- LOGE("ERR(%s):overlay queueBuffer fail", __func__);
- } else if (ret != ALL_BUFFERS_FLUSHED) {
- overlay_buffer_t overlay_buffer;
- ret = mOverlay->dequeueBuffer(&overlay_buffer);
- if (ret == -1) {
- LOGE("ERR(%s):overlay dequeueBuffer fail", __func__);
- }
- }
+ memcpy(mRawHeap->data, PostviewHeap->base(), postviewHeapSize);
-PostviewOverlayEnd:
-#endif
if (mMsgEnabled & CAMERA_MSG_RAW_IMAGE) {
- mDataCb(CAMERA_MSG_RAW_IMAGE, buffer, mCallbackCookie);
+ mDataCb(CAMERA_MSG_RAW_IMAGE, mRawHeap, 0, mCallbackCookie);
}
+
if (mMsgEnabled & CAMERA_MSG_COMPRESSED_IMAGE) {
- sp<MemoryHeapBase> ExifHeap = new MemoryHeapBase(EXIF_FILE_SIZE + JPG_STREAM_BUF_SIZE);
- JpegExifSize = mSecCamera->getExif((unsigned char *)ExifHeap->base(),
- (unsigned char *)ThumbnailHeap->base());
+ camera_memory_t *ExifHeap =
+ mGetMemoryCb(-1, EXIF_FILE_SIZE + JPG_STREAM_BUF_SIZE, 1, 0);
+ JpegExifSize = mSecCamera->getExif((unsigned char *)ExifHeap->data,
+ (unsigned char *)ThumbnailHeap->base());
LOGV("JpegExifSize=%d", JpegExifSize);
@@ -1101,14 +1151,13 @@ PostviewOverlayEnd:
goto out;
}
- unsigned char *ExifStart = (unsigned char *)JpegHeap->base() + 2;
+ unsigned char *ExifStart = (unsigned char *)JpegHeap->data + 2;
unsigned char *ImageStart = ExifStart + JpegExifSize;
memmove(ImageStart, ExifStart, JpegImageSize - 2);
- memcpy(ExifStart, ExifHeap->base(), JpegExifSize);
- sp<MemoryBase> mem = new MemoryBase(JpegHeap, 0, JpegImageSize + JpegExifSize);
+ memcpy(ExifStart, ExifHeap->data, JpegExifSize);
- mDataCb(CAMERA_MSG_COMPRESSED_IMAGE, mem, mCallbackCookie);
+ mDataCb(CAMERA_MSG_COMPRESSED_IMAGE, JpegHeap, 0, mCallbackCookie);
}
LOG_TIME_END(0)
@@ -1117,6 +1166,7 @@ PostviewOverlayEnd:
LOGV("%s : pictureThread end", __func__);
out:
+ JpegHeap->release(JpegHeap);
mStateLock.lock();
mCaptureInProgress = false;
mStateLock.unlock();
@@ -1130,6 +1180,15 @@ status_t CameraHardwareSec::takePicture()
stopPreview();
+ if (!mRawHeap) {
+ int rawHeapSize = mPostViewSize;
+ LOGV("mRawHeap : MemoryHeapBase(previewHeapSize(%d))", rawHeapSize);
+ mRawHeap = mGetMemoryCb(-1, rawHeapSize, 1, 0);
+ if (!mRawHeap) {
+ LOGE("ERR(%s): Raw heap creation fail", __func__);
+ }
+ }
+
Mutex::Autolock lock(mStateLock);
if (mCaptureInProgress) {
LOGE("%s : capture already in progress", __func__);
@@ -1147,7 +1206,13 @@ status_t CameraHardwareSec::takePicture()
status_t CameraHardwareSec::cancelPicture()
{
- mPictureThread->requestExitAndWait();
+ LOGV("%s", __func__);
+
+ if (mPictureThread.get()) {
+ LOGV("%s: waiting for picture thread to exit", __func__);
+ mPictureThread->requestExitAndWait();
+ LOGV("%s: picture thread has exited", __func__);
+ }
return NO_ERROR;
}
@@ -1207,7 +1272,7 @@ bool CameraHardwareSec::SplitFrame(unsigned char *pFrame, int dwSize,
LOGV("===========SplitFrame Start==============");
if (NULL == pFrame || 0 >= dwSize) {
- LOGE("There is no contents.\r\n");
+ LOGE("There is no contents (pFrame=%p, dwSize=%d", pFrame, dwSize);
return false;
}
@@ -1382,14 +1447,15 @@ int CameraHardwareSec::decodeInterleaveData(unsigned char *pInterleaveData,
return ret;
}
-status_t CameraHardwareSec::dump(int fd, const Vector<String16>& args) const
+status_t CameraHardwareSec::dump(int fd) const
{
const size_t SIZE = 256;
char buffer[SIZE];
String8 result;
+ const Vector<String16> args;
if (mSecCamera != 0) {
- mSecCamera->dump(fd, args);
+ mSecCamera->dump(fd);
mParameters.dump(fd, args);
mInternalParameters.dump(fd, args);
snprintf(buffer, 255, " preview running(%s)\n", mPreviewRunning?"true": "false");
@@ -1446,9 +1512,17 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params)
isSupportedPreviewSize(new_preview_width, new_preview_height)) {
int new_preview_format = 0;
+ mFrameSizeDelta = 16;
if (!strcmp(new_str_preview_format,
- CameraParameters::PIXEL_FORMAT_RGB565))
+ CameraParameters::PIXEL_FORMAT_RGB565)) {
new_preview_format = V4L2_PIX_FMT_RGB565;
+ mFrameSizeDelta = 0;
+ }
+ else if (!strcmp(new_str_preview_format,
+ CameraParameters::PIXEL_FORMAT_RGBA8888)) {
+ new_preview_format = V4L2_PIX_FMT_RGB32;
+ mFrameSizeDelta = 0;
+ }
else if (!strcmp(new_str_preview_format,
CameraParameters::PIXEL_FORMAT_YUV420SP))
new_preview_format = V4L2_PIX_FMT_NV21;
@@ -1463,22 +1537,42 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params)
else
new_preview_format = V4L2_PIX_FMT_NV21; //for 3rd party
- if (mSecCamera->setPreviewSize(new_preview_width, new_preview_height, new_preview_format) < 0) {
- LOGE("ERR(%s):Fail on mSecCamera->setPreviewSize(width(%d), height(%d), format(%d))",
- __func__, new_preview_width, new_preview_height, new_preview_format);
- ret = UNKNOWN_ERROR;
- } else {
+ int current_preview_width, current_preview_height, current_frame_size;
+ mSecCamera->getPreviewSize(&current_preview_width,
+ &current_preview_height,
+ &current_frame_size);
+ int current_pixel_format = mSecCamera->getPreviewPixelFormat();
+
+ if (current_preview_width != new_preview_width ||
+ current_preview_height != new_preview_height ||
+ current_pixel_format != new_preview_format) {
+ if (mSecCamera->setPreviewSize(new_preview_width, new_preview_height,
+ new_preview_format) < 0) {
+ LOGE("ERR(%s):Fail on mSecCamera->setPreviewSize(width(%d), height(%d), format(%d))",
+ __func__, new_preview_width, new_preview_height, new_preview_format);
+ ret = UNKNOWN_ERROR;
+ } else {
+ if (mPreviewWindow) {
+ if (mPreviewRunning && !mPreviewStartDeferred) {
+ LOGE("ERR(%s): preview is running, cannot change size and format!",
+ __func__);
+ ret = INVALID_OPERATION;
+ }
+
+ LOGV("%s: mPreviewWindow (%p) set_buffers_geometry", __func__, mPreviewWindow);
+ LOGV("%s: mPreviewWindow->set_buffers_geometry (%p)", __func__,
+ mPreviewWindow->set_buffers_geometry);
+ mPreviewWindow->set_buffers_geometry(mPreviewWindow,
+ new_preview_width, new_preview_height,
+ new_preview_format);
+ LOGV("%s: DONE mPreviewWindow (%p) set_buffers_geometry", __func__, mPreviewWindow);
+ }
+
mParameters.setPreviewSize(new_preview_width, new_preview_height);
mParameters.setPreviewFormat(new_str_preview_format);
- }
-#if defined(BOARD_USES_OVERLAY)
- if (mUseOverlay == true && mOverlay != 0) {
- if (mOverlay->setCrop(0, 0, new_preview_width, new_preview_height) != NO_ERROR) {
- LOGE("ERR(%s)::(mOverlay->setCrop(0, 0, %d, %d) fail",
- __func__, new_preview_width, new_preview_height);
}
}
-#endif
+ else LOGV("%s: preview size and format has not changed", __func__);
} else {
LOGE("%s: Invalid preview size(%dx%d)",
__func__, new_preview_width, new_preview_height);
@@ -1492,6 +1586,7 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params)
params.getPictureSize(&new_picture_width, &new_picture_height);
LOGV("%s : new_picture_width x new_picture_height = %dx%d", __func__, new_picture_width, new_picture_height);
if (0 < new_picture_width && 0 < new_picture_height) {
+ LOGV("%s: setSnapshotSize", __func__);
if (mSecCamera->setSnapshotSize(new_picture_width, new_picture_height) < 0) {
LOGE("ERR(%s):Fail on mSecCamera->setSnapshotSize(width(%d), height(%d))",
__func__, new_picture_width, new_picture_height);
@@ -1509,6 +1604,8 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params)
if (!strcmp(new_str_picture_format, CameraParameters::PIXEL_FORMAT_RGB565))
new_picture_format = V4L2_PIX_FMT_RGB565;
+ else if (!strcmp(new_str_picture_format, CameraParameters::PIXEL_FORMAT_RGBA8888))
+ new_picture_format = V4L2_PIX_FMT_RGB32;
else if (!strcmp(new_str_picture_format, CameraParameters::PIXEL_FORMAT_YUV420SP))
new_picture_format = V4L2_PIX_FMT_NV21;
else if (!strcmp(new_str_picture_format, "yuv420sp_custom"))
@@ -2075,7 +2172,7 @@ status_t CameraHardwareSec::sendCommand(int32_t command, int32_t arg1, int32_t a
void CameraHardwareSec::release()
{
- LOGV("%s :", __func__);
+ LOGV("%s", __func__);
/* shut down any threads we have that might be running. do it here
* instead of the destructor. we're guaranteed to be on another thread
@@ -2111,51 +2208,24 @@ void CameraHardwareSec::release()
mPictureThread->requestExitAndWait();
mPictureThread.clear();
}
- if (mRawHeap != NULL)
- mRawHeap.clear();
- if (mJpegHeap != NULL)
- mJpegHeap.clear();
-
- if (mPreviewHeap != NULL) {
- LOGI("%s: calling mPreviewHeap.dispose()", __func__);
- mPreviewHeap->dispose();
- mPreviewHeap.clear();
+ if (mRawHeap) {
+ mRawHeap->release(mRawHeap);
+ mRawHeap = 0;
}
-
- if (mRecordHeap != NULL)
- mRecordHeap.clear();
-
-#if defined(BOARD_USES_OVERLAY)
- if (mUseOverlay) {
- mOverlay->destroy();
- mUseOverlay = false;
- mOverlay = NULL;
+ if (mPreviewHeap) {
+ mPreviewHeap->release(mPreviewHeap);
+ mPreviewHeap = 0;
+ }
+ if (mRecordHeap) {
+ mRecordHeap->release(mRecordHeap);
+ mRecordHeap = 0;
}
-#endif
- /* close after all the heaps are cleared since those
+ /* close after all the heaps are cleared since those
* could have dup'd our file descriptor.
*/
mSecCamera->DeinitCamera();
- mSecCamera = NULL;
-
-}
-
-wp<CameraHardwareInterface> CameraHardwareSec::singleton;
-
-sp<CameraHardwareInterface> CameraHardwareSec::createInstance(int cameraId)
-{
- LOGV("%s :", __func__);
- if (singleton != 0) {
- sp<CameraHardwareInterface> hardware = singleton.promote();
- if (hardware != 0) {
- return hardware;
- }
- }
- sp<CameraHardwareInterface> hardware(new CameraHardwareSec(cameraId));
- singleton = hardware;
- return hardware;
}
static CameraInfo sCameraInfo[] = {
@@ -2169,19 +2239,397 @@ static CameraInfo sCameraInfo[] = {
}
};
-extern "C" int HAL_getNumberOfCameras()
+/** Close this device */
+
+static camera_device_t *g_cam_device;
+
+static int HAL_camera_device_close(struct hw_device_t* device)
+{
+ LOGI("%s", __func__);
+#if 1
+ if (device) {
+ camera_device_t *cam_device = (camera_device_t *)device;
+ delete static_cast<CameraHardwareSec *>(cam_device->priv);
+ free(cam_device);
+ g_cam_device = 0;
+ }
+#endif
+ return 0;
+}
+
+static inline CameraHardwareSec *obj(struct camera_device *dev)
+{
+ return reinterpret_cast<CameraHardwareSec *>(dev->priv);
+}
+
+/** Set the preview_stream_ops to which preview frames are sent */
+static int HAL_camera_device_set_preview_window(struct camera_device *dev,
+ struct preview_stream_ops *buf)
+{
+ LOGV("%s", __func__);
+ return obj(dev)->setPreviewWindow(buf);
+}
+
+/** Set the notification and data callbacks */
+static void HAL_camera_device_set_callbacks(struct camera_device *dev,
+ camera_notify_callback notify_cb,
+ camera_data_callback data_cb,
+ camera_data_timestamp_callback data_cb_timestamp,
+ camera_request_memory get_memory,
+ void* user)
+{
+ LOGV("%s", __func__);
+ obj(dev)->setCallbacks(notify_cb, data_cb, data_cb_timestamp,
+ get_memory,
+ user);
+}
+
+/**
+ * The following three functions all take a msg_type, which is a bitmask of
+ * the messages defined in include/ui/Camera.h
+ */
+
+/**
+ * Enable a message, or set of messages.
+ */
+static void HAL_camera_device_enable_msg_type(struct camera_device *dev, int32_t msg_type)
+{
+ LOGV("%s", __func__);
+ obj(dev)->enableMsgType(msg_type);
+}
+
+/**
+ * Disable a message, or a set of messages.
+ *
+ * Once received a call to disableMsgType(CAMERA_MSG_VIDEO_FRAME), camera
+ * HAL should not rely on its client to call releaseRecordingFrame() to
+ * release video recording frames sent out by the cameral HAL before and
+ * after the disableMsgType(CAMERA_MSG_VIDEO_FRAME) call. Camera HAL
+ * clients must not modify/access any video recording frame after calling
+ * disableMsgType(CAMERA_MSG_VIDEO_FRAME).
+ */
+static void HAL_camera_device_disable_msg_type(struct camera_device *dev, int32_t msg_type)
+{
+ LOGV("%s", __func__);
+ obj(dev)->disableMsgType(msg_type);
+}
+
+/**
+ * Query whether a message, or a set of messages, is enabled. Note that
+ * this is operates as an AND, if any of the messages queried are off, this
+ * will return false.
+ */
+static int HAL_camera_device_msg_type_enabled(struct camera_device *dev, int32_t msg_type)
+{
+ LOGV("%s", __func__);
+ return obj(dev)->msgTypeEnabled(msg_type);
+}
+
+/**
+ * Start preview mode.
+ */
+static int HAL_camera_device_start_preview(struct camera_device *dev)
+{
+ LOGV("%s", __func__);
+ return obj(dev)->startPreview();
+}
+
+/**
+ * Stop a previously started preview.
+ */
+static void HAL_camera_device_stop_preview(struct camera_device *dev)
{
+ LOGV("%s", __func__);
+ obj(dev)->stopPreview();
+}
+
+/**
+ * Returns true if preview is enabled.
+ */
+static int HAL_camera_device_preview_enabled(struct camera_device *dev)
+{
+ LOGV("%s", __func__);
+ return obj(dev)->previewEnabled();
+}
+
+/**
+ * Request the camera HAL to store meta data or real YUV data in the video
+ * buffers sent out via CAMERA_MSG_VIDEO_FRAME for a recording session. If
+ * it is not called, the default camera HAL behavior is to store real YUV
+ * data in the video buffers.
+ *
+ * This method should be called before startRecording() in order to be
+ * effective.
+ *
+ * If meta data is stored in the video buffers, it is up to the receiver of
+ * the video buffers to interpret the contents and to find the actual frame
+ * data with the help of the meta data in the buffer. How this is done is
+ * outside of the scope of this method.
+ *
+ * Some camera HALs may not support storing meta data in the video buffers,
+ * but all camera HALs should support storing real YUV data in the video
+ * buffers. If the camera HAL does not support storing the meta data in the
+ * video buffers when it is requested to do do, INVALID_OPERATION must be
+ * returned. It is very useful for the camera HAL to pass meta data rather
+ * than the actual frame data directly to the video encoder, since the
+ * amount of the uncompressed frame data can be very large if video size is
+ * large.
+ *
+ * @param enable if true to instruct the camera HAL to store
+ * meta data in the video buffers; false to instruct
+ * the camera HAL to store real YUV data in the video
+ * buffers.
+ *
+ * @return OK on success.
+ */
+static int HAL_camera_device_store_meta_data_in_buffers(struct camera_device *dev, int enable)
+{
+ LOGV("%s", __func__);
+ return INVALID_OPERATION;// obj(dev)->storeMetaDataInBuffers(enable);
+}
+
+/**
+ * Start record mode. When a record image is available, a
+ * CAMERA_MSG_VIDEO_FRAME message is sent with the corresponding
+ * frame. Every record frame must be released by a camera HAL client via
+ * releaseRecordingFrame() before the client calls
+ * disableMsgType(CAMERA_MSG_VIDEO_FRAME). After the client calls
+ * disableMsgType(CAMERA_MSG_VIDEO_FRAME), it is the camera HAL's
+ * responsibility to manage the life-cycle of the video recording frames,
+ * and the client must not modify/access any video recording frames.
+ */
+static int HAL_camera_device_start_recording(struct camera_device *dev)
+{
+ LOGV("%s", __func__);
+ return obj(dev)->startRecording();
+}
+
+/**
+ * Stop a previously started recording.
+ */
+static void HAL_camera_device_stop_recording(struct camera_device *dev)
+{
+ LOGV("%s", __func__);
+ obj(dev)->stopRecording();
+}
+
+/**
+ * Returns true if recording is enabled.
+ */
+static int HAL_camera_device_recording_enabled(struct camera_device *dev)
+{
+ LOGV("%s", __func__);
+ return obj(dev)->recordingEnabled();
+}
+
+/**
+ * Release a record frame previously returned by CAMERA_MSG_VIDEO_FRAME.
+ *
+ * It is camera HAL client's responsibility to release video recording
+ * frames sent out by the camera HAL before the camera HAL receives a call
+ * to disableMsgType(CAMERA_MSG_VIDEO_FRAME). After it receives the call to
+ * disableMsgType(CAMERA_MSG_VIDEO_FRAME), it is the camera HAL's
+ * responsibility to manage the life-cycle of the video recording frames.
+ */
+static void HAL_camera_device_release_recording_frame(struct camera_device *dev,
+ const void *opaque)
+{
+ LOGV("%s", __func__);
+ obj(dev)->releaseRecordingFrame(opaque);
+}
+
+/**
+ * Start auto focus, the notification callback routine is called with
+ * CAMERA_MSG_FOCUS once when focusing is complete. autoFocus() will be
+ * called again if another auto focus is needed.
+ */
+static int HAL_camera_device_auto_focus(struct camera_device *dev)
+{
+ LOGV("%s", __func__);
+ return obj(dev)->autoFocus();
+}
+
+/**
+ * Cancels auto-focus function. If the auto-focus is still in progress,
+ * this function will cancel it. Whether the auto-focus is in progress or
+ * not, this function will return the focus position to the default. If
+ * the camera does not support auto-focus, this is a no-op.
+ */
+static int HAL_camera_device_cancel_auto_focus(struct camera_device *dev)
+{
+ LOGV("%s", __func__);
+ return obj(dev)->cancelAutoFocus();
+}
+
+/**
+ * Take a picture.
+ */
+static int HAL_camera_device_take_picture(struct camera_device *dev)
+{
+ LOGV("%s", __func__);
+ return obj(dev)->takePicture();
+}
+
+/**
+ * Cancel a picture that was started with takePicture. Calling this method
+ * when no picture is being taken is a no-op.
+ */
+static int HAL_camera_device_cancel_picture(struct camera_device *dev)
+{
+ LOGV("%s", __func__);
+ return obj(dev)->cancelPicture();
+}
+
+/**
+ * Set the camera parameters. This returns BAD_VALUE if any parameter is
+ * invalid or not supported.
+ */
+static int HAL_camera_device_set_parameters(struct camera_device *dev,
+ const char *parms)
+{
+ LOGV("%s", __func__);
+ String8 str(parms);
+ CameraParameters p(str);
+ return obj(dev)->setParameters(p);
+}
+
+/** Return the camera parameters. */
+char *HAL_camera_device_get_parameters(struct camera_device *dev)
+{
+ LOGV("%s", __func__);
+ String8 str;
+ CameraParameters parms = obj(dev)->getParameters();
+ str = parms.flatten();
+ return strdup(str.string());
+}
+
+/**
+ * Send command to camera driver.
+ */
+static int HAL_camera_device_send_command(struct camera_device *dev,
+ int32_t cmd, int32_t arg1, int32_t arg2)
+{
+ LOGV("%s", __func__);
+ return obj(dev)->sendCommand(cmd, arg1, arg2);
+}
+
+/**
+ * Release the hardware resources owned by this object. Note that this is
+ * *not* done in the destructor.
+ */
+static void HAL_camera_device_release(struct camera_device *dev)
+{
+ LOGV("%s", __func__);
+ obj(dev)->release();
+}
+
+/**
+ * Dump state of the camera hardware
+ */
+static int HAL_camera_device_dump(struct camera_device *dev, int fd)
+{
+ LOGV("%s", __func__);
+ return obj(dev)->dump(fd);
+}
+
+static int HAL_getNumberOfCameras()
+{
+ LOGV("%s", __func__);
return sizeof(sCameraInfo) / sizeof(sCameraInfo[0]);
}
-extern "C" void HAL_getCameraInfo(int cameraId, struct CameraInfo *cameraInfo)
+static int HAL_getCameraInfo(int cameraId, struct camera_info *cameraInfo)
{
+ LOGV("%s", __func__);
memcpy(cameraInfo, &sCameraInfo[cameraId], sizeof(CameraInfo));
+ return 0;
}
-extern "C" sp<CameraHardwareInterface> HAL_openCameraHardware(int cameraId)
+#define SET_METHOD(m) m : HAL_camera_device_##m
+
+static camera_device_ops_t camera_device_ops = {
+ SET_METHOD(set_preview_window),
+ SET_METHOD(set_callbacks),
+ SET_METHOD(enable_msg_type),
+ SET_METHOD(disable_msg_type),
+ SET_METHOD(msg_type_enabled),
+ SET_METHOD(start_preview),
+ SET_METHOD(stop_preview),
+ SET_METHOD(preview_enabled),
+ SET_METHOD(store_meta_data_in_buffers),
+ SET_METHOD(start_recording),
+ SET_METHOD(stop_recording),
+ SET_METHOD(recording_enabled),
+ SET_METHOD(release_recording_frame),
+ SET_METHOD(auto_focus),
+ SET_METHOD(cancel_auto_focus),
+ SET_METHOD(take_picture),
+ SET_METHOD(cancel_picture),
+ SET_METHOD(set_parameters),
+ SET_METHOD(get_parameters),
+ SET_METHOD(send_command),
+ SET_METHOD(release),
+ SET_METHOD(dump),
+};
+
+#undef SET_METHOD
+
+static int HAL_camera_device_open(const struct hw_module_t* module,
+ const char *id,
+ struct hw_device_t** device)
{
- return CameraHardwareSec::createInstance(cameraId);
+ LOGV("%s", __func__);
+
+ int cameraId = atoi(id);
+ if (cameraId < 0 || cameraId >= HAL_getNumberOfCameras()) {
+ LOGE("Invalid camera ID %s", id);
+ return -EINVAL;
+ }
+
+ if (g_cam_device) {
+ LOGV("returning existing camera ID %s", id);
+ goto done;
+ }
+
+ g_cam_device = (camera_device_t *)malloc(sizeof(camera_device_t));
+ if (!g_cam_device)
+ return -ENOMEM;
+
+ g_cam_device->common.tag = HARDWARE_DEVICE_TAG;
+ g_cam_device->common.version = 1;
+ g_cam_device->common.module = const_cast<hw_module_t *>(module);
+ g_cam_device->common.close = HAL_camera_device_close;
+
+ g_cam_device->ops = &camera_device_ops;
+
+ LOGI("%s: open camera %s", __func__, id);
+
+ g_cam_device->priv = new CameraHardwareSec(cameraId, g_cam_device);
+
+done:
+ *device = (hw_device_t *)g_cam_device;
+ LOGI("%s: opened camera %s (%p)", __func__, id, *device);
+ return 0;
+}
+
+static hw_module_methods_t camera_module_methods = {
+ open : HAL_camera_device_open
+};
+
+extern "C" {
+ struct camera_module HAL_MODULE_INFO_SYM = {
+ common : {
+ tag : HARDWARE_MODULE_TAG,
+ version_major : 1,
+ version_minor : 0,
+ id : CAMERA_HARDWARE_MODULE_ID,
+ name : "Crespo camera HAL",
+ author : "Samsung Corporation",
+ methods : &camera_module_methods,
+ },
+ get_number_of_cameras : HAL_getNumberOfCameras,
+ get_camera_info : HAL_getCameraInfo
+ };
}
}; // namespace android
diff --git a/libcamera/SecCameraHWInterface.h b/libcamera/SecCameraHWInterface.h
index 0a948db..a94ab75 100644
--- a/libcamera/SecCameraHWInterface.h
+++ b/libcamera/SecCameraHWInterface.h
@@ -21,20 +21,20 @@
#include "SecCamera.h"
#include <utils/threads.h>
-#include <camera/CameraHardwareInterface.h>
+#include <utils/RefBase.h>
#include <binder/MemoryBase.h>
#include <binder/MemoryHeapBase.h>
-#include <utils/threads.h>
+#include <hardware/camera.h>
+#include <hardware/gralloc.h>
+#include <camera/CameraParameters.h>
namespace android {
-class CameraHardwareSec : public CameraHardwareInterface {
+ class CameraHardwareSec : public virtual RefBase {
public:
- virtual sp<IMemoryHeap> getPreviewHeap() const;
- virtual sp<IMemoryHeap> getRawHeap() const;
-
- virtual void setCallbacks(notify_callback notify_cb,
- data_callback data_cb,
- data_callback_timestamp data_cb_timestamp,
+ virtual void setCallbacks(camera_notify_callback notify_cb,
+ camera_data_callback data_cb,
+ camera_data_timestamp_callback data_cb_timestamp,
+ camera_request_memory get_memory,
void *user);
virtual void enableMsgType(int32_t msgType);
@@ -42,36 +42,30 @@ public:
virtual bool msgTypeEnabled(int32_t msgType);
virtual status_t startPreview();
-#if defined(BOARD_USES_OVERLAY)
- virtual bool useOverlay();
- virtual status_t setOverlay(const sp<Overlay> &overlay);
-#endif
virtual void stopPreview();
virtual bool previewEnabled();
virtual status_t startRecording();
virtual void stopRecording();
virtual bool recordingEnabled();
- virtual void releaseRecordingFrame(const sp<IMemory> &mem);
+ virtual void releaseRecordingFrame(const void *opaque);
virtual status_t autoFocus();
virtual status_t cancelAutoFocus();
virtual status_t takePicture();
virtual status_t cancelPicture();
- virtual status_t dump(int fd, const Vector<String16> &args) const;
+ virtual status_t dump(int fd) const;
virtual status_t setParameters(const CameraParameters& params);
virtual CameraParameters getParameters() const;
- virtual status_t sendCommand(int32_t command, int32_t arg1,
- int32_t arg2);
+ virtual status_t sendCommand(int32_t command, int32_t arg1, int32_t arg2);
+ virtual status_t setPreviewWindow(preview_stream_ops *w);
virtual void release();
- static sp<CameraHardwareInterface> createInstance(int cameraId);
-
-private:
- CameraHardwareSec(int cameraId);
+ CameraHardwareSec(int cameraId, camera_device_t *dev);
virtual ~CameraHardwareSec();
-
- static wp<CameraHardwareInterface> singleton;
+private:
+ status_t startPreviewInternal();
+ void stopPreviewInternal();
static const int kBufferCount = MAX_BUFFERS;
static const int kBufferCountForRecord = MAX_BUFFERS;
@@ -168,36 +162,32 @@ private:
mutable Condition mPreviewCondition;
mutable Condition mPreviewStoppedCondition;
bool mPreviewRunning;
+ bool mPreviewStartDeferred;
bool mExitPreviewThread;
+ preview_stream_ops *mPreviewWindow;
+
/* used to guard threading state */
mutable Mutex mStateLock;
CameraParameters mParameters;
CameraParameters mInternalParameters;
- sp<MemoryHeapBase> mPreviewHeap;
- sp<MemoryHeapBase> mRawHeap;
- sp<MemoryHeapBase> mRecordHeap;
- sp<MemoryHeapBase> mJpegHeap;
- sp<MemoryBase> mBuffers[kBufferCount];
- sp<MemoryBase> mRecordBuffers[kBufferCountForRecord];
+ int mFrameSizeDelta;
+ camera_memory_t *mPreviewHeap;
+ camera_memory_t *mRawHeap;
+ camera_memory_t *mRecordHeap;
- SecCamera *mSecCamera;
+ SecCamera *mSecCamera;
const __u8 *mCameraSensorName;
mutable Mutex mSkipFrameLock;
int mSkipFrame;
-#if defined(BOARD_USES_OVERLAY)
- sp<Overlay> mOverlay;
- bool mUseOverlay;
- int mOverlayBufferIdx;
-#endif
-
- notify_callback mNotifyCb;
- data_callback mDataCb;
- data_callback_timestamp mDataCbTimestamp;
+ camera_notify_callback mNotifyCb;
+ camera_data_callback mDataCb;
+ camera_data_timestamp_callback mDataCbTimestamp;
+ camera_request_memory mGetMemoryCb;
void *mCallbackCookie;
int32_t mMsgEnabled;
@@ -209,6 +199,9 @@ private:
int mPostViewSize;
Vector<Size> mSupportedPreviewSizes;
+
+ camera_device_t *mHalDevice;
+ static gralloc_module_t const* mGrallocHal;
};
}; // namespace android
diff --git a/liblight/Android.mk b/liblight/Android.mk
index d10b586..b799a63 100755
--- a/liblight/Android.mk
+++ b/liblight/Android.mk
@@ -15,13 +15,13 @@
ifneq ($(filter crespo crespo4g,$(TARGET_DEVICE)),)
LOCAL_PATH:= $(call my-dir)
-# HAL module implemenation, not prelinked and stored in
+# HAL module implemenation stored in
# hw/<COPYPIX_HARDWARE_MODULE_ID>.<ro.board.platform>.so
include $(CLEAR_VARS)
LOCAL_SRC_FILES := lights.c
-LOCAL_PRELINK_MODULE := false
+
LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw
LOCAL_SHARED_LIBRARIES := liblog
diff --git a/liboverlay/Android.mk b/liboverlay/Android.mk
index 7973ed3..959f4eb 100644
--- a/liboverlay/Android.mk
+++ b/liboverlay/Android.mk
@@ -15,11 +15,11 @@
ifeq ($(BOARD_USES_OVERLAY),true)
LOCAL_PATH:= $(call my-dir)
-# HAL module implemenation, not prelinked and stored in
+# HAL module implemenation stored in
# hw/<COPYPIX_HARDWARE_MODULE_ID>.<ro.product.board>.so
include $(CLEAR_VARS)
-LOCAL_PRELINK_MODULE := false
+
LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw
LOCAL_SHARED_LIBRARIES := liblog libcutils
diff --git a/libs3cjpeg/Android.mk b/libs3cjpeg/Android.mk
index 7f8c823..af1f88e 100644
--- a/libs3cjpeg/Android.mk
+++ b/libs3cjpeg/Android.mk
@@ -31,7 +31,7 @@ LOCAL_MODULE:= libs3cjpeg
LOCAL_MODULE_TAGS := optional
-LOCAL_PRELINK_MODULE := false
+
include $(BUILD_SHARED_LIBRARY)
diff --git a/libsensors/Android.mk b/libsensors/Android.mk
index 4ef72e9..09d0336 100644
--- a/libsensors/Android.mk
+++ b/libsensors/Android.mk
@@ -17,7 +17,7 @@ LOCAL_PATH := $(call my-dir)
ifneq ($(TARGET_SIMULATOR),true)
-# HAL module implemenation, not prelinked, and stored in
+# HAL module implemenation stored in
# hw/<SENSORS_HARDWARE_MODULE_ID>.<ro.product.board>.so
include $(CLEAR_VARS)
@@ -38,7 +38,7 @@ LOCAL_SRC_FILES := \
InputEventReader.cpp
LOCAL_SHARED_LIBRARIES := liblog libcutils libdl
-LOCAL_PRELINK_MODULE := false
+
include $(BUILD_SHARED_LIBRARY)
diff --git a/libstagefrighthw/Android.mk b/libstagefrighthw/Android.mk
index 7fd22a9..3598451 100644
--- a/libstagefrighthw/Android.mk
+++ b/libstagefrighthw/Android.mk
@@ -4,8 +4,6 @@ LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_SRC_FILES := \
- stagefright_overlay_output.cpp \
- SecHardwareRenderer.cpp \
SEC_OMX_Plugin.cpp
LOCAL_CFLAGS += $(PV_CFLAGS_MINUS_VISIBILITY)
@@ -13,7 +11,6 @@ LOCAL_CFLAGS += $(PV_CFLAGS_MINUS_VISIBILITY)
LOCAL_C_INCLUDES:= \
$(TOP)/frameworks/base/include/media/stagefright/openmax \
$(LOCAL_PATH)/../include \
- $(LOCAL_PATH)/../liboverlay
LOCAL_SHARED_LIBRARIES := \
libbinder \
@@ -21,7 +18,6 @@ LOCAL_SHARED_LIBRARIES := \
libcutils \
libui \
libdl \
- libsurfaceflinger_client
LOCAL_MODULE := libstagefrighthw
diff --git a/libstagefrighthw/SecHardwareRenderer.cpp b/libstagefrighthw/SecHardwareRenderer.cpp
deleted file mode 100644
index cb9e8e8..0000000
--- a/libstagefrighthw/SecHardwareRenderer.cpp
+++ /dev/null
@@ -1,228 +0,0 @@
-/*
- * Copyright (C) 2010 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.
- */
-
-#define LOG_TAG "SecHardwareRenderer"
-#define LOG_NDEBUG 0
-#include <utils/Log.h>
-
-#include "SecHardwareRenderer.h"
-
-#include <media/stagefright/MediaDebug.h>
-#include <surfaceflinger/ISurface.h>
-#include <ui/Overlay.h>
-
-#include <hardware/hardware.h>
-
-#include "v4l2_utils.h"
-#include "utils/Timers.h"
-
-#define CACHEABLE_BUFFERS 0x1
-
-#define USE_ZERO_COPY
-//#define SEC_DEBUG
-
-namespace android {
-
-////////////////////////////////////////////////////////////////////////////////
-
-SecHardwareRenderer::SecHardwareRenderer(
- const sp<ISurface> &surface,
- size_t displayWidth, size_t displayHeight,
- size_t decodedWidth, size_t decodedHeight,
- OMX_COLOR_FORMATTYPE colorFormat,
- int32_t rotationDegrees,
- bool fromHardwareDecoder)
- : mISurface(surface),
- mDisplayWidth(displayWidth),
- mDisplayHeight(displayHeight),
- mDecodedWidth(decodedWidth),
- mDecodedHeight(decodedHeight),
- mColorFormat(colorFormat),
- mInitCheck(NO_INIT),
- mFrameSize(mDecodedWidth * mDecodedHeight * 2),
- mIsFirstFrame(true),
- mCustomFormat(false),
- mIndex(0) {
-
- CHECK(mISurface.get() != NULL);
- CHECK(mDecodedWidth > 0);
- CHECK(mDecodedHeight > 0);
-
- if (colorFormat != OMX_COLOR_FormatCbYCrY
- && colorFormat != OMX_COLOR_FormatYUV420Planar
- && colorFormat != OMX_COLOR_FormatYUV420SemiPlanar) {
- LOGE("Invalid colorFormat (0x%x)", colorFormat);
- return;
- }
-
- uint32_t orientation;
- switch (rotationDegrees) {
- case 0: orientation = ISurface::BufferHeap::ROT_0; break;
- case 90: orientation = ISurface::BufferHeap::ROT_90; break;
- case 180: orientation = ISurface::BufferHeap::ROT_180; break;
- case 270: orientation = ISurface::BufferHeap::ROT_270; break;
- default: orientation = ISurface::BufferHeap::ROT_0; break;
- }
-
- sp<OverlayRef> ref;
-
-#if defined (USE_ZERO_COPY)
- if (fromHardwareDecoder) {
- ref = mISurface->createOverlay(
- mDecodedWidth, mDecodedHeight,
- HAL_PIXEL_FORMAT_CUSTOM_YCbCr_420_SP, orientation);
- mCustomFormat = true;
- }
-#else
- else
- {
- ref = mISurface->createOverlay(
- mDecodedWidth, mDecodedHeight, HAL_PIXEL_FORMAT_YCbCr_420_P,
- orientation);
- }
-#endif
-
- if (ref.get() == NULL) {
- LOGE("Unable to create the overlay!");
- return;
- }
-
- mOverlay = new Overlay(ref);
- mOverlay->setParameter(CACHEABLE_BUFFERS, 0);
-
- mNumBuf = mOverlay->getBufferCount();
-
- if (mCustomFormat) {
- mFrameSize = 32;
- mMemoryHeap = new MemoryHeapBase(mNumBuf * mFrameSize);
- } else {
- for (size_t i = 0; i < (size_t)mNumBuf; ++i) {
- void *addr = mOverlay->getBufferAddress((void *)i);
- mOverlayAddresses.push(addr);
- }
- }
-
- mInitCheck = OK;
-}
-
-SecHardwareRenderer::~SecHardwareRenderer() {
-
- if(mMemoryHeap != NULL)
- mMemoryHeap.clear();
-
- if (mOverlay.get() != NULL) {
- mOverlay->destroy();
- mOverlay.clear();
- }
-}
-
-void SecHardwareRenderer::handleYUV420Planar(
- const void *data, size_t size) {
-
- int FrameSize;
- uint8_t* pPhyYAddr;
- uint8_t* pPhyCAddr;
- int AddrSize;
- size_t offset;
-
- CHECK(size >= (mDecodedWidth * mDecodedHeight * 3) / 2);
-
- offset = mIndex * mFrameSize;
- void *dst = (uint8_t *)mMemoryHeap->getBase() + offset;
-
- AddrSize = sizeof(void *);
- memcpy(&FrameSize, data, sizeof(FrameSize));
- memcpy(&pPhyYAddr, data + sizeof(FrameSize), sizeof(pPhyYAddr));
- memcpy(&pPhyCAddr, data + sizeof(FrameSize) + (AddrSize * 1), sizeof(pPhyCAddr));
-
- memcpy(dst , &pPhyYAddr, sizeof(pPhyYAddr));
- memcpy(dst + sizeof(pPhyYAddr) , &pPhyCAddr, sizeof(pPhyCAddr));
- memcpy(dst + sizeof(pPhyYAddr) + sizeof(pPhyCAddr), &mIndex, sizeof(mIndex));
-}
-
-void SecHardwareRenderer::render(
- const void *data, size_t size, void *platformPrivate) {
-
- if (mOverlay.get() == NULL) {
- return;
- }
-
- if (mCustomFormat) {
- /* zero copy solution case */
-
- overlay_buffer_t dst = (uint8_t *)mMemoryHeap->getBase() + mIndex*mFrameSize;
-
- if (mColorFormat == OMX_COLOR_FormatYUV420Planar ||
- mColorFormat == OMX_COLOR_FormatYUV420SemiPlanar) {
- handleYUV420Planar(data, size);
- }
-
- if (mOverlay->queueBuffer(dst) == ALL_BUFFERS_FLUSHED) {
- mIsFirstFrame = true;
- if (mOverlay->queueBuffer((void *)dst) != 0) {
- return;
- }
- }
-
- if (++mIndex == mNumBuf) {
- mIndex = 0;
- }
-
- overlay_buffer_t overlay_buffer;
- if (!mIsFirstFrame) {
- status_t err = mOverlay->dequeueBuffer(&overlay_buffer);
- if (err == ALL_BUFFERS_FLUSHED) {
- mIsFirstFrame = true;
- } else {
- return;
- }
- } else {
- mIsFirstFrame = false;
- }
- } else {
- /* normal frame case */
- if (mColorFormat == OMX_COLOR_FormatYUV420Planar) {
- memcpy(mOverlayAddresses[mIndex], data, size);
- }
-
- if (mOverlay->queueBuffer((void *)mIndex) == ALL_BUFFERS_FLUSHED) {
- mIsFirstFrame = true;
- if (mOverlay->queueBuffer((void *)mIndex) != 0) {
- return;
- }
- }
-
- if (++mIndex == mNumBuf) {
- mIndex = 0;
- }
-
- overlay_buffer_t overlay_buffer;
- if (!mIsFirstFrame) {
- status_t err = mOverlay->dequeueBuffer(&overlay_buffer);
-
- if (err == ALL_BUFFERS_FLUSHED) {
- mIsFirstFrame = true;
- } else {
- return;
- }
- } else {
- mIsFirstFrame = false;
- }
- }
-}
-
-} // namespace android
-
diff --git a/libstagefrighthw/SecHardwareRenderer.h b/libstagefrighthw/SecHardwareRenderer.h
deleted file mode 100644
index 3fad243..0000000
--- a/libstagefrighthw/SecHardwareRenderer.h
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Copyright (C) 2010 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.
- */
-
-#ifndef SEC_HARDWARE_RENDERER_H_
-
-#define SEC_HARDWARE_RENDERER_H_
-
-#include <media/stagefright/VideoRenderer.h>
-#include <utils/RefBase.h>
-#include <utils/Vector.h>
-
-#include <OMX_Component.h>
-
-#include <binder/MemoryHeapBase.h>
-#include <binder/MemoryHeapPmem.h>
-
-namespace android {
-
-class ISurface;
-class Overlay;
-
-class SecHardwareRenderer : public VideoRenderer {
-public:
- SecHardwareRenderer(
- const sp<ISurface> &surface,
- size_t displayWidth, size_t displayHeight,
- size_t decodedWidth, size_t decodedHeight,
- OMX_COLOR_FORMATTYPE colorFormat,
- int32_t rotationDegrees,
- bool fromHardwareDecoder);
-
- virtual ~SecHardwareRenderer();
-
- status_t initCheck() const { return mInitCheck; }
-
- virtual void render(
- const void *data, size_t size, void *platformPrivate);
-
-
-private:
- sp<ISurface> mISurface;
- size_t mDisplayWidth, mDisplayHeight;
- size_t mDecodedWidth, mDecodedHeight;
- OMX_COLOR_FORMATTYPE mColorFormat;
- status_t mInitCheck;
- size_t mFrameSize;
- sp<Overlay> mOverlay;
- sp<MemoryHeapBase> mMemoryHeap;
- Vector<void *> mOverlayAddresses;
- bool mIsFirstFrame;
- int mNumBuf;
- size_t mIndex;
- bool mCustomFormat;
-
-
- SecHardwareRenderer(const SecHardwareRenderer &);
- SecHardwareRenderer &operator=(const SecHardwareRenderer &);
-
- void handleYUV420Planar(const void *, size_t);
-};
-
-} // namespace android
-
-#endif // SEC_HARDWARE_RENDERER_H_
-
diff --git a/libstagefrighthw/stagefright_overlay_output.cpp b/libstagefrighthw/stagefright_overlay_output.cpp
deleted file mode 100644
index fce1d7e..0000000
--- a/libstagefrighthw/stagefright_overlay_output.cpp
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (C) 2010 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.
- */
-
-#include "SecHardwareRenderer.h"
-
-#include <media/stagefright/HardwareAPI.h>
-
-using android::sp;
-using android::ISurface;
-using android::VideoRenderer;
-
-VideoRenderer *createRendererWithRotation(
- const sp<ISurface> &surface,
- const char *componentName,
- OMX_COLOR_FORMATTYPE colorFormat,
- size_t displayWidth, size_t displayHeight,
- size_t decodedWidth, size_t decodedHeight,
- int32_t rotationDegrees) {
- using android::SecHardwareRenderer;
-
- bool fromHardwareDecoder = !strncmp(componentName, "OMX.SEC.", 8);
-
- SecHardwareRenderer *renderer =
- new SecHardwareRenderer(
- surface, displayWidth, displayHeight,
- decodedWidth, decodedHeight,
- colorFormat,
- rotationDegrees,
- fromHardwareDecoder);
-
- if (renderer->initCheck() != android::OK) {
- delete renderer;
- renderer = NULL;
- }
-
- return renderer;
-}
-
diff --git a/media_profiles.xml b/media_profiles.xml
index e57951d..3132f63 100644
--- a/media_profiles.xml
+++ b/media_profiles.xml
@@ -22,7 +22,7 @@
AudioDecoderCap)>
<!ELEMENT CamcorderProfiles (EncoderProfile+, ImageEncoding+, ImageDecoding, Camera)>
<!ELEMENT EncoderProfile (Video, Audio)>
-<!ATTLIST EncoderProfile quality (high|low) #REQUIRED>
+<!ATTLIST EncoderProfile quality (480p|qcif) #REQUIRED>
<!ATTLIST EncoderProfile fileFormat (mp4|3gp) #REQUIRED>
<!ATTLIST EncoderProfile duration (30|60) #REQUIRED>
<!ATTLIST EncoderProfile cameraId (0|1) #REQUIRED>
@@ -79,7 +79,7 @@
<!-- Each camcorder profile defines a set of predefined configuration parameters -->
<CamcorderProfiles cameraId="0">
- <EncoderProfile quality="high" fileFormat="mp4" duration="60">
+ <EncoderProfile quality="480p" fileFormat="mp4" duration="60">
<Video codec="h264"
bitRate="3000000"
width="720"
@@ -92,7 +92,7 @@
channels="1" />
</EncoderProfile>
- <EncoderProfile quality="low" fileFormat="3gp" duration="30">
+ <EncoderProfile quality="qcif" fileFormat="3gp" duration="30">
<Video codec="h264"
bitRate="256000"
width="176"
@@ -115,7 +115,7 @@
<CamcorderProfiles cameraId="1">
- <EncoderProfile quality="high" fileFormat="mp4" duration="60">
+ <EncoderProfile quality="480p" fileFormat="mp4" duration="60">
<Video codec="h264"
bitRate="1000000"
width="640"
@@ -128,7 +128,7 @@
channels="1" />
</EncoderProfile>
- <EncoderProfile quality="low" fileFormat="3gp" duration="30">
+ <EncoderProfile quality="qcif" fileFormat="3gp" duration="30">
<Video codec="h264"
bitRate="256000"
width="176"
diff --git a/mxt224_ts_input.idc b/mxt224_ts_input.idc
index f754999..d258f04 100644
--- a/mxt224_ts_input.idc
+++ b/mxt224_ts_input.idc
@@ -20,6 +20,10 @@
# Refer to the input device calibration documentation for more details.
#
+# Basic Parameters
+touch.deviceType = touchScreen
+touch.orientationAware = 1
+
# Touch Size
touch.touchSize.calibration = pressure
diff --git a/nvram_net.txt b/nvram_net.txt
new file mode 100755
index 0000000..f27f4a4
--- /dev/null
+++ b/nvram_net.txt
@@ -0,0 +1,58 @@
+sromrev=3
+vendid=0x14e4
+devid=0x432f
+boardtype=0x569
+boardrev=0x32
+boardflags=0x200
+xtalfreq=38400
+aa2g=1
+aa5g=0
+ag0=255
+
+# 11g paparams
+pa0b0=5585,5585,5757
+pa0b1=64174,64174,64201
+pa0b2=65162,65162,65207
+pa0itssit=62
+pa0maxpwr=77
+mcs2gpo0=0xaaaa
+mcs2gpo1=0xaaaa
+ofdmpo=0x66666666
+
+# 11g rssi params
+rssismf2g=0xa,0xa,0xa
+rssismc2g=0xb,0xb,0xa
+rssisav2g=0x3,0x3,0x3
+
+bxa2g=0
+rxpo2g=2
+tri2g=98
+
+# country code
+ccode=US
+cctl=0x0
+cckdigfilttype=6
+ofdmdigfilttype=1
+
+boardnum=1
+#macaddr=00:90:4c:c5:00:34
+#macaddr=00:11:22:33:44:55
+
+#######
+nocrc=1
+
+#for mfgc
+otpimagesize=182
+
+# sdio extra configs
+hwhdr=0x05ffff031030031003100000
+
+#This generates empty F1, F2 and F3 tuple chains, and may be used if the host SDIO stack does not require the standard tuples.
+#RAW1=80 02 fe ff
+
+#This includes the standard FUNCID and FUNCE tuples in the F1, F2, F3 and common CIS.
+RAW1=80 32 fe 21 02 0c 00 22 2a 01 01 00 00 c5 0 e6 00 00 00 00 00 40 00 00 ff ff 80 00 00 00 00 00 00 00 00 00 00 c8 00 00 00 00 00 00 00 00 00 00 00 00 00 ff 20 04 D0 2 29 43 21 02 0c 00 22 04 00 20 00 5A
+
+#for BT-coexistence
+btc_params80=0
+btc_params6=10
diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml
index 05090fd..60d99b7 100644
--- a/overlay/frameworks/base/core/res/res/values/config.xml
+++ b/overlay/frameworks/base/core/res/res/values/config.xml
@@ -114,14 +114,30 @@
attributes. This is used by the connectivity manager to decide which networks can coexist
based on the hardware -->
<!-- An Array of "[Connection name],[ConnectivityManager connection type],
- [associated radio-type],[priority] -->
+ [associated radio-type],[priority],[restoral-timer(ms)],[dependencyMet] -->
+ <!-- the 5th element "resore-time" indicates the number of milliseconds to delay
+ before automatically restore the default connection. Set -1 if the connection
+ does not require auto-restore. -->
+ <!-- the 6th element indicates boot-time dependency-met value. -->
<string-array translatable="false" name="networkAttributes">
- <item>"wifi,1,1,1"</item>
- <item>"mobile,0,0,0"</item>
- <item>"mobile_mms,2,0,2"</item>
- <item>"mobile_supl,3,0,2"</item>
- <item>"mobile_dun,4,0,4"</item>
- <item>"mobile_hipri,5,0,3"</item>
+ <item>"wifi,1,1,1,-1,true"</item>
+ <item>"mobile,0,0,0,-1,true"</item>
+ <item>"mobile_mms,2,0,2,60000,true"</item>
+ <item>"mobile_supl,3,0,2,60000,true"</item>
+ <item>"mobile_dun,4,0,4,60000,true"</item>
+ <item>"mobile_hipri,5,0,3,60000,true"</item>
+ <item>"bluetooth,7,7,0,-1,true"</item>
+ </string-array>
+
+ <!-- This string array should be overridden by the device to present a list of radio
+ attributes. This is used by the connectivity manager to decide which networks can coexist
+ based on the hardware -->
+ <!-- An Array of "[ConnectivityManager connectionType],
+ [# simultaneous connection types]" -->
+ <string-array translatable="false" name="radioAttributes">
+ <item>"1,1"</item>
+ <item>"0,1"</item>
+ <item>"7,1"</item>
</string-array>
<!-- List of regexpressions describing the interface (if any) that represent tetherable
@@ -145,6 +161,12 @@
<item>"wl0.1"</item>
</string-array>
+ <!-- List of regexpressions describing the interface (if any) that represent tetherable
+ bluetooth interfaces. If the device doesn't want to support tethering over bluetooth this
+ should be empty. -->
+ <string-array translatable="false" name="config_tether_bluetooth_regexs">
+ <item>"bnep\\d"</item>
+ </string-array>
<!-- Boolean indicating if we require the use of DUN on mobile for tethering -->
<bool translatable="false" name="config_tether_dun_required">false</bool>
@@ -173,4 +195,9 @@
It is recommended that this value be no more than 250 ms.
This feature should be disabled for most devices. -->
<integer name="config_virtualKeyQuietTimeMillis">250</integer>
+
+ <!-- Boolean indicating if current platform supports bluetooth wide band
+ speech -->
+ <bool name="config_bluetooth_wide_band_speech">false</bool>
+
</resources>
diff --git a/overlay/packages/wallpapers/Basic/res/drawable-hdpi/nexus_thumb.png b/overlay/packages/wallpapers/Basic/res/drawable-hdpi/nexus_thumb.png
deleted file mode 100644
index 84462e2..0000000
--- a/overlay/packages/wallpapers/Basic/res/drawable-hdpi/nexus_thumb.png
+++ /dev/null
Binary files differ
diff --git a/overlay/packages/wallpapers/Basic/res/drawable-hdpi/pyramid_background.png b/overlay/packages/wallpapers/Basic/res/drawable-hdpi/pyramid_background.png
deleted file mode 100644
index 2310a91..0000000
--- a/overlay/packages/wallpapers/Basic/res/drawable-hdpi/pyramid_background.png
+++ /dev/null
Binary files differ
diff --git a/overlay/packages/wallpapers/Basic/res/raw/nexus.rs b/overlay/packages/wallpapers/Basic/res/raw/nexus.rs
deleted file mode 100644
index df79689..0000000
--- a/overlay/packages/wallpapers/Basic/res/raw/nexus.rs
+++ /dev/null
@@ -1,313 +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.
-
-#pragma version(1)
-#pragma stateVertex(PVOrtho)
-#pragma stateStore(PSSolid)
-
-#define MAX_PULSES 20
-#define MAX_EXTRAS 40
-#define PULSE_SIZE 14 // Size in pixels of a cell
-#define HALF_PULSE_SIZE 7
-#define GLOW_SIZE 64 // Size of the leading glow in pixels
-#define HALF_GLOW_SIZE 32
-#define SPEED 0.2f // (200 / 1000) Pixels per ms
-#define SPEED_VARIANCE 0.3f
-#define PULSE_NORMAL 0
-#define PULSE_EXTRA 1
-#define TRAIL_SIZE 40 // Number of cells in a trail
-#define MAX_DELAY 2000 // Delay between a pulse going offscreen and restarting
-
-struct pulse_s {
- int pulseType;
- float originX;
- float originY;
- int color;
- int startTime;
- float dx;
- float dy;
- float scale;
- int active;
-};
-struct pulse_s gPulses[MAX_PULSES];
-
-struct pulse_s gExtras[MAX_EXTRAS];
-
-int gNow;
-
-
-void setColor(int c) {
- if (State->mode == 1) {
- // sholes red
- color(0.9f, 0.1f, 0.1f, 0.8f);
- } else if (c == 0) {
- // red
- color(1.0f, 0.0f, 0.0f, 0.8f);
- } else if (c == 1) {
- // green
- color(0.0f, 0.8f, 0.0f, 0.8f);
- } else if (c == 2) {
- // blue
- color(0.0f, 0.4f, 0.9f, 0.8f);
- } else if (c == 3) {
- // yellow
- color(1.0f, 0.8f, 0.0f, 0.8f);
- }
-}
-
-void initPulse(struct pulse_s * pulse, int pulseType) {
- float scale = randf2(0.7f, 1.7f);
- pulse->scale = scale;
- if (randf(1) > 0.5f) {
- pulse->originX = (int)randf(State->width * 2 / PULSE_SIZE) * PULSE_SIZE;
- pulse->dx = 0;
- if (randf(1) > 0.5f) {
- // Top
- pulse->originY = 0;
- pulse->dy = scale;
- } else {
- // Bottom
- pulse->originY = State->height / scale;
- pulse->dy = -scale;
- }
- } else {
- pulse->originY = (int)randf(State->height / PULSE_SIZE) * PULSE_SIZE;
- pulse->dy = 0;
- if (randf(1) > 0.5f) {
- // Left
- pulse->originX = 0;
- pulse->dx = scale;
- } else {
- // Right
- pulse->originX = State->width * 2 / scale;
- pulse->dx = -scale;
- }
- }
- pulse->startTime = gNow + (int)randf(MAX_DELAY);
-
- pulse->color = (int)randf(4.0f);
-
- pulse->pulseType = pulseType;
- if (pulseType == PULSE_EXTRA) {
- pulse->active = 0;
- } else {
- pulse->active = 1;
- }
-}
-
-void initPulses() {
- gNow = uptimeMillis();
- int i;
- for (i=0; i<MAX_PULSES; i++) {
- initPulse(&gPulses[i], PULSE_NORMAL);
- }
- for (i=0; i<MAX_EXTRAS; i++) {
- struct pulse_s * p = &gExtras[i];
- p->pulseType = PULSE_EXTRA;
- p->active = 0;
- }
-}
-
-void drawBackground(int width, int height) {
- bindProgramFragment(NAMED_PFTextureBG);
- bindTexture(NAMED_PFTextureBG, 0, NAMED_TBackground);
- color(1.0f, 1.0f, 1.0f, 1.0f);
- if (State->rotate) {
- drawRect(0.0f, 0.0f, height*2, width, 0.0f);
- } else {
- drawRect(0.0f, 0.0f, width*2, height, 0.0f);
- }
-}
-
-void drawPulses(struct pulse_s * pulseSet, int setSize) {
- bindProgramFragment(NAMED_PFTexture);
- bindProgramFragmentStore(NAMED_PSBlend);
-
- float matrix[16];
- float modelMatrix[16];
-
- int i;
- for (i=0; i<setSize; i++) {
- struct pulse_s * p = &pulseSet[i];
-
- int delta = gNow - p->startTime;
-
- if (p->active != 0 && delta >= 0) {
-
- matrixLoadIdentity(modelMatrix);
- if (State->rotate) {
- //matrixLoadRotate(modelMatrix, 90.0f, 0.0f, 0.0f, 1.0f);
- //matrixTranslate(modelMatrix, 0.0f, -height, 1.0f);
- // XXX: HAX: do not slide display in landscape
- } else {
- matrixTranslate(modelMatrix, -(State->xOffset * State->width), 0, 0);
- }
- matrixScale(modelMatrix, p->scale, p->scale, 1.0f);
- vpLoadModelMatrix(modelMatrix);
-
- float x = p->originX + (p->dx * SPEED * delta);
- float y = p->originY + (p->dy * SPEED * delta);
-
- matrixLoadIdentity(matrix);
- if (p->dx < 0) {
- vpLoadTextureMatrix(matrix);
- float xx = x + (TRAIL_SIZE * PULSE_SIZE);
- if (xx <= 0) {
- initPulse(p, p->pulseType);
- } else {
- setColor(p->color);
- bindTexture(NAMED_PFTexture, 0, NAMED_TPulse);
- drawRect(x, y, xx, y + PULSE_SIZE, 0.0f);
- bindTexture(NAMED_PFTexture, 0, NAMED_TGlow);
- drawRect(x + HALF_PULSE_SIZE - HALF_GLOW_SIZE,
- y + HALF_PULSE_SIZE - HALF_GLOW_SIZE,
- x + HALF_PULSE_SIZE + HALF_GLOW_SIZE,
- y + HALF_PULSE_SIZE + HALF_GLOW_SIZE,
- 0.0f);
- }
- } else if (p->dx > 0) {
- x += PULSE_SIZE; // need to start on the other side of this cell
- vpLoadTextureMatrix(matrix);
- float xx = x - (TRAIL_SIZE * PULSE_SIZE);
- if (xx >= State->width * 2) {
- initPulse(p, p->pulseType);
- } else {
- setColor(p->color);
- bindTexture(NAMED_PFTexture, 0, NAMED_TPulse);
- drawRect(x, y, xx, y + PULSE_SIZE, 0.0f);
- bindTexture(NAMED_PFTexture, 0, NAMED_TGlow);
- drawRect(x - HALF_PULSE_SIZE - HALF_GLOW_SIZE,
- y + HALF_PULSE_SIZE - HALF_GLOW_SIZE,
- x - HALF_PULSE_SIZE + HALF_GLOW_SIZE,
- y + HALF_PULSE_SIZE + HALF_GLOW_SIZE,
- 0.0f);
- }
- } else if (p->dy < 0) {
- vpLoadTextureMatrix(matrix);
- float yy = y + (TRAIL_SIZE * PULSE_SIZE);
- if (yy <= 0) {
- initPulse(p, p->pulseType);
- } else {
- setColor(p->color);
- bindTexture(NAMED_PFTexture, 0, NAMED_TPulseVert);
- drawRect(x, yy, x + PULSE_SIZE, y, 0.0f);
- bindTexture(NAMED_PFTexture, 0, NAMED_TGlow);
- drawRect(x + HALF_PULSE_SIZE - HALF_GLOW_SIZE,
- y + HALF_PULSE_SIZE - HALF_GLOW_SIZE,
- x + HALF_PULSE_SIZE + HALF_GLOW_SIZE,
- y + HALF_PULSE_SIZE + HALF_GLOW_SIZE,
- 0.0f);
- }
- } else if (p->dy > 0) {
- y += PULSE_SIZE; // need to start on the other side of this cell
- vpLoadTextureMatrix(matrix);
- float yy = y - (TRAIL_SIZE * PULSE_SIZE);
- if (yy >= State->height) {
- initPulse(p, p->pulseType);
- } else {
- setColor(p->color);
- bindTexture(NAMED_PFTexture, 0, NAMED_TPulseVert);
- drawRect(x, yy, x + PULSE_SIZE, y, 0.0f);
- bindTexture(NAMED_PFTexture, 0, NAMED_TGlow);
- drawRect(x + HALF_PULSE_SIZE - HALF_GLOW_SIZE,
- y - HALF_PULSE_SIZE - HALF_GLOW_SIZE,
- x + HALF_PULSE_SIZE + HALF_GLOW_SIZE,
- y - HALF_PULSE_SIZE + HALF_GLOW_SIZE,
- 0.0f);
- }
- }
- }
- }
-
-
- matrixLoadIdentity(matrix);
- vpLoadTextureMatrix(matrix);
-}
-
-void addTap(int x, int y) {
- int i;
- int count = 0;
- int color = (int)randf(4.0f);
- float scale = randf2(0.9f, 1.9f);
- x = (int)(x / PULSE_SIZE) * PULSE_SIZE;
- y = (int)(y / PULSE_SIZE) * PULSE_SIZE;
- for (i=0; i<MAX_EXTRAS; i++) {
- struct pulse_s * p = &gExtras[i];
- if (p->active == 0) {
- p->originX = x/scale;
- p->originY = y/scale;
- p->scale = scale;
-
- if (count == 0) {
- p->dx = scale;
- p->dy = 0.0f;
- } else if (count == 1) {
- p->dx = -scale;
- p->dy = 0.0f;
- } else if (count == 2) {
- p->dx = 0.0f;
- p->dy = scale;
- } else if (count == 3) {
- p->dx = 0.0f;
- p->dy = -scale;
- }
-
- p->active = 1;
- p->color = color;
- color++;
- if (color >= 4) {
- color = 0;
- }
- p->startTime = gNow;
- count++;
- if (count == 4) {
- break;
- }
- }
- }
-}
-
-int main(int index) {
-
- gNow = uptimeMillis();
-
- if (Command->command != 0) {
- //debugF("x", Command->x);
- //debugF("y", Command->y);
- Command->command = 0;
- addTap(Command->x, Command->y);
- }
-
- int width = State->width;
- int height = State->height;
-
- float matrix[16];
- matrixLoadIdentity(matrix);
- if (State->rotate) {
- //matrixLoadRotate(matrix, 90.0f, 0.0f, 0.0f, 1.0f);
- //matrixTranslate(matrix, 0.0f, -height, 1.0f);
- // XXX: HAX: do not slide display in landscape
- } else {
- matrixTranslate(matrix, -(State->xOffset * width), 0, 0);
- }
-
- vpLoadModelMatrix(matrix);
-
- drawBackground(width, height);
-
- drawPulses(gPulses, MAX_PULSES);
- drawPulses(gExtras, MAX_EXTRAS);
-
- return 45;
-}
diff --git a/overlay/packages/wallpapers/Basic/res/values/surfacemode.xml b/overlay/packages/wallpapers/Basic/res/values/surfacemode.xml
deleted file mode 100644
index 37774ed..0000000
--- a/overlay/packages/wallpapers/Basic/res/values/surfacemode.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2010 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.
--->
-<resources>
- <bool name="use_32bit">true</bool>
-</resources>
diff --git a/qwerty.kl b/qwerty.kl
deleted file mode 100644
index 0b1ea74..0000000
--- a/qwerty.kl
+++ /dev/null
@@ -1,90 +0,0 @@
-key 399 GRAVE
-key 2 1
-key 3 2
-key 4 3
-key 5 4
-key 6 5
-key 7 6
-key 8 7
-key 9 8
-key 10 9
-key 11 0
-key 1 BACK WAKE_DROPPED
-key 158 BACK WAKE_DROPPED
-key 230 SOFT_RIGHT WAKE
-key 60 SOFT_RIGHT WAKE
-key 107 ENDCALL WAKE_DROPPED
-key 62 ENDCALL WAKE_DROPPED
-key 229 MENU WAKE_DROPPED
-key 139 MENU WAKE_DROPPED
-key 59 MENU WAKE_DROPPED
-key 127 SEARCH WAKE_DROPPED
-key 217 SEARCH WAKE_DROPPED
-key 228 POUND
-key 227 STAR
-key 231 CALL WAKE_DROPPED
-key 61 CALL WAKE_DROPPED
-key 232 DPAD_CENTER WAKE_DROPPED
-key 108 DPAD_DOWN WAKE_DROPPED
-key 103 DPAD_UP WAKE_DROPPED
-key 102 HOME WAKE
-key 105 DPAD_LEFT WAKE_DROPPED
-key 106 DPAD_RIGHT WAKE_DROPPED
-key 115 VOLUME_UP WAKE
-key 114 VOLUME_DOWN WAKE
-key 116 POWER WAKE
-key 212 CAMERA
-
-key 16 Q
-key 17 W
-key 18 E
-key 19 R
-key 20 T
-key 21 Y
-key 22 U
-key 23 I
-key 24 O
-key 25 P
-key 26 LEFT_BRACKET
-key 27 RIGHT_BRACKET
-key 43 BACKSLASH
-
-key 30 A
-key 31 S
-key 32 D
-key 33 F
-key 34 G
-key 35 H
-key 36 J
-key 37 K
-key 38 L
-key 39 SEMICOLON
-key 40 APOSTROPHE
-key 14 DEL
-
-key 44 Z
-key 45 X
-key 46 C
-key 47 V
-key 48 B
-key 49 N
-key 50 M
-key 51 COMMA
-key 52 PERIOD
-key 53 SLASH
-key 28 ENTER
-
-key 56 ALT_LEFT
-key 100 ALT_RIGHT
-key 42 SHIFT_LEFT
-key 54 SHIFT_RIGHT
-key 15 TAB
-key 57 SPACE
-key 150 EXPLORER
-key 155 ENVELOPE
-
-key 12 MINUS
-key 13 EQUALS
-key 215 AT
-
-
diff --git a/recovery/recovery_ui.c b/recovery/recovery_ui.c
index d26bff8..81ed4f2 100644
--- a/recovery/recovery_ui.c
+++ b/recovery/recovery_ui.c
@@ -33,6 +33,9 @@ char* MENU_ITEMS[] = { "reboot system now",
"wipe cache partition",
NULL };
+void device_ui_init(UIParameters* ui_parameters) {
+}
+
int device_recovery_start() {
// recovery can get started before the kernel has created the EMMC
// devices, which will make the wipe_data operation fail (trying
diff --git a/s3c-keypad.kcm b/s3c-keypad.kcm
index 8056364..7ee6e5a 100644
--- a/s3c-keypad.kcm
+++ b/s3c-keypad.kcm
@@ -1,64 +1,15 @@
-[type=QWERTY]
-
-# keycode display number base caps fn caps_fn
-
-A 'A' '2' 'a' 'A' '#' 0x00
-B 'B' '2' 'b' 'B' '<' 0x00
-C 'C' '2' 'c' 'C' '9' 0x00E7
-D 'D' '3' 'd' 'D' '5' 0x00
-E 'E' '3' 'e' 'E' '2' 0x0301
-F 'F' '3' 'f' 'F' '6' 0x00A5
-G 'G' '4' 'g' 'G' '-' '_'
-H 'H' '4' 'h' 'H' '[' '{'
-I 'I' '4' 'i' 'I' '$' 0x0302
-J 'J' '5' 'j' 'J' ']' '}'
-K 'K' '5' 'k' 'K' '"' '~'
-L 'L' '5' 'l' 'L' ''' '`'
-M 'M' '6' 'm' 'M' '!' 0x00
-N 'N' '6' 'n' 'N' '>' 0x0303
-O 'O' '6' 'o' 'O' '(' 0x00
-P 'P' '7' 'p' 'P' ')' 0x00
-Q 'Q' '7' 'q' 'Q' '*' 0x0300
-R 'R' '7' 'r' 'R' '3' 0x20AC
-S 'S' '7' 's' 'S' '4' 0x00DF
-T 'T' '8' 't' 'T' '+' 0x00A3
-U 'U' '8' 'u' 'U' '&' 0x0308
-V 'V' '8' 'v' 'V' '=' '^'
-W 'W' '9' 'w' 'W' '1' 0x00
-X 'X' '9' 'x' 'X' '8' 0xEF00
-Y 'Y' '9' 'y' 'Y' '%' 0x00A1
-Z 'Z' '9' 'z' 'Z' '7' 0x00
-
-# on pc keyboards
-COMMA ',' ',' ',' ';' ';' '|'
-PERIOD '.' '.' '.' ':' ':' 0x2026
-AT '@' '0' '@' '0' '0' 0x2022
-SLASH '/' '/' '/' '?' '?' '\'
-
-SPACE 0x20 0x20 0x20 0x20 0xEF01 0xEF01
-ENTER 0xa 0xa 0xa 0xa 0xa 0xa
-
-TAB 0x9 0x9 0x9 0x9 0x9 0x9
-0 '0' '0' '0' ')' ')' ')'
-1 '1' '1' '1' '!' '!' '!'
-2 '2' '2' '2' '@' '@' '@'
-3 '3' '3' '3' '#' '#' '#'
-4 '4' '4' '4' '$' '$' '$'
-5 '5' '5' '5' '%' '%' '%'
-6 '6' '6' '6' '^' '^' '^'
-7 '7' '7' '7' '&' '&' '&'
-8 '8' '8' '8' '*' '*' '*'
-9 '9' '9' '9' '(' '(' '('
-
-GRAVE '`' '`' '`' '~' '`' '~'
-MINUS '-' '-' '-' '_' '-' '_'
-EQUALS '=' '=' '=' '+' '=' '+'
-LEFT_BRACKET '[' '[' '[' '{' '[' '{'
-RIGHT_BRACKET ']' ']' ']' '}' ']' '}'
-BACKSLASH '\' '\' '\' '|' '\' '|'
-SEMICOLON ';' ';' ';' ':' ';' ':'
-APOSTROPHE ''' ''' ''' '"' ''' '"'
-STAR '*' '*' '*' '*' '*' '*'
-POUND '#' '#' '#' '#' '#' '#'
-PLUS '+' '+' '+' '+' '+' '+'
-
+# Copyright (C) 2010 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.
+
+type SPECIAL_FUNCTION
diff --git a/s3c-keypad.kl b/s3c-keypad.kl
index 2bcff82..72f3f4e 100644
--- a/s3c-keypad.kl
+++ b/s3c-keypad.kl
@@ -1,3 +1,17 @@
+# Copyright (C) 2010 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.
+
key 42 VOLUME_UP WAKE
key 58 VOLUME_DOWN WAKE
key 50 HOME WAKE_DROPPED
diff --git a/samsung_mfc_fw.bin b/samsung_mfc_fw.bin
new file mode 100644
index 0000000..67483e0
--- /dev/null
+++ b/samsung_mfc_fw.bin
Binary files differ
diff --git a/sec_jack.kcm b/sec_jack.kcm
new file mode 100644
index 0000000..7ee6e5a
--- /dev/null
+++ b/sec_jack.kcm
@@ -0,0 +1,15 @@
+# Copyright (C) 2010 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.
+
+type SPECIAL_FUNCTION
diff --git a/sec_jack.kl b/sec_jack.kl
index 92d6553..1a421d6 100644
--- a/sec_jack.kl
+++ b/sec_jack.kl
@@ -1,3 +1,17 @@
+# Copyright (C) 2010 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.
+
key 163 MEDIA_NEXT WAKE
key 165 MEDIA_PREVIOUS WAKE
key 226 HEADSETHOOK WAKE
diff --git a/sec_mm/sec_omx/sec_codecs/video/mfc_c110/dec/Android.mk b/sec_mm/sec_omx/sec_codecs/video/mfc_c110/dec/Android.mk
index 7d1f027..c15cd41 100644
--- a/sec_mm/sec_omx/sec_codecs/video/mfc_c110/dec/Android.mk
+++ b/sec_mm/sec_omx/sec_codecs/video/mfc_c110/dec/Android.mk
@@ -9,7 +9,7 @@ LOCAL_SRC_FILES := \
LOCAL_MODULE := libsecmfcdecapi
-LOCAL_PRELINK_MODULE := false
+
LOCAL_CFLAGS :=
diff --git a/sec_mm/sec_omx/sec_codecs/video/mfc_c110/enc/Android.mk b/sec_mm/sec_omx/sec_codecs/video/mfc_c110/enc/Android.mk
index 735da6b..b57346b 100644
--- a/sec_mm/sec_omx/sec_codecs/video/mfc_c110/enc/Android.mk
+++ b/sec_mm/sec_omx/sec_codecs/video/mfc_c110/enc/Android.mk
@@ -9,7 +9,7 @@ LOCAL_SRC_FILES := \
LOCAL_MODULE := libsecmfcencapi
-LOCAL_PRELINK_MODULE := false
+
LOCAL_CFLAGS := -DUSE_FIMC_FRAME_BUFFER
diff --git a/sec_mm/sec_omx/sec_omx_component/common/Android.mk b/sec_mm/sec_omx/sec_omx_component/common/Android.mk
index b4d5ca0..ac0516c 100644
--- a/sec_mm/sec_omx/sec_omx_component/common/Android.mk
+++ b/sec_mm/sec_omx/sec_omx_component/common/Android.mk
@@ -8,7 +8,7 @@ LOCAL_SRC_FILES := \
SEC_OMX_Baseport.c \
SEC_OMX_Resourcemanager.c
-LOCAL_PRELINK_MODULE := false
+
LOCAL_MODULE := libsecbasecomponent
LOCAL_CFLAGS :=
diff --git a/sec_mm/sec_omx/sec_omx_component/common/SEC_OMX_Basecomponent.c b/sec_mm/sec_omx/sec_omx_component/common/SEC_OMX_Basecomponent.c
index d1b224f..5c96002 100644
--- a/sec_mm/sec_omx/sec_omx_component/common/SEC_OMX_Basecomponent.c
+++ b/sec_mm/sec_omx/sec_omx_component/common/SEC_OMX_Basecomponent.c
@@ -1215,7 +1215,7 @@ OMX_ERRORTYPE SEC_OMX_GetConfig(
ret = OMX_ErrorInvalidState;
goto EXIT;
}
- ret = OMX_ErrorNone;
+ ret = OMX_ErrorUnsupportedIndex;
EXIT:
FunctionOut();
@@ -1258,7 +1258,7 @@ OMX_ERRORTYPE SEC_OMX_SetConfig(
ret = OMX_ErrorInvalidState;
goto EXIT;
}
- ret = OMX_ErrorNone;
+ ret = OMX_ErrorUnsupportedIndex;
EXIT:
FunctionOut();
diff --git a/sec_mm/sec_omx/sec_omx_component/video/dec/h264dec/Android.mk b/sec_mm/sec_omx/sec_omx_component/video/dec/h264dec/Android.mk
index f6e6802..08e9874 100644
--- a/sec_mm/sec_omx/sec_omx_component/video/dec/h264dec/Android.mk
+++ b/sec_mm/sec_omx/sec_omx_component/video/dec/h264dec/Android.mk
@@ -7,7 +7,7 @@ LOCAL_SRC_FILES := \
SEC_OMX_H264dec.c \
library_register.c
-LOCAL_PRELINK_MODULE := false
+
LOCAL_MODULE := libOMX.SEC.AVC.Decoder
LOCAL_CFLAGS :=
diff --git a/sec_mm/sec_omx/sec_omx_component/video/dec/mpeg4dec/Android.mk b/sec_mm/sec_omx/sec_omx_component/video/dec/mpeg4dec/Android.mk
index a7a6053..92891a7 100644
--- a/sec_mm/sec_omx/sec_omx_component/video/dec/mpeg4dec/Android.mk
+++ b/sec_mm/sec_omx/sec_omx_component/video/dec/mpeg4dec/Android.mk
@@ -7,7 +7,7 @@ LOCAL_SRC_FILES := \
SEC_OMX_Mpeg4dec.c \
library_register.c
-LOCAL_PRELINK_MODULE := false
+
LOCAL_MODULE := libOMX.SEC.M4V.Decoder
LOCAL_CFLAGS :=
diff --git a/sec_mm/sec_omx/sec_omx_component/video/enc/h264enc/Android.mk b/sec_mm/sec_omx/sec_omx_component/video/enc/h264enc/Android.mk
index 8f25409..3edcb58 100644
--- a/sec_mm/sec_omx/sec_omx_component/video/enc/h264enc/Android.mk
+++ b/sec_mm/sec_omx/sec_omx_component/video/enc/h264enc/Android.mk
@@ -7,7 +7,7 @@ LOCAL_SRC_FILES := \
SEC_OMX_H264enc.c \
library_register.c
-LOCAL_PRELINK_MODULE := false
+
LOCAL_MODULE := libOMX.SEC.AVC.Encoder
LOCAL_CFLAGS :=
diff --git a/sec_mm/sec_omx/sec_omx_component/video/enc/mpeg4enc/Android.mk b/sec_mm/sec_omx/sec_omx_component/video/enc/mpeg4enc/Android.mk
index e4e4ee4..87c3924 100644
--- a/sec_mm/sec_omx/sec_omx_component/video/enc/mpeg4enc/Android.mk
+++ b/sec_mm/sec_omx/sec_omx_component/video/enc/mpeg4enc/Android.mk
@@ -7,7 +7,7 @@ LOCAL_SRC_FILES := \
SEC_OMX_Mpeg4enc.c \
library_register.c
-LOCAL_PRELINK_MODULE := false
+
LOCAL_MODULE := libOMX.SEC.M4V.Encoder
LOCAL_CFLAGS :=
diff --git a/sec_mm/sec_omx/sec_omx_core/Android.mk b/sec_mm/sec_omx/sec_omx_core/Android.mk
index dc2e3ee..3fc0811 100644
--- a/sec_mm/sec_omx/sec_omx_core/Android.mk
+++ b/sec_mm/sec_omx/sec_omx_core/Android.mk
@@ -6,7 +6,7 @@ LOCAL_MODULE_TAGS := optional
LOCAL_SRC_FILES := SEC_OMX_Component_Register.c \
SEC_OMX_Core.c
-LOCAL_PRELINK_MODULE := false
+
LOCAL_MODULE := libSEC_OMX_Core
LOCAL_CFLAGS :=
diff --git a/sec_mm/sec_omx/sec_osal/Android.mk b/sec_mm/sec_omx/sec_osal/Android.mk
index 9bd2a5d..894bc7a 100644
--- a/sec_mm/sec_omx/sec_osal/Android.mk
+++ b/sec_mm/sec_omx/sec_osal/Android.mk
@@ -14,7 +14,7 @@ LOCAL_SRC_FILES := \
SEC_OSAL_Library.c \
SEC_OSAL_Log.c
-LOCAL_PRELINK_MODULE := false
+
LOCAL_MODULE := libsecosal
LOCAL_CFLAGS :=
diff --git a/self-extractors/PART1 b/self-extractors/PART1
new file mode 100644
index 0000000..935267e
--- /dev/null
+++ b/self-extractors/PART1
@@ -0,0 +1,12 @@
+#
+# Usage is subject to the enclosed license agreement
+
+echo
+echo The license for this software will now be displayed.
+echo You must agree to this license before using this software.
+echo
+echo -n Press Enter to view the license
+read dummy
+echo
+
+more << __EOF__
diff --git a/self-extractors/PART2 b/self-extractors/PART2
new file mode 100644
index 0000000..30e8d43
--- /dev/null
+++ b/self-extractors/PART2
@@ -0,0 +1,22 @@
+__EOF__
+
+if test $? != 0
+then
+ echo ERROR: Couldn\'t display license file 1>&2
+ exit 1
+fi
+
+echo
+
+echo -n Type \"I ACCEPT\" if you agree to the terms of the license:\
+read typed
+
+if test "$typed" != I\ ACCEPT
+then
+ echo
+ echo You didn\'t accept the license. Extraction aborted.
+ exit 2
+fi
+
+echo
+
diff --git a/self-extractors/PART3 b/self-extractors/PART3
new file mode 100644
index 0000000..6847be5
--- /dev/null
+++ b/self-extractors/PART3
@@ -0,0 +1,12 @@
+
+if test $? != 0
+then
+ echo
+ echo ERROR: Couldn\'t extract files. 1>&2
+ exit 3
+else
+ echo
+ echo Files extracted successfully.
+fi
+exit 0
+
diff --git a/self-extractors/PROLOGUE b/self-extractors/PROLOGUE
new file mode 100644
index 0000000..c856ef1
--- /dev/null
+++ b/self-extractors/PROLOGUE
@@ -0,0 +1,2 @@
+#!/bin/bash
+#
diff --git a/self-extractors/akm/COPYRIGHT b/self-extractors/akm/COPYRIGHT
new file mode 100644
index 0000000..39c6ed1
--- /dev/null
+++ b/self-extractors/akm/COPYRIGHT
@@ -0,0 +1 @@
+# (C) AKM Semiconductor Inc. All Rights Reserved.
diff --git a/self-extractors/akm/LICENSE b/self-extractors/akm/LICENSE
new file mode 100644
index 0000000..e6a53b7
--- /dev/null
+++ b/self-extractors/akm/LICENSE
@@ -0,0 +1 @@
+AKM LICENSE SHOULD GO HERE
diff --git a/self-extractors/akm/staging/BoardConfigCrespo.mk b/self-extractors/akm/staging/BoardConfigCrespo.mk
new file mode 100644
index 0000000..01a0ff3
--- /dev/null
+++ b/self-extractors/akm/staging/BoardConfigCrespo.mk
@@ -0,0 +1,13 @@
+# Copyright (C) 2010 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.
diff --git a/self-extractors/akm/staging/device-crespo.mk b/self-extractors/akm/staging/device-crespo.mk
new file mode 100644
index 0000000..bb28e2b
--- /dev/null
+++ b/self-extractors/akm/staging/device-crespo.mk
@@ -0,0 +1,17 @@
+# Copyright (C) 2010 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.
+
+# AKM blob necessary for crespo
+PRODUCT_COPY_FILES := \
+ vendor/akm/crespo/proprietary/libakm.so:system/vendor/lib/libakm.so
diff --git a/self-extractors/broadcom/COPYRIGHT b/self-extractors/broadcom/COPYRIGHT
new file mode 100644
index 0000000..bf44774
--- /dev/null
+++ b/self-extractors/broadcom/COPYRIGHT
@@ -0,0 +1 @@
+# (C) Broadcom Corporation
diff --git a/self-extractors/broadcom/LICENSE b/self-extractors/broadcom/LICENSE
new file mode 100644
index 0000000..321757f
--- /dev/null
+++ b/self-extractors/broadcom/LICENSE
@@ -0,0 +1,218 @@
+THIS DEVELOPER SOFTWARE LICENSE AGREEMENT (THE "AGREEMENT") IS A LEGALLY
+BINDING AGREEMENT BETWEEN BROADCOM CORPORATION ("LICENSOR") AND
+YOU OR THE LEGAL ENTITY YOU REPRESENT ("You" or its possessive, "Your"). BY
+TYPING "I ACCEPT" WHERE INDICATED YOU ACKNOWLEDGE THAT YOU HAVE READ THIS
+AGREEMENT, UNDERSTAND IT AND AGREE TO BE BOUND BY ITS TERMS AND CONDITIONS. IF
+YOU DO NOT AGREE TO THESE TERMS YOU MUST DISCONTINUE THE INSTALLATION PROCESS
+AND YOU SHALL NOT USE THE SOFTWARE OR RETAIN ANY COPIES OF THE SOFTWARE OR
+DOCUMENTATION. ANY USE OR POSSESSION OF THE SOFTWARE BY YOU IS SUBJECT TO THE
+TERMS AND CONDITIONS SET FORTH IN THIS AGREEMENT. IF THE SOFTWARE IS INSTALLED
+ON A COMPUTER OWNED BY A CORPORATION OR OTHER LEGAL ENTITY, THEN YOU REPRESENT
+AND WARRANT THAT YOU HAVE THE AUTHORITY TO BIND SUCH ENTITY TO THE TERMS AND
+CONDITIONS OF THIS AGREEMENT.
+
+ 1. Special Definitions
+
+ a. The term "Android" means the open source mobile platform, software
+ stack, operating system, middleware, application programming
+ interfaces and mobile applications under the trade-name "Android"
+ distributed at Android.com.
+
+ b. The term "Android Applications" means a software application or
+ open-source contribution developed by You, designed to operate with
+ Android that does not contain or incorporate any of the Software.
+
+ c. The term "Authorized Android Enabled Device" means the device
+ identified on the site from which You downloaded the Software.
+ The term "Software" means the Licensor's proprietary software and
+ libraries in object code form, designed for use on the Authorized
+ Android Enabled Device.
+
+ d. The term "Authorized Android Enabled Device Software" means a
+ packaged build for Authorized Android Enabled Devices, consisting of
+ files suitable for installation on an Authorized Android Enabled
+ Device using a mechanism such as fastboot mode or recovery mode.
+
+ 2. License Grant
+
+ a. Subject to the terms of this Agreement, Licensor hereby grants to
+ You, free of charge, a non-exclusive, non-sublicensable,
+ non-transferable, limited license, during the term of this Agreement,
+ to download, install and use the Software internally in
+ machine-readable (i.e., object code) form and the Documentation for
+ non-commercial use on an Authorized Android Enabled Device and
+ non-commercial redistribution of the Authorized Android Enabled
+ Device Software (the “Limited Purpose”). You may grant your end users
+ the right to use the Software for the Limited Purpose. The license to
+ the Software granted to You hereunder is solely for the Limited
+ Purpose set forth in this section, and the Software shall not be used
+ for any other purpose.
+
+ 3. Restrictions
+
+ a. Retention of Rights. The entire right, title and interest in the
+ Software shall remain with Licensor and, unless specified in writing
+ hereunder, no rights are granted to any of the Software. Except for
+ the right to use the Software for the Limited Purpose, the delivery
+ of the Software to You does not convey to You any intellectual
+ property rights in the Software, including, but not limited to any
+ rights under any patent, trademark, copyright, or trade secret.
+ Neither the delivery of the Software to You nor any terms set forth
+ herein shall be construed to grant to You, either expressly, by
+ implication or by way of estoppel, any license under any patents or
+ other intellectual property rights covering or relating to any other
+ product or invention or any combination of the Software with any
+ other product. Any rights not expressly granted to You herein are
+ reserved by Licensor.
+
+ b. No Commercialization or Distribution of the Software and
+ Documentation. Except as expressly provided in Section 2 of this
+ Agreement, You shall have no right to (i) copy, disclose, distribute,
+ publically perform, publically display, transfer, alter, modify,
+ translate, disassemble, decompile, reverse engineer, or adapt the
+ Software and Documentation, or any portion thereof, or create any
+ derivative works based thereon; (ii) rent, lease, assign, sublicense,
+ resell, disclose or otherwise transfer the Software and Documentation
+ in whole or in part to any third party (iii) use the Software and
+ Documentation except for the Limited Purpose, (iv) remove or alter
+ any of the copyright or proprietary notices contained in any of the
+ Software and Documentation. For the purposes of clarity, nothing in
+ this Agreement prohibits You from making and distributing Android
+ Applications under commercial or non-commercial terms, provided that
+ You shall not contain, incorporate, and/or compile the Software or
+ any of its derivative works, in whole or in part, into Your Android
+ Applications and/or any software/devices created by You or by third
+ parties acting on Your behalf. You and any such third party shall
+ comply with all of the terms and conditions of this Agreement.
+
+ c. No Reverse Engineering. Except for any portions of the Software
+ provided to You in source code format and except for any third party
+ code distributed with the Software that is licensed under contrary
+ terms, You will not reverse engineer, disassemble,
+ decompile, or translate the Software, or otherwise attempt to derive
+ the source code version of the Software, except if and to the extent
+ expressly permitted under any applicable law.
+
+ d. Third Party Software. You agree that Android may contain third party
+ software. You agree that you may not distribute such third party
+ software for any purpose without appropriate licenses from the
+ applicable third party or parties.
+
+ e. No Transfer or Assignment. You shall not assign any of its rights or
+ obligations under this Agreement. Any attempted assignment in
+ contravention of this Section shall be void.
+
+ 4. Indemnity
+
+ a. You agree to indemnify and hold harmless Licensor and its officers,
+ directors, customers, employees and successors and assigns (each an
+ "Indemnified Party") against any and all claims, demands, causes of
+ action, losses, liabilities, damages, costs and expenses, incurred by
+ the Indemnified Party (including but not limited to costs of defense,
+ investigation and reasonable attorney's fees) arising out of,
+ resulting from or related to (i) any software, products,
+ documentation, content, materials or derivative works created or
+ developed by You using the Software which causes an infringement of
+ any patent, copyright, trademark, trade secret, or other property,
+ publicity or privacy rights of any third parties arising in any
+ jurisdiction anywhere in the world, (ii) the download, distribution,
+ installation, storage, execution, use or transfer of such software,
+ products, documentation, content, materials or derivative works by
+ any person or entity, and/or (iii) any breach of this Agreement by
+ You. If requested by an Indemnified Party, You agree to defend such
+ Indemnified Party in connection with any third party claims, demands,
+ or causes of action resulting from, arising out of or in connection
+ with any of the foregoing.
+
+ 5. Limitation of Liability
+
+ a. TO THE MAXIMUM EXTENT PERMITTED UNDER APPLICABLE LAWS, UNDER NO
+ CIRCUMSTANCES, INCLUDING WITHOUT LIMITATION NEGLIGENCE, SHALL
+ LICENSOR, ITS AFFILIATES AND/OR ITS DIRECTORS, OFFICERS, EMPLOYEES OR
+ AGENTS BE LIABLE FOR ANY INDIRECT, INCIDENTAL, SPECIAL, PUNITIVE OR
+ CONSEQUENTIAL DAMAGES (INCLUDING BUT NOT LIMITED TO DAMAGES FOR LOSS
+ OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS
+ INFORMATION AND THE LIKE) ARISING OUT OF OR IN CONNECTION WITH THE
+ SOFTWARE OR ANY DOWNLOAD, INSTALLATION OR USE OF, OR INABILITY TO
+ USE, THE SOFTWARE, EVEN IF LICENSOR HAS BEEN ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGES. SOME JURISDICTIONS DO NOT ALLOW THE
+ LIMITATION OR EXCLUSION OF LIABILITY FOR INCIDENTAL OR CONSEQUENTIAL
+ DAMAGES SO THE ABOVE LIMITATION OR EXCLUSION MAY NOT APPLY OR MAY BE
+ LIMITED. IN NO EVENT SHALL LICENSOR'S TOTAL AGGREGATE LIABILITY TO
+ YOU FOR ANY AND ALL DAMAGES, LOSSES, CLAIMS AND CAUSES OF ACTIONS
+ (WHETHER IN CONTRACT, TORT, INCLUDING NEGLIGENCE, INDEMNIFICATION OR
+ OTHERWISE) EXCEED ONE HUNDRED U.S. DOLLARS (US$100). THE LIMITATIONS
+ SET FORTH IN THIS PARAGRAPH SHALL BE DEEMED TO APPLY TO THE MAXIMUM
+ EXTENT PERMITTED BY APPLICABLE LAW. THE PARTIES HAVE FULLY CONSIDERED
+ THE FOREGOING ALLOCATION OF RISK AND FIND IT REASONABLE, AND THAT THE
+ FOREGOING LIMITATIONS IN THIS PARAGRAPH ARE AN ESSENTIAL BASIS OF
+ THE BARGAIN BETWEEN THE PARTIES.
+
+ 6. No Warranty
+
+ a. LICENSOR MAKES NO WARRANTIES, EXPRESS OR IMPLIED, WITH RESPECT TO THE
+ SOFTWARE AND DOCUMENTATION PROVIDED UNDER THIS AGREEMENT, INCLUDING
+ BUT NOT LIMITED TO ANY WARRANTY OF MERCHANTABILITY OR FITNESS FOR A
+ PARTICULAR PURPOSE OR AGAINST INFRINGEMENT, OR ANY EXPRESS OR IMPLIED
+ WARRANTY ARISING OUT OF TRADE USAGE OR OUT OF A COURSE OF DEALING OR
+ COURSE OF PERFORMANCE. NOTHING CONTAINED IN THIS AGREEMENT SHALL BE
+ CONSTRUED AS A WARRANTY OR REPRESENTATION BY LICENSOR (I) AS TO THE
+ VALIDITY OR SCOPE OF ANY PATENT, COPYRIGHT OR OTHER INTELLECTUAL
+ PROPERTY RIGHT AND (II) THAT ANY MANUFACTURE OR USE WILL BE FREE FROM
+ INFRINGEMENT OF PATENTS, COPYRIGHTS OR OTHER INTELLECTUAL PROPERTY
+ RIGHTS OF OTHERS, AND IT SHALL BE THE SOLE RESPONSIBILITY OF YOU TO
+ MAKE SUCH DETERMINATION AS IS NECESSARY WITH RESPECT TO THE
+ ACQUISITION OF LICENSES UNDER PATENTS AND OTHER INTELLECTUAL PROPERTY
+ OF THIRD PARTIES. LICENSOR SHALL NOT HAVE ANY OBLIGATION TO PROVIDE
+ ANY TECHNICAL SUPPORT OF THE SOFTWARE UNDER THIS AGREEMENT.
+
+ 7. Term and Termination
+
+ a. This Agreement shall be effective on the date You accept this
+ Agreement and shall remain in effect until terminated as provided
+ herein. You may terminate the Agreement at any time by deleting and
+ destroying all copies of the Software and all related information in
+ Your possession or control. This Agreement terminates immediately and
+ automatically, with or without notice, if You fail to comply with any
+ provision hereof. Additionally, Licensor may at any time terminate
+ this Agreement, without cause, upon notice to You. Upon termination
+ You must delete or destroy all copies of the Software in Your
+ possession, and the license granted to You in this Agreement shall
+ terminate. Sections 3, 4, 5, 6 and 8 shall survive the termination of
+ this Agreement.
+
+ 8. Miscellaneous
+
+ a. Governing Law. This Agreement is governed and interpreted in
+ accordance with the laws of the State of California without giving
+ effect to its conflict of laws provisions. The United Nations
+ Convention on Contracts for the International Sale of Goods is
+ expressly disclaimed and shall not apply. Any claim arising out of or
+ related to this Agreement must be brought exclusively in a federal or
+ state court located in Santa Clara County, California and You consent
+ to the jurisdiction and venue of such courts.
+
+ b. Waiver and Severability. The failure of either party to require
+ performance by the other party of any provision of this Agreement
+ shall not affect the full right to require such performance at any
+ time thereafter; nor shall the waiver by either party of a breach of
+ any provision of this Agreement be taken or held to be a waiver of
+ the provision itself. Severability. If any provision of this
+ Agreement is unenforceable or invalid under any applicable law or is
+ so held by applicable court decision, such unenforceability or
+ invalidity shall not render this Agreement unenforceable or invalid
+ as a whole, and such provision shall be changed and interpreted so as
+ to best accomplish the objectives of such unenforceable or invalid
+ provision within the limits of applicable law or applicable court
+ decisions.
+
+ c. Amendment and Modification. This Agreement and any of its terms and
+ provisions may only be amended, modified, supplemented or waived in a
+ writing signed by both parties hereto.
+
+ d. Compliance with Laws. You shall comply with all applicable laws,
+ rules, and regulations in connection with its activities under this
+ Agreement.
+
+ e. Entire Agreement. This Agreement completely and exclusively states
+ the agreement between You and Licensor regarding this subject matter.
diff --git a/self-extractors/broadcom/staging/BoardConfigCrespo.mk b/self-extractors/broadcom/staging/BoardConfigCrespo.mk
new file mode 100644
index 0000000..01a0ff3
--- /dev/null
+++ b/self-extractors/broadcom/staging/BoardConfigCrespo.mk
@@ -0,0 +1,13 @@
+# Copyright (C) 2010 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.
diff --git a/self-extractors/broadcom/staging/device-crespo.mk b/self-extractors/broadcom/staging/device-crespo.mk
new file mode 100644
index 0000000..d1d1ad1
--- /dev/null
+++ b/self-extractors/broadcom/staging/device-crespo.mk
@@ -0,0 +1,19 @@
+# Copyright (C) 2010 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.
+
+# Broadcom blobs necessary for crespo
+PRODUCT_COPY_FILES := \
+ vendor/broadcom/crespo/proprietary/gpsd:system/vendor/bin/gpsd \
+ vendor/broadcom/crespo/proprietary/bcm4329.hcd:system/vendor/firmware/bcm4329.hcd \
+ vendor/broadcom/crespo/proprietary/gps.s5pc110.so:system/vendor/lib/hw/gps.s5pc110.so
diff --git a/self-extractors/cypress/COPYRIGHT b/self-extractors/cypress/COPYRIGHT
new file mode 100644
index 0000000..b3aa5ec
--- /dev/null
+++ b/self-extractors/cypress/COPYRIGHT
@@ -0,0 +1 @@
+# (C) Cypress Semiconductor Corporation. All Rights Reserved.
diff --git a/self-extractors/cypress/LICENSE b/self-extractors/cypress/LICENSE
new file mode 100644
index 0000000..44a23b9
--- /dev/null
+++ b/self-extractors/cypress/LICENSE
@@ -0,0 +1 @@
+CYPRESS LICENSE SHOULD GO HERE
diff --git a/self-extractors/cypress/staging/BoardConfigCrespo.mk b/self-extractors/cypress/staging/BoardConfigCrespo.mk
new file mode 100644
index 0000000..01a0ff3
--- /dev/null
+++ b/self-extractors/cypress/staging/BoardConfigCrespo.mk
@@ -0,0 +1,13 @@
+# Copyright (C) 2010 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.
diff --git a/self-extractors/cypress/staging/device-crespo.mk b/self-extractors/cypress/staging/device-crespo.mk
new file mode 100644
index 0000000..071ef08
--- /dev/null
+++ b/self-extractors/cypress/staging/device-crespo.mk
@@ -0,0 +1,17 @@
+# Copyright (C) 2010 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.
+
+# cypress blob necessary for crespo
+PRODUCT_COPY_FILES := \
+ vendor/cypress/crespo/proprietary/cypress-touchkey.bin:system/vendor/firmware/cypress-touchkey.bin
diff --git a/self-extractors/generate-packages.sh b/self-extractors/generate-packages.sh
new file mode 100755
index 0000000..2946816
--- /dev/null
+++ b/self-extractors/generate-packages.sh
@@ -0,0 +1,118 @@
+#!/bin/sh
+
+# Copyright (C) 2010 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.
+
+# 83327 = GRH70B
+# 85442 = GRH78
+# 91927 = GRI16B
+# 101070 = GRI34
+# 102588 = GRI40
+# 117340 = GRJ01
+# 118407 = GRJ06D
+# 120505 = GRJ18
+# 121341 = GRJ22
+# 128018 = IRJ54
+# 128447 = IRJ55
+ZIP=soju-ota-128447.zip
+BUILD=irj55
+ROOTDEVICE=crespo
+DEVICE=crespo
+MANUFACTURER=samsung
+
+for COMPANY in akm broadcom cypress imgtec nxp samsung
+do
+ echo Processing files from $COMPANY
+ rm -rf tmp
+ FILEDIR=tmp/vendor/$COMPANY/$DEVICE/proprietary
+ mkdir -p $FILEDIR
+ mkdir -p tmp/vendor/$MANUFACTURER/$ROOTDEVICE
+ case $COMPANY in
+ akm)
+ TO_EXTRACT="\
+ system/vendor/lib/libakm.so \
+ "
+ ;;
+ broadcom)
+ TO_EXTRACT="\
+ system/vendor/bin/gpsd \
+ system/vendor/firmware/bcm4329.hcd \
+ system/vendor/lib/hw/gps.s5pc110.so \
+ "
+ ;;
+ cypress)
+ TO_EXTRACT="\
+ system/vendor/firmware/cypress-touchkey.bin \
+ "
+ ;;
+ imgtec)
+ TO_EXTRACT="\
+ system/vendor/bin/pvrsrvinit \
+ system/vendor/lib/egl/libEGL_POWERVR_SGX540_120.so \
+ system/vendor/lib/egl/libGLESv1_CM_POWERVR_SGX540_120.so \
+ system/vendor/lib/egl/libGLESv2_POWERVR_SGX540_120.so \
+ system/vendor/lib/hw/gralloc.s5pc110.so \
+ system/vendor/lib/libglslcompiler.so \
+ system/vendor/lib/libIMGegl.so \
+ system/vendor/lib/libpvr2d.so \
+ system/vendor/lib/libpvrANDROID_WSEGL.so \
+ system/vendor/lib/libPVRScopeServices.so \
+ system/vendor/lib/libsrv_init.so \
+ system/vendor/lib/libsrv_um.so \
+ system/vendor/lib/libusc.so \
+ "
+ ;;
+ nxp)
+ TO_EXTRACT="\
+ system/lib/libpn544_fw.so \
+ "
+ ;;
+ samsung)
+ TO_EXTRACT="\
+ system/lib/libsecril-client.so \
+ system/vendor/lib/libsec-ril.so \
+ "
+ ;;
+ esac
+ echo \ \ Extracting files from OTA package
+ for ONE_FILE in $TO_EXTRACT
+ do
+ echo \ \ \ \ Extracting $ONE_FILE
+ unzip -j -o $ZIP $ONE_FILE -d $FILEDIR > /dev/null || echo \ \ \ \ Error extracting $ONE_FILE
+ if test $ONE_FILE = system/vendor/bin/gpsd -o $ONE_FILE = system/vendor/bin/pvrsrvinit
+ then
+ chmod a+x $FILEDIR/$(basename $ONE_FILE) || echo \ \ \ \ Error chmoding $ONE_FILE
+ fi
+ done
+ echo \ \ Setting up $COMPANY-specific makefiles
+ cp -R $COMPANY/staging/* tmp/vendor/$COMPANY/$DEVICE || echo \ \ \ \ Error copying makefiles
+ echo \ \ Setting up shared makefiles
+ cp -R root/* tmp/vendor/$MANUFACTURER/$ROOTDEVICE || echo \ \ \ \ Error copying makefiles
+ echo \ \ Generating self-extracting script
+ SCRIPT=extract-$COMPANY-$DEVICE.sh
+ cat PROLOGUE > tmp/$SCRIPT || echo \ \ \ \ Error generating script
+ cat $COMPANY/COPYRIGHT >> tmp/$SCRIPT || echo \ \ \ \ Error generating script
+ cat PART1 >> tmp/$SCRIPT || echo \ \ \ \ Error generating script
+ cat $COMPANY/LICENSE >> tmp/$SCRIPT || echo \ \ \ \ Error generating script
+ cat PART2 >> tmp/$SCRIPT || echo \ \ \ \ Error generating script
+ echo tail -n +$(expr 2 + $(cat PROLOGUE $COMPANY/COPYRIGHT PART1 $COMPANY/LICENSE PART2 PART3 | wc -l)) \$0 \| tar zxv >> tmp/$SCRIPT || echo \ \ \ \ Error generating script
+ cat PART3 >> tmp/$SCRIPT || echo \ \ \ \ Error generating script
+ (cd tmp ; tar zc --owner=root --group=root vendor/ >> $SCRIPT || echo \ \ \ \ Error generating embedded tgz)
+ chmod a+x tmp/$SCRIPT || echo \ \ \ \ Error generating script
+ ARCHIVE=$COMPANY-$DEVICE-$BUILD-$(md5sum < tmp/$SCRIPT | cut -b -8 | tr -d \\n).tgz
+ rm -f $ARCHIVE
+ echo \ \ Generating final archive
+ (cd tmp ; tar --owner=root --group=root -z -c -f ../$ARCHIVE $SCRIPT || echo \ \ \ \ Error archiving script)
+ rm -rf tmp
+done
diff --git a/self-extractors/imgtec/COPYRIGHT b/self-extractors/imgtec/COPYRIGHT
new file mode 100644
index 0000000..373e4f9
--- /dev/null
+++ b/self-extractors/imgtec/COPYRIGHT
@@ -0,0 +1 @@
+# (C) Imagination Technologies Ltd.
diff --git a/self-extractors/imgtec/LICENSE b/self-extractors/imgtec/LICENSE
new file mode 100644
index 0000000..08ac7aa
--- /dev/null
+++ b/self-extractors/imgtec/LICENSE
@@ -0,0 +1,218 @@
+THIS DEVELOPER SOFTWARE LICENSE AGREEMENT (THE "AGREEMENT") IS A LEGALLY
+BINDING AGREEMENT BETWEEN IMAGINATION TECHNOLOGIES LTD. ("LICENSOR") AND
+YOU OR THE LEGAL ENTITY YOU REPRESENT ("You" or its possessive, "Your"). BY
+TYPING "I ACCEPT" WHERE INDICATED YOU ACKNOWLEDGE THAT YOU HAVE READ THIS
+AGREEMENT, UNDERSTAND IT AND AGREE TO BE BOUND BY ITS TERMS AND CONDITIONS. IF
+YOU DO NOT AGREE TO THESE TERMS YOU MUST DISCONTINUE THE INSTALLATION PROCESS
+AND YOU SHALL NOT USE THE SOFTWARE OR RETAIN ANY COPIES OF THE SOFTWARE OR
+DOCUMENTATION. ANY USE OR POSSESSION OF THE SOFTWARE BY YOU IS SUBJECT TO THE
+TERMS AND CONDITIONS SET FORTH IN THIS AGREEMENT. IF THE SOFTWARE IS INSTALLED
+ON A COMPUTER OWNED BY A CORPORATION OR OTHER LEGAL ENTITY, THEN YOU REPRESENT
+AND WARRANT THAT YOU HAVE THE AUTHORITY TO BIND SUCH ENTITY TO THE TERMS AND
+CONDITIONS OF THIS AGREEMENT.
+
+ 1. Special Definitions
+
+ a. The term "Android" means the open source mobile platform, software
+ stack, operating system, middleware, application programming
+ interfaces and mobile applications under the trade-name "Android"
+ distributed at Android.com.
+
+ b. The term "Android Applications" means a software application or
+ open-source contribution developed by You, designed to operate with
+ Android that does not contain or incorporate any of the Software.
+
+ c. The term "Authorized Android Enabled Device" means the device
+ known as the Nexus S only.
+ The term "Software" means the Licensor's proprietary software and
+ libraries in object code form, designed for use on the Authorized
+ Android Enabled Device.
+
+ d. The term "Authorized Android Enabled Device Software" means a
+ packaged build for Authorized Android Enabled Devices, consisting of
+ files suitable for installation on an Authorized Android Enabled
+ Device using a mechanism such as fastboot mode or recovery mode.
+
+ 2. License Grant
+
+ a. Subject to the terms of this Agreement, Licensor hereby grants to
+ You, free of charge, a non-exclusive, non-sublicensable,
+ non-transferable, limited license, during the term of this Agreement,
+ to download, install and use the Software internally in
+ machine-readable (i.e., object code) form and the Documentation for
+ non-commercial use on an Authorized Android Enabled Device and
+ non-commercial redistribution of the Authorized Android Enabled
+ Device Software (the “Limited Purpose”). You may grant your end users
+ the right to use the Software for the Limited Purpose. The license to
+ the Software granted to You hereunder is solely for the Limited
+ Purpose set forth in this section, and the Software shall not be used
+ for any other purpose.
+
+ 3. Restrictions
+
+ a. Retention of Rights. The entire right, title and interest in the
+ Software shall remain with Licensor and, unless specified in writing
+ hereunder, no rights are granted to any of the Software. Except for
+ the right to use the Software for the Limited Purpose, the delivery
+ of the Software to You does not convey to You any intellectual
+ property rights in the Software, including, but not limited to any
+ rights under any patent, trademark, copyright, or trade secret.
+ Neither the delivery of the Software to You nor any terms set forth
+ herein shall be construed to grant to You, either expressly, by
+ implication or by way of estoppel, any license under any patents or
+ other intellectual property rights covering or relating to any other
+ product or invention or any combination of the Software with any
+ other product. Any rights not expressly granted to You herein are
+ reserved by Licensor.
+
+ b. No Commercialization or Distribution of the Software and
+ Documentation. Except as expressly provided in Section 2 of this
+ Agreement, You shall have no right to (i) copy, disclose, distribute,
+ publically perform, publically display, transfer, alter, modify,
+ translate, disassemble, decompile, reverse engineer, or adapt the
+ Software and Documentation, or any portion thereof, or create any
+ derivative works based thereon; (ii) rent, lease, assign, sublicense,
+ resell, disclose or otherwise transfer the Software and Documentation
+ in whole or in part to any third party (iii) use the Software and
+ Documentation except for the Limited Purpose, (iv) remove or alter
+ any of the copyright or proprietary notices contained in any of the
+ Software and Documentation. For the purposes of clarity, nothing in
+ this Agreement prohibits You from making and distributing Android
+ Applications under commercial or non-commercial terms, provided that
+ You shall not contain, incorporate, and/or compile the Software or
+ any of its derivative works, in whole or in part, into Your Android
+ Applications and/or any software/devices created by You or by third
+ parties acting on Your behalf. You and any such third party shall
+ comply with all of the terms and conditions of this Agreement.
+
+ c. No Reverse Engineering. Except for any portions of the Software
+ provided to You in source code format and except for any third party
+ code distributed with the Software that is licensed under contrary
+ terms, You will not reverse engineer, disassemble,
+ decompile, or translate the Software, or otherwise attempt to derive
+ the source code version of the Software, except if and to the extent
+ expressly permitted under any applicable law.
+
+ d. Third Party Software. You agree that Android may contain third party
+ software. You agree that you may not distribute such third party
+ software for any purpose without appropriate licenses from the
+ applicable third party or parties.
+
+ e. No Transfer or Assignment. You shall not assign any of its rights or
+ obligations under this Agreement. Any attempted assignment in
+ contravention of this Section shall be void.
+
+ 4. Indemnity
+
+ a. You agree to indemnify and hold harmless Licensor and its officers,
+ directors, customers, employees and successors and assigns (each an
+ "Indemnified Party") against any and all claims, demands, causes of
+ action, losses, liabilities, damages, costs and expenses, incurred by
+ the Indemnified Party (including but not limited to costs of defense,
+ investigation and reasonable attorney's fees) arising out of,
+ resulting from or related to (i) any software, products,
+ documentation, content, materials or derivative works created or
+ developed by You using the Software which causes an infringement of
+ any patent, copyright, trademark, trade secret, or other property,
+ publicity or privacy rights of any third parties arising in any
+ jurisdiction anywhere in the world, (ii) the download, distribution,
+ installation, storage, execution, use or transfer of such software,
+ products, documentation, content, materials or derivative works by
+ any person or entity, and/or (iii) any breach of this Agreement by
+ You. If requested by an Indemnified Party, You agree to defend such
+ Indemnified Party in connection with any third party claims, demands,
+ or causes of action resulting from, arising out of or in connection
+ with any of the foregoing.
+
+ 5. Limitation of Liability
+
+ a. TO THE MAXIMUM EXTENT PERMITTED UNDER APPLICABLE LAWS, UNDER NO
+ CIRCUMSTANCES, INCLUDING WITHOUT LIMITATION NEGLIGENCE, SHALL
+ LICENSOR, ITS AFFILIATES AND/OR ITS DIRECTORS, OFFICERS, EMPLOYEES OR
+ AGENTS BE LIABLE FOR ANY INDIRECT, INCIDENTAL, SPECIAL, PUNITIVE OR
+ CONSEQUENTIAL DAMAGES (INCLUDING BUT NOT LIMITED TO DAMAGES FOR LOSS
+ OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS
+ INFORMATION AND THE LIKE) ARISING OUT OF OR IN CONNECTION WITH THE
+ SOFTWARE OR ANY DOWNLOAD, INSTALLATION OR USE OF, OR INABILITY TO
+ USE, THE SOFTWARE, EVEN IF LICENSOR HAS BEEN ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGES. SOME JURISDICTIONS DO NOT ALLOW THE
+ LIMITATION OR EXCLUSION OF LIABILITY FOR INCIDENTAL OR CONSEQUENTIAL
+ DAMAGES SO THE ABOVE LIMITATION OR EXCLUSION MAY NOT APPLY OR MAY BE
+ LIMITED. IN NO EVENT SHALL LICENSOR'S TOTAL AGGREGATE LIABILITY TO
+ YOU FOR ANY AND ALL DAMAGES, LOSSES, CLAIMS AND CAUSES OF ACTIONS
+ (WHETHER IN CONTRACT, TORT, INCLUDING NEGLIGENCE, INDEMNIFICATION OR
+ OTHERWISE) EXCEED ONE HUNDRED U.S. DOLLARS (US$100). THE LIMITATIONS
+ SET FORTH IN THIS PARAGRAPH SHALL BE DEEMED TO APPLY TO THE MAXIMUM
+ EXTENT PERMITTED BY APPLICABLE LAW. THE PARTIES HAVE FULLY CONSIDERED
+ THE FOREGOING ALLOCATION OF RISK AND FIND IT REASONABLE, AND THAT THE
+ FOREGOING LIMITATIONS IN THIS PARAGRAPH ARE AN ESSENTIAL BASIS OF
+ THE BARGAIN BETWEEN THE PARTIES.
+
+ 6. No Warranty
+
+ a. LICENSOR MAKES NO WARRANTIES, EXPRESS OR IMPLIED, WITH RESPECT TO THE
+ SOFTWARE AND DOCUMENTATION PROVIDED UNDER THIS AGREEMENT, INCLUDING
+ BUT NOT LIMITED TO ANY WARRANTY OF MERCHANTABILITY OR FITNESS FOR A
+ PARTICULAR PURPOSE OR AGAINST INFRINGEMENT, OR ANY EXPRESS OR IMPLIED
+ WARRANTY ARISING OUT OF TRADE USAGE OR OUT OF A COURSE OF DEALING OR
+ COURSE OF PERFORMANCE. NOTHING CONTAINED IN THIS AGREEMENT SHALL BE
+ CONSTRUED AS A WARRANTY OR REPRESENTATION BY LICENSOR (I) AS TO THE
+ VALIDITY OR SCOPE OF ANY PATENT, COPYRIGHT OR OTHER INTELLECTUAL
+ PROPERTY RIGHT AND (II) THAT ANY MANUFACTURE OR USE WILL BE FREE FROM
+ INFRINGEMENT OF PATENTS, COPYRIGHTS OR OTHER INTELLECTUAL PROPERTY
+ RIGHTS OF OTHERS, AND IT SHALL BE THE SOLE RESPONSIBILITY OF YOU TO
+ MAKE SUCH DETERMINATION AS IS NECESSARY WITH RESPECT TO THE
+ ACQUISITION OF LICENSES UNDER PATENTS AND OTHER INTELLECTUAL PROPERTY
+ OF THIRD PARTIES. LICENSOR SHALL NOT HAVE ANY OBLIGATION TO PROVIDE
+ ANY TECHNICAL SUPPORT OF THE SOFTWARE UNDER THIS AGREEMENT.
+
+ 7. Term and Termination
+
+ a. This Agreement shall be effective on the date You accept this
+ Agreement and shall remain in effect until terminated as provided
+ herein. You may terminate the Agreement at any time by deleting and
+ destroying all copies of the Software and all related information in
+ Your possession or control. This Agreement terminates immediately and
+ automatically, with or without notice, if You fail to comply with any
+ provision hereof. Additionally, Licensor may at any time terminate
+ this Agreement, without cause, upon notice to You. Upon termination
+ You must delete or destroy all copies of the Software in Your
+ possession, and the license granted to You in this Agreement shall
+ terminate. Sections 3, 4, 5, 6 and 8 shall survive the termination of
+ this Agreement.
+
+ 8. Miscellaneous
+
+ a. Governing Law. This Agreement is governed and interpreted in
+ accordance with the laws of the State of California without giving
+ effect to its conflict of laws provisions. The United Nations
+ Convention on Contracts for the International Sale of Goods is
+ expressly disclaimed and shall not apply. Any claim arising out of or
+ related to this Agreement must be brought exclusively in a federal or
+ state court located in Santa Clara County, California and You consent
+ to the jurisdiction and venue of such courts.
+
+ b. Waiver and Severability. The failure of either party to require
+ performance by the other party of any provision of this Agreement
+ shall not affect the full right to require such performance at any
+ time thereafter; nor shall the waiver by either party of a breach of
+ any provision of this Agreement be taken or held to be a waiver of
+ the provision itself. Severability. If any provision of this
+ Agreement is unenforceable or invalid under any applicable law or is
+ so held by applicable court decision, such unenforceability or
+ invalidity shall not render this Agreement unenforceable or invalid
+ as a whole, and such provision shall be changed and interpreted so as
+ to best accomplish the objectives of such unenforceable or invalid
+ provision within the limits of applicable law or applicable court
+ decisions.
+
+ c. Amendment and Modification. This Agreement and any of its terms and
+ provisions may only be amended, modified, supplemented or waived in a
+ writing signed by both parties hereto.
+
+ d. Compliance with Laws. You shall comply with all applicable laws,
+ rules, and regulations in connection with its activities under this
+ Agreement.
+
+ e. Entire Agreement. This Agreement completely and exclusively states
+ the agreement between You and Licensor regarding this subject matter.
diff --git a/self-extractors/imgtec/staging/BoardConfigCrespo.mk b/self-extractors/imgtec/staging/BoardConfigCrespo.mk
new file mode 100644
index 0000000..01a0ff3
--- /dev/null
+++ b/self-extractors/imgtec/staging/BoardConfigCrespo.mk
@@ -0,0 +1,13 @@
+# Copyright (C) 2010 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.
diff --git a/self-extractors/imgtec/staging/device-crespo.mk b/self-extractors/imgtec/staging/device-crespo.mk
new file mode 100644
index 0000000..118a64a
--- /dev/null
+++ b/self-extractors/imgtec/staging/device-crespo.mk
@@ -0,0 +1,29 @@
+# Copyright (C) 2010 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.
+
+# Imgtec blobs necessary for crespo
+PRODUCT_COPY_FILES += \
+ vendor/imgtec/crespo/proprietary/pvrsrvinit:system/vendor/bin/pvrsrvinit \
+ vendor/imgtec/crespo/proprietary/libEGL_POWERVR_SGX540_120.so:system/vendor/lib/egl/libEGL_POWERVR_SGX540_120.so \
+ vendor/imgtec/crespo/proprietary/libGLESv1_CM_POWERVR_SGX540_120.so:system/vendor/lib/egl/libGLESv1_CM_POWERVR_SGX540_120.so \
+ vendor/imgtec/crespo/proprietary/libGLESv2_POWERVR_SGX540_120.so:system/vendor/lib/egl/libGLESv2_POWERVR_SGX540_120.so \
+ vendor/imgtec/crespo/proprietary/gralloc.s5pc110.so:system/vendor/lib/hw/gralloc.s5pc110.so \
+ vendor/imgtec/crespo/proprietary/libglslcompiler.so:system/vendor/lib/libglslcompiler.so \
+ vendor/imgtec/crespo/proprietary/libIMGegl.so:system/vendor/lib/libIMGegl.so \
+ vendor/imgtec/crespo/proprietary/libpvr2d.so:system/vendor/lib/libpvr2d.so \
+ vendor/imgtec/crespo/proprietary/libpvrANDROID_WSEGL.so:system/vendor/lib/libpvrANDROID_WSEGL.so \
+ vendor/imgtec/crespo/proprietary/libPVRScopeServices.so:system/vendor/lib/libPVRScopeServices.so \
+ vendor/imgtec/crespo/proprietary/libsrv_init.so:system/vendor/lib/libsrv_init.so \
+ vendor/imgtec/crespo/proprietary/libsrv_um.so:system/vendor/lib/libsrv_um.so \
+ vendor/imgtec/crespo/proprietary/libusc.so:system/vendor/lib/libusc.so
diff --git a/self-extractors/nxp/COPYRIGHT b/self-extractors/nxp/COPYRIGHT
new file mode 100644
index 0000000..446c4f7
--- /dev/null
+++ b/self-extractors/nxp/COPYRIGHT
@@ -0,0 +1 @@
+# (C) NXP Semiconductors Netherlands B.V.
diff --git a/self-extractors/nxp/LICENSE b/self-extractors/nxp/LICENSE
new file mode 100644
index 0000000..849e839
--- /dev/null
+++ b/self-extractors/nxp/LICENSE
@@ -0,0 +1,218 @@
+THIS DEVELOPER SOFTWARE LICENSE AGREEMENT (THE "AGREEMENT") IS A LEGALLY
+BINDING AGREEMENT BETWEEN NXP Semiconductors Netherlands B.V ("LICENSOR") AND
+YOU OR THE LEGAL ENTITY YOU REPRESENT ("You" or its possessive, "Your"). BY
+TYPING "I ACCEPT" WHERE INDICATED YOU ACKNOWLEDGE THAT YOU HAVE READ THIS
+AGREEMENT, UNDERSTAND IT AND AGREE TO BE BOUND BY ITS TERMS AND CONDITIONS. IF
+YOU DO NOT AGREE TO THESE TERMS YOU MUST DISCONTINUE THE INSTALLATION PROCESS
+AND YOU SHALL NOT USE THE SOFTWARE OR RETAIN ANY COPIES OF THE SOFTWARE OR
+DOCUMENTATION. ANY USE OR POSSESSION OF THE SOFTWARE BY YOU IS SUBJECT TO THE
+TERMS AND CONDITIONS SET FORTH IN THIS AGREEMENT. IF THE SOFTWARE IS INSTALLED
+ON A COMPUTER OWNED BY A CORPORATION OR OTHER LEGAL ENTITY, THEN YOU REPRESENT
+AND WARRANT THAT YOU HAVE THE AUTHORITY TO BIND SUCH ENTITY TO THE TERMS AND
+CONDITIONS OF THIS AGREEMENT.
+
+ 1. Special Definitions
+
+ a. The term "Android" means the open source mobile platform, software
+ stack, operating system, middleware, application programming
+ interfaces and mobile applications under the trade-name "Android"
+ distributed at Android.com.
+
+ b. The term "Android Applications" means a software application or
+ open-source contribution developed by You, designed to operate with
+ Android that does not contain or incorporate any of the Software.
+
+ c. The term "Authorized Android Enabled Device" means the device
+ known as the Nexus S only.
+ The term "Software" means the Licensor's proprietary software and
+ libraries in object code form, designed for use on the Authorized
+ Android Enabled Device.
+
+ d. The term "Authorized Android Enabled Device Software" means a
+ packaged build for Authorized Android Enabled Devices, consisting of
+ files suitable for installation on an Authorized Android Enabled
+ Device using a mechanism such as fastboot mode or recovery mode.
+
+ 2. License Grant
+
+ a. Subject to the terms of this Agreement, Licensor hereby grants to
+ You, free of charge, a non-exclusive, non-sublicensable,
+ non-transferable, limited license, during the term of this Agreement,
+ to download, install and use the Software internally in
+ machine-readable (i.e., object code) form and the Documentation for
+ non-commercial use on an Authorized Android Enabled Device and
+ non-commercial redistribution of the Authorized Android Enabled
+ Device Software (the “Limited Purpose”). You may grant your end users
+ the right to use the Software for the Limited Purpose. The license to
+ the Software granted to You hereunder is solely for the Limited
+ Purpose set forth in this section, and the Software shall not be used
+ for any other purpose.
+
+ 3. Restrictions
+
+ a. Retention of Rights. The entire right, title and interest in the
+ Software shall remain with Licensor and, unless specified in writing
+ hereunder, no rights are granted to any of the Software. Except for
+ the right to use the Software for the Limited Purpose, the delivery
+ of the Software to You does not convey to You any intellectual
+ property rights in the Software, including, but not limited to any
+ rights under any patent, trademark, copyright, or trade secret.
+ Neither the delivery of the Software to You nor any terms set forth
+ herein shall be construed to grant to You, either expressly, by
+ implication or by way of estoppel, any license under any patents or
+ other intellectual property rights covering or relating to any other
+ product or invention or any combination of the Software with any
+ other product. Any rights not expressly granted to You herein are
+ reserved by Licensor.
+
+ b. No Commercialization or Distribution of the Software and
+ Documentation. Except as expressly provided in Section 2 of this
+ Agreement, You shall have no right to (i) copy, disclose, distribute,
+ publically perform, publically display, transfer, alter, modify,
+ translate, disassemble, decompile, reverse engineer, or adapt the
+ Software and Documentation, or any portion thereof, or create any
+ derivative works based thereon; (ii) rent, lease, assign, sublicense,
+ resell, disclose or otherwise transfer the Software and Documentation
+ in whole or in part to any third party (iii) use the Software and
+ Documentation except for the Limited Purpose, (iv) remove or alter
+ any of the copyright or proprietary notices contained in any of the
+ Software and Documentation. For the purposes of clarity, nothing in
+ this Agreement prohibits You from making and distributing Android
+ Applications under commercial or non-commercial terms, provided that
+ You shall not contain, incorporate, and/or compile the Software or
+ any of its derivative works, in whole or in part, into Your Android
+ Applications and/or any software/devices created by You or by third
+ parties acting on Your behalf. You and any such third party shall
+ comply with all of the terms and conditions of this Agreement.
+
+ c. No Reverse Engineering. Except for any portions of the Software
+ provided to You in source code format and except for any third party
+ code distributed with the Software that is licensed under contrary
+ terms, You will not reverse engineer, disassemble,
+ decompile, or translate the Software, or otherwise attempt to derive
+ the source code version of the Software, except if and to the extent
+ expressly permitted under any applicable law.
+
+ d. Third Party Software. You agree that Android may contain third party
+ software. You agree that you may not distribute such third party
+ software for any purpose without appropriate licenses from the
+ applicable third party or parties.
+
+ e. No Transfer or Assignment. You shall not assign any of its rights or
+ obligations under this Agreement. Any attempted assignment in
+ contravention of this Section shall be void.
+
+ 4. Indemnity
+
+ a. You agree to indemnify and hold harmless Licensor and its officers,
+ directors, customers, employees and successors and assigns (each an
+ "Indemnified Party") against any and all claims, demands, causes of
+ action, losses, liabilities, damages, costs and expenses, incurred by
+ the Indemnified Party (including but not limited to costs of defense,
+ investigation and reasonable attorney's fees) arising out of,
+ resulting from or related to (i) any software, products,
+ documentation, content, materials or derivative works created or
+ developed by You using the Software which causes an infringement of
+ any patent, copyright, trademark, trade secret, or other property,
+ publicity or privacy rights of any third parties arising in any
+ jurisdiction anywhere in the world, (ii) the download, distribution,
+ installation, storage, execution, use or transfer of such software,
+ products, documentation, content, materials or derivative works by
+ any person or entity, and/or (iii) any breach of this Agreement by
+ You. If requested by an Indemnified Party, You agree to defend such
+ Indemnified Party in connection with any third party claims, demands,
+ or causes of action resulting from, arising out of or in connection
+ with any of the foregoing.
+
+ 5. Limitation of Liability
+
+ a. TO THE MAXIMUM EXTENT PERMITTED UNDER APPLICABLE LAWS, UNDER NO
+ CIRCUMSTANCES, INCLUDING WITHOUT LIMITATION NEGLIGENCE, SHALL
+ LICENSOR, ITS AFFILIATES AND/OR ITS DIRECTORS, OFFICERS, EMPLOYEES OR
+ AGENTS BE LIABLE FOR ANY INDIRECT, INCIDENTAL, SPECIAL, PUNITIVE OR
+ CONSEQUENTIAL DAMAGES (INCLUDING BUT NOT LIMITED TO DAMAGES FOR LOSS
+ OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS
+ INFORMATION AND THE LIKE) ARISING OUT OF OR IN CONNECTION WITH THE
+ SOFTWARE OR ANY DOWNLOAD, INSTALLATION OR USE OF, OR INABILITY TO
+ USE, THE SOFTWARE, EVEN IF LICENSOR HAS BEEN ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGES. SOME JURISDICTIONS DO NOT ALLOW THE
+ LIMITATION OR EXCLUSION OF LIABILITY FOR INCIDENTAL OR CONSEQUENTIAL
+ DAMAGES SO THE ABOVE LIMITATION OR EXCLUSION MAY NOT APPLY OR MAY BE
+ LIMITED. IN NO EVENT SHALL LICENSOR'S TOTAL AGGREGATE LIABILITY TO
+ YOU FOR ANY AND ALL DAMAGES, LOSSES, CLAIMS AND CAUSES OF ACTIONS
+ (WHETHER IN CONTRACT, TORT, INCLUDING NEGLIGENCE, INDEMNIFICATION OR
+ OTHERWISE) EXCEED ONE HUNDRED U.S. DOLLARS (US$100). THE LIMITATIONS
+ SET FORTH IN THIS PARAGRAPH SHALL BE DEEMED TO APPLY TO THE MAXIMUM
+ EXTENT PERMITTED BY APPLICABLE LAW. THE PARTIES HAVE FULLY CONSIDERED
+ THE FOREGOING ALLOCATION OF RISK AND FIND IT REASONABLE, AND THAT THE
+ FOREGOING LIMITATIONS IN THIS PARAGRAPH ARE AN ESSENTIAL BASIS OF
+ THE BARGAIN BETWEEN THE PARTIES.
+
+ 6. No Warranty
+
+ a. LICENSOR MAKES NO WARRANTIES, EXPRESS OR IMPLIED, WITH RESPECT TO THE
+ SOFTWARE AND DOCUMENTATION PROVIDED UNDER THIS AGREEMENT, INCLUDING
+ BUT NOT LIMITED TO ANY WARRANTY OF MERCHANTABILITY OR FITNESS FOR A
+ PARTICULAR PURPOSE OR AGAINST INFRINGEMENT, OR ANY EXPRESS OR IMPLIED
+ WARRANTY ARISING OUT OF TRADE USAGE OR OUT OF A COURSE OF DEALING OR
+ COURSE OF PERFORMANCE. NOTHING CONTAINED IN THIS AGREEMENT SHALL BE
+ CONSTRUED AS A WARRANTY OR REPRESENTATION BY LICENSOR (I) AS TO THE
+ VALIDITY OR SCOPE OF ANY PATENT, COPYRIGHT OR OTHER INTELLECTUAL
+ PROPERTY RIGHT AND (II) THAT ANY MANUFACTURE OR USE WILL BE FREE FROM
+ INFRINGEMENT OF PATENTS, COPYRIGHTS OR OTHER INTELLECTUAL PROPERTY
+ RIGHTS OF OTHERS, AND IT SHALL BE THE SOLE RESPONSIBILITY OF YOU TO
+ MAKE SUCH DETERMINATION AS IS NECESSARY WITH RESPECT TO THE
+ ACQUISITION OF LICENSES UNDER PATENTS AND OTHER INTELLECTUAL PROPERTY
+ OF THIRD PARTIES. LICENSOR SHALL NOT HAVE ANY OBLIGATION TO PROVIDE
+ ANY TECHNICAL SUPPORT OF THE SOFTWARE UNDER THIS AGREEMENT.
+
+ 7. Term and Termination
+
+ a. This Agreement shall be effective on the date You accept this
+ Agreement and shall remain in effect until terminated as provided
+ herein. You may terminate the Agreement at any time by deleting and
+ destroying all copies of the Software and all related information in
+ Your possession or control. This Agreement terminates immediately and
+ automatically, with or without notice, if You fail to comply with any
+ provision hereof. Additionally, Licensor may at any time terminate
+ this Agreement, without cause, upon notice to You. Upon termination
+ You must delete or destroy all copies of the Software in Your
+ possession, and the license granted to You in this Agreement shall
+ terminate. Sections 3, 4, 5, 6 and 8 shall survive the termination of
+ this Agreement.
+
+ 8. Miscellaneous
+
+ a. Governing Law. This Agreement is governed and interpreted in
+ accordance with the laws of the State of California without giving
+ effect to its conflict of laws provisions. The United Nations
+ Convention on Contracts for the International Sale of Goods is
+ expressly disclaimed and shall not apply. Any claim arising out of or
+ related to this Agreement must be brought exclusively in a federal or
+ state court located in Santa Clara County, California and You consent
+ to the jurisdiction and venue of such courts.
+
+ b. Waiver and Severability. The failure of either party to require
+ performance by the other party of any provision of this Agreement
+ shall not affect the full right to require such performance at any
+ time thereafter; nor shall the waiver by either party of a breach of
+ any provision of this Agreement be taken or held to be a waiver of
+ the provision itself. Severability. If any provision of this
+ Agreement is unenforceable or invalid under any applicable law or is
+ so held by applicable court decision, such unenforceability or
+ invalidity shall not render this Agreement unenforceable or invalid
+ as a whole, and such provision shall be changed and interpreted so as
+ to best accomplish the objectives of such unenforceable or invalid
+ provision within the limits of applicable law or applicable court
+ decisions.
+
+ c. Amendment and Modification. This Agreement and any of its terms and
+ provisions may only be amended, modified, supplemented or waived in a
+ writing signed by both parties hereto.
+
+ d. Compliance with Laws. You shall comply with all applicable laws,
+ rules, and regulations in connection with its activities under this
+ Agreement.
+
+ e. Entire Agreement. This Agreement completely and exclusively states
+ the agreement between You and Licensor regarding this subject matter.
diff --git a/self-extractors/nxp/staging/BoardConfigCrespo.mk b/self-extractors/nxp/staging/BoardConfigCrespo.mk
new file mode 100644
index 0000000..01a0ff3
--- /dev/null
+++ b/self-extractors/nxp/staging/BoardConfigCrespo.mk
@@ -0,0 +1,13 @@
+# Copyright (C) 2010 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.
diff --git a/self-extractors/nxp/staging/device-crespo.mk b/self-extractors/nxp/staging/device-crespo.mk
new file mode 100644
index 0000000..6e082d0
--- /dev/null
+++ b/self-extractors/nxp/staging/device-crespo.mk
@@ -0,0 +1,17 @@
+# Copyright (C) 2010 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.
+
+# NXP blob necessary for crespo
+PRODUCT_COPY_FILES := \
+ vendor/nxp/crespo/proprietary/libpn544_fw.so:system/lib/libpn544_fw.so
diff --git a/self-extractors/root/BoardConfigVendor.mk b/self-extractors/root/BoardConfigVendor.mk
new file mode 100644
index 0000000..9698fd5
--- /dev/null
+++ b/self-extractors/root/BoardConfigVendor.mk
@@ -0,0 +1,20 @@
+# Copyright (C) 2010 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.
+
+-include vendor/akm/crespo/BoardConfigCrespo.mk
+-include vendor/broadcom/crespo/BoardConfigCrespo.mk
+-include vendor/cypress/crespo/BoardConfigCrespo.mk
+-include vendor/imgtec/crespo/BoardConfigCrespo.mk
+-include vendor/nxp/crespo/BoardConfigCrespo.mk
+-include vendor/samsung/crespo/BoardConfigCrespo.mk
diff --git a/self-extractors/root/device-vendor.mk b/self-extractors/root/device-vendor.mk
new file mode 100644
index 0000000..6e9affc
--- /dev/null
+++ b/self-extractors/root/device-vendor.mk
@@ -0,0 +1,20 @@
+# Copyright (C) 2010 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.
+
+$(call inherit-product-if-exists, vendor/akm/crespo/device-crespo.mk)
+$(call inherit-product-if-exists, vendor/broadcom/crespo/device-crespo.mk)
+$(call inherit-product-if-exists, vendor/cypress/crespo/device-crespo.mk)
+$(call inherit-product-if-exists, vendor/imgtec/crespo/device-crespo.mk)
+$(call inherit-product-if-exists, vendor/nxp/crespo/device-crespo.mk)
+$(call inherit-product-if-exists, vendor/samsung/crespo/device-crespo.mk)
diff --git a/self-extractors/samsung/COPYRIGHT b/self-extractors/samsung/COPYRIGHT
new file mode 100644
index 0000000..e5dc6cc
--- /dev/null
+++ b/self-extractors/samsung/COPYRIGHT
@@ -0,0 +1 @@
+# (C) Samsung Electronics, Inc.
diff --git a/self-extractors/samsung/LICENSE b/self-extractors/samsung/LICENSE
new file mode 100644
index 0000000..2e20c75
--- /dev/null
+++ b/self-extractors/samsung/LICENSE
@@ -0,0 +1,225 @@
+THIS DEVELOPER SOFTWARE LICENSE AGREEMENT (THE "AGREEMENT") IS A LEGALLY
+BINDING AGREEMENT BETWEEN Samsung Electronics ("LICENSOR") AND
+YOU OR THE LEGAL ENTITY YOU REPRESENT ("You" or its possessive, "Your"). BY
+TYPING "I ACCEPT" WHERE INDICATED YOU ACKNOWLEDGE THAT YOU HAVE READ THIS
+AGREEMENT, UNDERSTAND IT AND AGREE TO BE BOUND BY ITS TERMS AND CONDITIONS. IF
+YOU DO NOT AGREE TO THESE TERMS YOU MUST DISCONTINUE THE INSTALLATION PROCESS
+AND YOU SHALL NOT USE THE SOFTWARE OR RETAIN ANY COPIES OF THE SOFTWARE OR
+DOCUMENTATION. ANY USE OR POSSESSION OF THE SOFTWARE BY YOU IS SUBJECT TO THE
+TERMS AND CONDITIONS SET FORTH IN THIS AGREEMENT. IF THE SOFTWARE IS INSTALLED
+ON A COMPUTER OWNED BY A CORPORATION OR OTHER LEGAL ENTITY, THEN YOU REPRESENT
+AND WARRANT THAT YOU HAVE THE AUTHORITY TO BIND SUCH ENTITY TO THE TERMS AND
+CONDITIONS OF THIS AGREEMENT.
+
+ 1. Special Definitions
+
+ a. The term "Android" means the open source mobile platform, software
+ stack, operating system, middleware, application programming
+ interfaces and mobile applications under the trade-name "Android"
+ distributed at Android.com.
+
+ b. The term "Android Applications" means a software application or
+ open-source contribution developed by You, designed to operate with
+ Android that does not contain or incorporate any of the Software.
+
+ c. The term "Authorized Android Enabled Device" means the device
+ known as the Nexus S only.
+ The term "Software" means the Licensor's proprietary software and
+ libraries in object code form, designed for use on the Authorized
+ Android Enabled Device.
+
+ d. The term "Authorized Android Enabled Device Software" means a
+ packaged build for Authorized Android Enabled Devices, consisting of
+ files suitable for installation on an Authorized Android Enabled
+ Device using a mechanism such as fastboot mode or recovery mode.
+
+ 2. License Grant
+
+ a. Subject to the terms of this Agreement, Licensor hereby grants to
+ You, free of charge, a non-exclusive, non-sublicensable,
+ non-transferable, limited license, during the term of this Agreement,
+ to download, install and use the Software internally in
+ machine-readable (i.e., object code) form and the Documentation for
+ non-commercial use on an Authorized Android Enabled Device and
+ non-commercial redistribution of the Authorized Android Enabled
+ Device Software (the “Limited Purpose”). You may grant your end users
+ the right to use the Software for the Limited Purpose. The license to
+ the Software granted to You hereunder is solely for the Limited
+ Purpose set forth in this section, and the Software shall not be used
+ for any other purpose.
+
+ 3. Restrictions
+
+ a. Retention of Rights. The entire right, title and interest in the
+ Software shall remain with Licensor and, unless specified in writing
+ hereunder, no rights are granted to any of the Software. Except for
+ the right to use the Software for the Limited Purpose, the delivery
+ of the Software to You does not convey to You any intellectual
+ property rights in the Software, including, but not limited to any
+ rights under any patent, trademark, copyright, or trade secret.
+ Neither the delivery of the Software to You nor any terms set forth
+ herein shall be construed to grant to You, either expressly, by
+ implication or by way of estoppel, any license under any patents or
+ other intellectual property rights covering or relating to any other
+ product or invention or any combination of the Software with any
+ other product. Any rights not expressly granted to You herein are
+ reserved by Licensor.
+
+ b. No Commercialization or Distribution of the Software and
+ Documentation. Except as expressly provided in Section 2 of this
+ Agreement, You shall have no right to (i) copy, disclose, distribute,
+ publically perform, publically display, transfer, alter, modify,
+ translate, disassemble, decompile, reverse engineer, or adapt the
+ Software and Documentation, or any portion thereof, or create any
+ derivative works based thereon; (ii) rent, lease, assign, sublicense,
+ resell, disclose or otherwise transfer the Software and Documentation
+ in whole or in part to any third party (iii) use the Software and
+ Documentation except for the Limited Purpose, (iv) remove or alter
+ any of the copyright or proprietary notices contained in any of the
+ Software and Documentation. For the purposes of clarity, nothing in
+ this Agreement prohibits You from making and distributing Android
+ Applications under commercial or non-commercial terms, provided that
+ You shall not contain, incorporate, and/or compile the Software or
+ any of its derivative works, in whole or in part, into Your Android
+ Applications and/or any software/devices created by You or by third
+ parties acting on Your behalf. You and any such third party shall
+ comply with all of the terms and conditions of this Agreement.
+
+ c. No Reverse Engineering. You will not reverse engineer, disassemble,
+ decompile, or translate the Software, or otherwise attempt to derive
+ the source code version of the Software, except if and to the extent
+ expressly permitted under any applicable law.
+
+ d. Third Party Software. You agree that Android may contain third party
+ software. You agree that you may not distribute such third party
+ software for any purpose without appropriate licenses from the
+ applicable third party or parties.
+
+ e. No Transfer or Assignment. You shall not assign any of its rights or
+ obligations under this Agreement. Any attempted assignment in
+ contravention of this Section shall be void.
+
+ 4. Onwership of Intellectual Property
+
+ a. You acknowledge that all intellectual property rights in or relating
+ to the Software and all parts of the Software are and shall remain
+ the exclusive property of Licensor and its licensors. You agree that
+ you will not remove or alter any copyright notices or similar
+ proprietary devices, including without limitation any electronic
+ watermarks or other identifiers, that may be incorporated in the
+ Software.
+
+ 5. Indemnity
+
+ a. You agree to indemnify and hold harmless Licensor and its officers,
+ directors, customers, employees and successors and assigns (each an
+ "Indemnified Party") against any and all claims, demands, causes of
+ action, losses, liabilities, damages, costs and expenses, incurred by
+ the Indemnified Party (including but not limited to costs of defense,
+ investigation and reasonable attorney's fees) arising out of,
+ resulting from or related to (i) any software, products,
+ documentation, content, materials or derivative works created or
+ developed by You using the Software which causes an infringement of
+ any patent, copyright, trademark, trade secret, or other property,
+ publicity or privacy rights of any third parties arising in any
+ jurisdiction anywhere in the world, (ii) the download, distribution,
+ installation, storage, execution, use or transfer of such software,
+ products, documentation, content, materials or derivative works by
+ any person or entity, and/or (iii) any breach of this Agreement by
+ You. If requested by an Indemnified Party, You agree to defend such
+ Indemnified Party in connection with any third party claims, demands,
+ or causes of action resulting from, arising out of or in connection
+ with any of the foregoing.
+
+ 6. Limitation of Liability
+
+ a. TO THE MAXIMUM EXTENT PERMITTED UNDER APPLICABLE LAWS, UNDER NO
+ CIRCUMSTANCES, INCLUDING WITHOUT LIMITATION NEGLIGENCE, SHALL
+ LICENSOR, ITS AFFILIATES AND/OR ITS DIRECTORS, OFFICERS, EMPLOYEES OR
+ AGENTS BE LIABLE FOR ANY INDIRECT, INCIDENTAL, SPECIAL, PUNITIVE OR
+ CONSEQUENTIAL DAMAGES (INCLUDING BUT NOT LIMITED TO DAMAGES FOR LOSS
+ OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS
+ INFORMATION AND THE LIKE) ARISING OUT OF OR IN CONNECTION WITH THE
+ SOFTWARE OR ANY DOWNLOAD, INSTALLATION OR USE OF, OR INABILITY TO
+ USE, THE SOFTWARE, EVEN IF LICENSOR HAS BEEN ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGES. SOME JURISDICTIONS DO NOT ALLOW THE
+ LIMITATION OR EXCLUSION OF LIABILITY FOR INCIDENTAL OR CONSEQUENTIAL
+ DAMAGES SO THE ABOVE LIMITATION OR EXCLUSION MAY NOT APPLY OR MAY BE
+ LIMITED. IN NO EVENT SHALL LICENSOR'S TOTAL AGGREGATE LIABILITY TO
+ YOU FOR ANY AND ALL DAMAGES, LOSSES, CLAIMS AND CAUSES OF ACTIONS
+ (WHETHER IN CONTRACT, TORT, INCLUDING NEGLIGENCE, INDEMNIFICATION OR
+ OTHERWISE) EXCEED ONE HUNDRED U.S. DOLLARS (US$100). THE LIMITATIONS
+ SET FORTH IN THIS PARAGRAPH SHALL BE DEEMED TO APPLY TO THE MAXIMUM
+ EXTENT PERMITTED BY APPLICABLE LAW. THE PARTIES HAVE FULLY CONSIDERED
+ THE FOREGOING ALLOCATION OF RISK AND FIND IT REASONABLE, AND THAT THE
+ FOREGOING LIMITATIONS IN THIS PARAGRAPH ARE AN ESSENTIAL BASIS OF
+ THE BARGAIN BETWEEN THE PARTIES.
+
+ 7. No Warranty
+
+ a. LICENSOR MAKES NO WARRANTIES, EXPRESS OR IMPLIED, WITH RESPECT TO THE
+ SOFTWARE AND DOCUMENTATION PROVIDED UNDER THIS AGREEMENT, INCLUDING
+ BUT NOT LIMITED TO ANY WARRANTY OF MERCHANTABILITY OR FITNESS FOR A
+ PARTICULAR PURPOSE OR AGAINST INFRINGEMENT, OR ANY EXPRESS OR IMPLIED
+ WARRANTY ARISING OUT OF TRADE USAGE OR OUT OF A COURSE OF DEALING OR
+ COURSE OF PERFORMANCE. NOTHING CONTAINED IN THIS AGREEMENT SHALL BE
+ CONSTRUED AS A WARRANTY OR REPRESENTATION BY LICENSOR (I) AS TO THE
+ VALIDITY OR SCOPE OF ANY PATENT, COPYRIGHT OR OTHER INTELLECTUAL
+ PROPERTY RIGHT AND (II) THAT ANY MANUFACTURE OR USE WILL BE FREE FROM
+ INFRINGEMENT OF PATENTS, COPYRIGHTS OR OTHER INTELLECTUAL PROPERTY
+ RIGHTS OF OTHERS, AND IT SHALL BE THE SOLE RESPONSIBILITY OF YOU TO
+ MAKE SUCH DETERMINATION AS IS NECESSARY WITH RESPECT TO THE
+ ACQUISITION OF LICENSES UNDER PATENTS AND OTHER INTELLECTUAL PROPERTY
+ OF THIRD PARTIES. LICENSOR SHALL NOT HAVE ANY OBLIGATION TO PROVIDE
+ ANY TECHNICAL SUPPORT OF THE SOFTWARE UNDER THIS AGREEMENT.
+
+ 8. Term and Termination
+
+ a. This Agreement shall be effective on the date You accept this
+ Agreement and shall remain in effect until terminated as provided
+ herein. You may terminate the Agreement at any time by deleting and
+ destroying all copies of the Software and all related information in
+ Your possession or control. This Agreement terminates immediately and
+ automatically, with or without notice, if You fail to comply with any
+ provision hereof. Additionally, Licensor may at any time terminate
+ this Agreement, without cause, upon notice to You. Upon termination
+ You must delete or destroy all copies of the Software in Your
+ possession, and the license granted to You in this Agreement shall
+ terminate. Sections 3, 4, 5, 6 and 8 shall survive the termination of
+ this Agreement.
+
+ 9. Miscellaneous
+
+ a. Governing Law. This Agreement is governed and interpreted in
+ accordance with the laws of the State of California without giving
+ effect to its conflict of laws provisions. The United Nations
+ Convention on Contracts for the International Sale of Goods is
+ expressly disclaimed and shall not apply. Any claim arising out of or
+ related to this Agreement must be brought exclusively in a federal or
+ state court located in Santa Clara County, California and You consent
+ to the jurisdiction and venue of such courts.
+
+ b. Waiver and Severability. The failure of either party to require
+ performance by the other party of any provision of this Agreement
+ shall not affect the full right to require such performance at any
+ time thereafter; nor shall the waiver by either party of a breach of
+ any provision of this Agreement be taken or held to be a waiver of
+ the provision itself. Severability. If any provision of this
+ Agreement is unenforceable or invalid under any applicable law or is
+ so held by applicable court decision, such unenforceability or
+ invalidity shall not render this Agreement unenforceable or invalid
+ as a whole, and such provision shall be changed and interpreted so as
+ to best accomplish the objectives of such unenforceable or invalid
+ provision within the limits of applicable law or applicable court
+ decisions.
+
+ c. Amendment and Modification. This Agreement and any of its terms and
+ provisions may only be amended, modified, supplemented or waived in a
+ writing signed by both parties hereto.
+
+ d. Compliance with Laws. You shall comply with all applicable laws,
+ rules, and regulations in connection with its activities under this
+ Agreement.
+
+ e. Entire Agreement. This Agreement completely and exclusively states
+ the agreement between You and Licensor regarding this subject matter.
diff --git a/self-extractors/samsung/staging/BoardConfigCrespo.mk b/self-extractors/samsung/staging/BoardConfigCrespo.mk
new file mode 100644
index 0000000..01a0ff3
--- /dev/null
+++ b/self-extractors/samsung/staging/BoardConfigCrespo.mk
@@ -0,0 +1,13 @@
+# Copyright (C) 2010 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.
diff --git a/self-extractors/samsung/staging/device-crespo.mk b/self-extractors/samsung/staging/device-crespo.mk
new file mode 100644
index 0000000..aa0fb45
--- /dev/null
+++ b/self-extractors/samsung/staging/device-crespo.mk
@@ -0,0 +1,22 @@
+# Copyright (C) 2010 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.
+
+# Prebuilt libraries that are needed to build open-source libraries
+PRODUCT_COPY_FILES := \
+ vendor/samsung/crespo/proprietary/libsecril-client.so:obj/lib/libsecril-client.so
+
+# Samsung blobs necessary for crespo
+PRODUCT_COPY_FILES += \
+ vendor/samsung/crespo/proprietary/libsecril-client.so:system/lib/libsecril-client.so \
+ vendor/samsung/crespo/proprietary/libsec-ril.so:system/vendor/lib/libsec-ril.so
diff --git a/setup-makefiles.sh b/setup-makefiles.sh
index 230bc67..cf06f2d 100755
--- a/setup-makefiles.sh
+++ b/setup-makefiles.sh
@@ -36,28 +36,6 @@ mkdir -p ../../../vendor/$MANUFACTURER/$DEVICE
# This file is generated by device/__MANUFACTURER__/__DEVICE__/setup-makefiles.sh
-# Live wallpaper packages
-PRODUCT_PACKAGES := \\
- LiveWallpapers \\
- LiveWallpapersPicker \\
- MagicSmokeWallpapers \\
- VisualizationWallpapers \\
- librs_jni
-
-# Publish that we support the live wallpaper feature.
-PRODUCT_COPY_FILES := \\
- packages/wallpapers/LivePicker/android.software.live_wallpaper.xml:/system/etc/permissions/android.software.live_wallpaper.xml
-
-# NFC packages
-PRODUCT_PACKAGES += \\
- libnfc \\
- libnfc_jni \\
- Nfc \\
- Tag
-
-# Pick up overlay for features that depend on non-open-source files
-DEVICE_PACKAGE_OVERLAYS := vendor/__MANUFACTURER__/__DEVICE__/overlay
-
\$(call inherit-product, vendor/__MANUFACTURER__/__DEVICE__/device-vendor-blobs.mk)
EOF
@@ -77,41 +55,4 @@ EOF
# limitations under the License.
# This file is generated by device/__MANUFACTURER__/__DEVICE__/setup-makefiles.sh
-
-BOARD_GPS_LIBRARIES := libgps
-
-USE_CAMERA_STUB := false
-
-BOARD_USES_GENERIC_AUDIO := false
-
-BOARD_USES_LIBSECRIL_STUB := false
-
-BOARD_NO_PAGE_FLIPPING := false
-BOARD_NO_32BPP := false
-EOF
-
-mkdir -p ../../../vendor/$MANUFACTURER/$DEVICE/overlay/packages/apps/Launcher2/res/layout
-(cat << EOF) | sed s/__DEVICE__/$DEVICE/g | sed s/__MANUFACTURER__/$MANUFACTURER/g > ../../../vendor/$MANUFACTURER/$DEVICE/overlay/packages/apps/Launcher2/res/layout/all_apps.xml
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2010 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 generated by device/__MANUFACTURER__/__DEVICE__/setup-makefiles.sh -->
-
-<!-- switch to all_apps_3d on devices that support RenderScript -->
-<merge xmlns:android="http://schemas.android.com/apk/res/android">
- <include layout="@layout/all_apps_3d" />
-</merge>
EOF
diff --git a/setup_fs.c b/setup_fs.c
deleted file mode 100644
index 0acf026..0000000
--- a/setup_fs.c
+++ /dev/null
@@ -1,75 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <sys/reboot.h>
-#include <sys/wait.h>
-
-const char *mkfs = "/system/bin/make_ext4fs";
-
-int setup_fs(const char *blockdev)
-{
- char buf[256], path[128];
- pid_t child;
- int status, n;
-
- /* we might be looking at an indirect reference */
- n = readlink(blockdev, path, sizeof(path) - 1);
- if (n > 0) {
- path[n] = 0;
- if (!memcmp(path, "/dev/block/", 11))
- blockdev = path + 11;
- }
-
- if (strchr(blockdev,'/')) {
- fprintf(stderr,"not a block device name: %s\n", blockdev);
- return 0;
- }
-
- sprintf(buf,"/sys/fs/ext4/%s", blockdev);
- if (access(buf, F_OK) == 0) {
- fprintf(stderr,"device %s already has a filesystem\n", blockdev);
- return 0;
- }
- sprintf(buf,"/dev/block/%s", blockdev);
-
- fprintf(stderr,"+++\n");
-
- child = fork();
- if (child < 0) {
- fprintf(stderr,"error: fork failed\n");
- return 0;
- }
- if (child == 0) {
- execl(mkfs, mkfs, buf, NULL);
- exit(-1);
- }
-
- while (waitpid(-1, &status, 0) != child) ;
-
- fprintf(stderr,"---\n");
- return 1;
-}
-
-
-int main(int argc, char **argv)
-{
- int need_reboot = 0;
-
- while (argc > 1) {
- if (strlen(argv[1]) < 128)
- need_reboot |= setup_fs(argv[1]);
- argv++;
- argc--;
- }
-
- if (need_reboot) {
- sync();
- sync();
- sync();
- fprintf(stderr,"REBOOT!\n");
- reboot(RB_AUTOBOOT);
- exit(-1);
- }
- return 0;
-}
diff --git a/unzip-files.sh b/unzip-files.sh
index 9b41940..b55cb11 100755
--- a/unzip-files.sh
+++ b/unzip-files.sh
@@ -20,18 +20,14 @@ DEVICE=crespo
MANUFACTURER=samsung
mkdir -p ../../../vendor/$MANUFACTURER/$DEVICE/proprietary
-unzip -j -o ../../../${DEVICE}_update.zip system/etc/gps.conf -d ../../../vendor/$MANUFACTURER/$DEVICE/proprietary
unzip -j -o ../../../${DEVICE}_update.zip system/lib/libpn544_fw.so -d ../../../vendor/$MANUFACTURER/$DEVICE/proprietary
unzip -j -o ../../../${DEVICE}_update.zip system/lib/libsecril-client.so -d ../../../vendor/$MANUFACTURER/$DEVICE/proprietary
unzip -j -o ../../../${DEVICE}_update.zip system/vendor/bin/gpsd -d ../../../vendor/$MANUFACTURER/$DEVICE/proprietary
chmod 755 ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/gpsd
unzip -j -o ../../../${DEVICE}_update.zip system/vendor/bin/pvrsrvinit -d ../../../vendor/$MANUFACTURER/$DEVICE/proprietary
chmod 755 ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/pvrsrvinit
-unzip -j -o ../../../${DEVICE}_update.zip system/vendor/etc/gps.xml -d ../../../vendor/$MANUFACTURER/$DEVICE/proprietary
unzip -j -o ../../../${DEVICE}_update.zip system/vendor/firmware/bcm4329.hcd -d ../../../vendor/$MANUFACTURER/$DEVICE/proprietary
unzip -j -o ../../../${DEVICE}_update.zip system/vendor/firmware/cypress-touchkey.bin -d ../../../vendor/$MANUFACTURER/$DEVICE/proprietary
-unzip -j -o ../../../${DEVICE}_update.zip system/vendor/firmware/nvram_net.txt -d ../../../vendor/$MANUFACTURER/$DEVICE/proprietary
-unzip -j -o ../../../${DEVICE}_update.zip system/vendor/firmware/samsung_mfc_fw.bin -d ../../../vendor/$MANUFACTURER/$DEVICE/proprietary
unzip -j -o ../../../${DEVICE}_update.zip system/vendor/lib/egl/libEGL_POWERVR_SGX540_120.so -d ../../../vendor/$MANUFACTURER/$DEVICE/proprietary
unzip -j -o ../../../${DEVICE}_update.zip system/vendor/lib/egl/libGLESv1_CM_POWERVR_SGX540_120.so -d ../../../vendor/$MANUFACTURER/$DEVICE/proprietary
unzip -j -o ../../../${DEVICE}_update.zip system/vendor/lib/egl/libGLESv2_POWERVR_SGX540_120.so -d ../../../vendor/$MANUFACTURER/$DEVICE/proprietary
@@ -71,16 +67,12 @@ PRODUCT_COPY_FILES := \\
# All the blobs necessary for crespo
PRODUCT_COPY_FILES += \\
- vendor/__MANUFACTURER__/__DEVICE__/proprietary/gps.conf:system/etc/gps.conf \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/libpn544_fw.so:system/lib/libpn544_fw.so \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/libsecril-client.so:system/lib/libsecril-client.so \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/gpsd:system/vendor/bin/gpsd \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/pvrsrvinit:system/vendor/bin/pvrsrvinit \\
- vendor/__MANUFACTURER__/__DEVICE__/proprietary/gps.xml:system/vendor/etc/gps.xml \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/bcm4329.hcd:system/vendor/firmware/bcm4329.hcd \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/cypress-touchkey.bin:system/vendor/firmware/cypress-touchkey.bin \\
- vendor/__MANUFACTURER__/__DEVICE__/proprietary/nvram_net.txt:system/vendor/firmware/nvram_net.txt \\
- vendor/__MANUFACTURER__/__DEVICE__/proprietary/samsung_mfc_fw.bin:system/vendor/firmware/samsung_mfc_fw.bin \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/libEGL_POWERVR_SGX540_120.so:system/vendor/lib/egl/libEGL_POWERVR_SGX540_120.so \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/libGLESv1_CM_POWERVR_SGX540_120.so:system/vendor/lib/egl/libGLESv1_CM_POWERVR_SGX540_120.so \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/libGLESv2_POWERVR_SGX540_120.so:system/vendor/lib/egl/libGLESv2_POWERVR_SGX540_120.so \\
diff --git a/vold.fstab b/vold.fstab
index f841d3e..974dd6a 100644
--- a/vold.fstab
+++ b/vold.fstab
@@ -9,7 +9,8 @@
## label - Label for the volume
## mount_point - Where the volume will be mounted
## part - Partition # (1 based), or 'auto' for first usable partition.
-## <sysfs_path> - List of sysfs paths to source devices
+## <sysfs_path> - List of sysfs paths to source devices, must start with '/' character
+## flags - (optional) Comma separated list of flags, must not contain '/' character
######################
-dev_mount sdcard /mnt/sdcard 3 /devices/platform/s3c-sdhci.0/mmc_host/mmc0/mmc0:0001/block/mmcblk0
+dev_mount sdcard /mnt/sdcard 3 /devices/platform/s3c-sdhci.0/mmc_host/mmc0/mmc0:0001/block/mmcblk0 nonremovable,encryptable