From 98364a4494437592ef8134e64827e606e2058ea9 Mon Sep 17 00:00:00 2001 From: Arif Ali Date: Tue, 25 Oct 2011 13:50:02 +0100 Subject: [PATCH 1/2] leo: update to latest * use device_htc_7x30-recovery for recovery * fixed postrecoveryboot * amended media_profiles.xml Change-Id: I37bec28702aaa55155bfdb8a1a95d63b4bf45eb6 --- BoardConfig.mk | 3 +- leo.mk | 3 +- .../apps/Camera/res/values/config.xml | 2 +- postrecoveryboot.sh | 1 - prebuilt/media_profiles.xml | 78 ++++++------------- 5 files changed, 26 insertions(+), 61 deletions(-) diff --git a/BoardConfig.mk b/BoardConfig.mk index c072da6..3fb3526 100755 --- a/BoardConfig.mk +++ b/BoardConfig.mk @@ -102,5 +102,4 @@ BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE := leo BOARD_VENDOR_QCOM_GPS_LOC_API_AMSS_VERSION := 3200 TARGET_PREBUILT_RECOVERY_KERNEL := device/htc/leo/prebuilt/recovery_kernel - -BOARD_USES_RECOVERY_CHARGEMODE := true +-include device/htc/7x30-recovery/BoardConfigCommon.mk diff --git a/leo.mk b/leo.mk index 255b676..323421f 100755 --- a/leo.mk +++ b/leo.mk @@ -88,7 +88,7 @@ PRODUCT_COPY_FILES += \ PRODUCT_COPY_FILES += \ vendor/cyanogen/prebuilt/common/etc/apns-conf.xml:system/etc/apns-conf.xml - +# kernel modules PRODUCT_COPY_FILES += \ device/htc/leo/prebuilt/modules/bcm4329.ko:system/lib/modules/bcm4329.ko \ device/htc/leo/prebuilt/modules/cifs.ko:system/lib/modules/cifs.ko \ @@ -97,6 +97,7 @@ PRODUCT_COPY_FILES += \ device/htc/leo/prebuilt/modules/tun.ko:system/lib/modules/tun.ko \ device/htc/leo/prebuilt/modules/fuse.ko:system/lib/modules/fuse.ko +# kernel PRODUCT_COPY_FILES += \ device/htc/leo/prebuilt/kernel:boot/zImage \ diff --git a/overlay/packages/apps/Camera/res/values/config.xml b/overlay/packages/apps/Camera/res/values/config.xml index ae964ee..c08ec21 100644 --- a/overlay/packages/apps/Camera/res/values/config.xml +++ b/overlay/packages/apps/Camera/res/values/config.xml @@ -21,5 +21,5 @@ for different hardware and product builds. --> - touch-focus + diff --git a/postrecoveryboot.sh b/postrecoveryboot.sh index 51f2f42..d65a5ff 100644 --- a/postrecoveryboot.sh +++ b/postrecoveryboot.sh @@ -14,4 +14,3 @@ fi #cat >> /etc/fstab << EOF #/dev/block/mmcblk0p2 /sd-ext $FS rw #EOF - diff --git a/prebuilt/media_profiles.xml b/prebuilt/media_profiles.xml index f4bdf0c..2267bec 100644 --- a/prebuilt/media_profiles.xml +++ b/prebuilt/media_profiles.xml @@ -22,7 +22,7 @@ AudioDecoderCap)> - + @@ -77,10 +77,10 @@ --> - - + - - - - - - - - - - - - - @@ -150,17 +116,17 @@ bitRate="12200" sampleRate="8000" channels="1" /> + + - - - + @@ -171,25 +137,25 @@ --> - + \ No newline at end of file From fced698315724de82e1f75dc049c51f81536a507 Mon Sep 17 00:00:00 2001 From: Arif Ali Date: Tue, 25 Oct 2011 21:11:15 +0100 Subject: [PATCH 2/2] leo: Use a smarter method for extracting proprietary files Change-Id: I94748f25bbeed32c321c1029908c981504c21de1 --- extract-files.sh | 89 +++++-------------------------------------- proprietary-files.txt | 26 +++++++++++++ setup-makefiles.sh | 55 +++++++++++++++++++++----- 3 files changed, 81 insertions(+), 89 deletions(-) create mode 100755 proprietary-files.txt diff --git a/extract-files.sh b/extract-files.sh index aa6f6e2..5e4d0cf 100755 --- a/extract-files.sh +++ b/extract-files.sh @@ -19,86 +19,15 @@ DEVICE=leo MANUFACTURER=htc -mkdir -p ../../../vendor/$MANUFACTURER/$DEVICE/proprietary -adb pull /system/bin/akmd ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/akmd -chmod 755 ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/akmd -adb pull /system/bin/parse_radio_log ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/parse_radio_log -chmod 755 ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/parse_radio_log -adb pull /system/etc/AudioBTID.csv ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/AudioBTID.csv -adb pull /system/etc/AdieHWCodecSetting.csv ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/AdieHWCodecSetting.csv -adb pull /system/etc/firmware/BCM4329B1_002.002.023.0360.0362.hcd ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/BCM4329B1_002.002.023.0360.0362.hcd -adb pull /system/etc/firmware/BCM4329B1_002.002.023.0436.0439.hcd ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/BCM4329B1_002.002.023.0436.0439.hcd -adb pull /system/etc/firmware/BCM4329B1_002.002.023.0436.0439.hcd ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/BCM4329B1_002.002.023.0436.0439.hcd -adb pull /system/etc/firmware/BCM4329B1_002.002.023.0511.0538.hcd ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/BCM4329B1_002.002.023.0511.0538.hcd -adb pull /system/etc/firmware/bcm4329.hcd ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/bcm4329.hcd -adb pull /system/etc/firmware/htcleo.acdb ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/htcleo.acdb -adb pull /system/etc/firmware/default.acdb ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/default.acdb -adb pull /system/etc/firmware/yamato_pfp.fw ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/yamato_pfp.fw -adb pull /system/etc/firmware/yamato_pm4.fw ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/yamato_pm4.fw -adb pull /system/lib/egl/libEGL_adreno200.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/libEGL_adreno200.so -adb pull /system/lib/egl/libGLESv1_CM_adreno200.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/libGLESv1_CM_adreno200.so -adb pull /system/lib/egl/libGLESv2_adreno200.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/libGLESv2_adreno200.so -adb pull /system/lib/egl/libq3dtools_adreno200.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/libq3dtools_adreno200.so -adb pull /system/lib/libcamera.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/libcamera.so -adb pull /system/lib/libgsl.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/libgsl.so -adb pull /system/lib/libhtc_acoustic.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/libhtc_acoustic.so -adb pull /system/lib/libhtc_ril.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/libhtc_ril.so -adb pull /system/lib/liboemcamera.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/liboemcamera.so -adb pull /system/lib/libOmxVdec.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/libOmxVdec.so -adb pull /system/lib/libOmxVidEnc.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/libOmxVidEnc.so -adb pull /system/lib/libOmxCore.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/libOmxCore.so -adb pull /system/lib/libmm-omxcore.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/libmm-omxcore.so +BASE=../../../vendor/$MANUFACTURER/$DEVICE/proprietary +rm -rf $BASE/* -(cat << EOF) | sed s/__DEVICE__/$DEVICE/g | sed s/__MANUFACTURER__/$MANUFACTURER/g > ../../../vendor/$MANUFACTURER/$DEVICE/device-vendor-blobs.mk -# 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__/extract-files.sh - DO NOT EDIT - -# Prebuilt libraries that are needed to build open-source libraries -PRODUCT_COPY_FILES := \\ - vendor/__MANUFACTURER__/__DEVICE__/proprietary/libcamera.so:obj/lib/libcamera.so - -# All the blobs necessary for leo -PRODUCT_COPY_FILES += \\ - vendor/__MANUFACTURER__/__DEVICE__/proprietary/akmd:system/bin/akmd \\ - vendor/__MANUFACTURER__/__DEVICE__/proprietary/parse_radio_log:system/bin/parse_radio_log \\ - vendor/__MANUFACTURER__/__DEVICE__/proprietary/AudioBTID.csv:system/etc/AudioBTID.csv \\ - vendor/__MANUFACTURER__/__DEVICE__/proprietary/AdieHWCodecSetting.csv:system/etc/AdieHWCodecSetting.csv \\ - vendor/__MANUFACTURER__/__DEVICE__/proprietary/bcm4329.hcd:system/etc/firmware/bcm4329.hcd \\ - vendor/__MANUFACTURER__/__DEVICE__/proprietary/BCM4329B1_002.002.023.0360.0362.hcd:system/etc/firmware/BCM4329B1_002.002.023.0360.0362.hcd \\ - vendor/__MANUFACTURER__/__DEVICE__/proprietary/BCM4329B1_002.002.023.0436.0439.hcd:system/etc/firmware/BCM4329B1_002.002.023.0436.0439.hcd \\ - vendor/__MANUFACTURER__/__DEVICE__/proprietary/BCM4329B1_002.002.023.0511.0538.hcd:system/etc/firmware/BCM4329B1_002.002.023.0511.0538.hcd \\ - vendor/__MANUFACTURER__/__DEVICE__/proprietary/htcleo.acdb:system/etc/firmware/htcleo.acdb \\ - vendor/__MANUFACTURER__/__DEVICE__/proprietary/bcm4329.hcd:system/etc/firmware/bcm4329.hcd \\ - vendor/__MANUFACTURER__/__DEVICE__/proprietary/htcleo.acdb:system/etc/firmware/htcleo.acdb \\ - vendor/__MANUFACTURER__/__DEVICE__/proprietary/default.acdb:system/etc/firmware/default.acdb \\ - vendor/__MANUFACTURER__/__DEVICE__/proprietary/yamato_pfp.fw:system/etc/firmware/yamato_pfp.fw \\ - vendor/__MANUFACTURER__/__DEVICE__/proprietary/yamato_pm4.fw:system/etc/firmware/yamato_pm4.fw \\ - vendor/__MANUFACTURER__/__DEVICE__/proprietary/libEGL_adreno200.so:system/lib/egl/libEGL_adreno200.so \\ - vendor/__MANUFACTURER__/__DEVICE__/proprietary/libGLESv1_CM_adreno200.so:system/lib/egl/libGLESv1_CM_adreno200.so \\ - vendor/__MANUFACTURER__/__DEVICE__/proprietary/libGLESv2_adreno200.so:system/lib/egl/libGLESv2_adreno200.so \\ - vendor/__MANUFACTURER__/__DEVICE__/proprietary/libq3dtools_adreno200.so:system/lib/egl/libq3dtools_adreno200.so \\ - vendor/__MANUFACTURER__/__DEVICE__/proprietary/libcamera.so:system/lib/libcamera.so \\ - vendor/__MANUFACTURER__/__DEVICE__/proprietary/libgsl.so:system/lib/libgsl.so \\ - vendor/__MANUFACTURER__/__DEVICE__/proprietary/libhtc_acoustic.so:system/lib/libhtc_acoustic.so \\ - vendor/__MANUFACTURER__/__DEVICE__/proprietary/libhtc_ril.so:system/lib/libhtc_ril.so \\ - vendor/__MANUFACTURER__/__DEVICE__/proprietary/liboemcamera.so:system/lib/liboemcamera.so \\ - vendor/__MANUFACTURER__/__DEVICE__/proprietary/libOmxVdec.so:system/lib/libOmxVdec.so \\ - vendor/__MANUFACTURER__/__DEVICE__/proprietary/libOmxVidEnc.so:system/lib/libOmxVidEnc.so \\ - vendor/__MANUFACTURER__/__DEVICE__/proprietary/libOmxCore.so:system/lib/libOmxCore.so \\ - vendor/__MANUFACTURER__/__DEVICE__/proprietary/sensors.bravo.so:system/lib/hw/sensors.bravo.so \\ -EOF +for FILE in `cat proprietary-files.txt | grep -v ^# | grep -v ^$`; do + DIR=`dirname $FILE` + if [ ! -d $BASE/$DIR ]; then + mkdir -p $BASE/$DIR + fi + adb pull /system/$FILE $BASE/$FILE +done ./setup-makefiles.sh diff --git a/proprietary-files.txt b/proprietary-files.txt new file mode 100755 index 0000000..b290d34 --- /dev/null +++ b/proprietary-files.txt @@ -0,0 +1,26 @@ +bin/akmd +bin/parse_radio_log +etc/AudioBTID.csv +etc/AdieHWCodecSetting.csv +etc/firmware/BCM4329B1_002.002.023.0360.0362.hcd +etc/firmware/BCM4329B1_002.002.023.0436.0439.hcd +etc/firmware/BCM4329B1_002.002.023.0436.0439.hcd +etc/firmware/BCM4329B1_002.002.023.0511.0538.hcd +etc/firmware/bcm4329.hcd +etc/firmware/htcleo.acdb +etc/firmware/default.acdb +etc/firmware/yamato_pfp.fw +etc/firmware/yamato_pm4.fw +lib/egl/libEGL_adreno200.so +lib/egl/libGLESv1_CM_adreno200.so +lib/egl/libGLESv2_adreno200.so +lib/egl/libq3dtools_adreno200.so +lib/libcamera.so +lib/libgsl.so +lib/libhtc_acoustic.so +lib/libhtc_ril.so +lib/liboemcamera.so +lib/libOmxVdec.so +lib/libOmxVidEnc.so +lib/libOmxCore.so +lib/libmm-omxcore.so diff --git a/setup-makefiles.sh b/setup-makefiles.sh index ddffb6e..197a22d 100755 --- a/setup-makefiles.sh +++ b/setup-makefiles.sh @@ -18,8 +18,10 @@ DEVICE=leo MANUFACTURER=htc mkdir -p ../../../vendor/$MANUFACTURER/$DEVICE +OUTDIR=vendor/$MANUFACTURER/$DEVICE +MAKEFILE=../../../$OUTDIR/$DEVICE-vendor-blobs.mk -(cat << EOF) | sed s/__DEVICE__/$DEVICE/g | sed s/__MANUFACTURER__/$MANUFACTURER/g > ../../../vendor/$MANUFACTURER/$DEVICE/$DEVICE-vendor.mk +(cat << EOF) > $MAKEFILE # Copyright (C) 2010 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -34,7 +36,42 @@ mkdir -p ../../../vendor/$MANUFACTURER/$DEVICE # 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 +# This file is generated by device/$MANUFACTURER/$DEVICE/setup-makefiles.sh - DO NOT EDIT + +# Prebuilt libraries that are needed to build open-source libraries +PRODUCT_COPY_FILES := \\ + $OUTDIR/proprietary/libcamera.so:obj/lib/libcamera.so + +# All the blobs necessary for leo +PRODUCT_COPY_FILES += \\ +EOF + +LINEEND=" \\" +COUNT=`cat proprietary-files.txt | grep -v ^# | grep -v ^$ | wc -l | awk {'print $1'}` +for FILE in `cat proprietary-files.txt | grep -v ^# | grep -v ^$`; do + COUNT=`expr $COUNT - 1` + if [ $COUNT = "0" ]; then + LINEEND="" + fi + echo " $OUTDIR/proprietary/$FILE:system/$FILE$LINEEND" >> $MAKEFILE +done + +(cat << EOF) > ../../../$OUTDIR/$DEVICE-vendor.mk +# 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 # Live wallpaper packages PRODUCT_PACKAGES := \\ @@ -49,12 +86,12 @@ PRODUCT_COPY_FILES := \\ packages/wallpapers/LivePicker/android.software.live_wallpaper.xml:/system/etc/permissions/android.software.live_wallpaper.xml # Pick up overlay for features that depend on non-open-source files -DEVICE_PACKAGE_OVERLAYS := vendor/__MANUFACTURER__/__DEVICE__/overlay +DEVICE_PACKAGE_OVERLAYS := $OUTDIR/overlay -\$(call inherit-product, vendor/__MANUFACTURER__/__DEVICE__/device-vendor-blobs.mk) +\$(call inherit-product, $OUTDIR/$DEVICE-vendor-blobs.mk) EOF -(cat << EOF) | sed s/__DEVICE__/$DEVICE/g | sed s/__MANUFACTURER__/$MANUFACTURER/g > ../../../vendor/$MANUFACTURER/$DEVICE/BoardConfigVendor.mk +(cat << EOF) > ../../../$OUTDIR/BoardConfigVendor.mk # Copyright (C) 2010 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -69,13 +106,13 @@ EOF # 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 +# This file is generated by device/$MANUFACTURER/$DEVICE/setup-makefiles.sh USE_CAMERA_STUB := 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 +mkdir -p ../../../$OUTDIR/overlay/packages/apps/Launcher2/res/layout +(cat << EOF) > ../../../$OUTDIR/overlay/packages/apps/Launcher2/res/layout/all_apps.xml - +