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/copy-files.sh b/copy-files.sh new file mode 100644 index 0000000..37596f6 --- /dev/null +++ b/copy-files.sh @@ -0,0 +1,47 @@ +#!/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. + +DEVICE=leo +MANUFACTURER=htc +STAGESYS=~/cm-$DEVICE/system + +if [ "$1" = "pull" ]; then + if [ -s "$STAGESYS" ]; then + rm -R ~/cm-$DEVICE + fi + mkdir ~/cm-$DEVICE + mkdir $STAGESYS + mkdir $STAGESYS/bin + mkdir $STAGESYS/lib + mkdir $STAGESYS/etc + adb pull /system/bin $STAGESYS/bin + adb pull /system/lib $STAGESYS/lib + adb pull /system/etc $STAGESYS/etc +fi + +OUTDIR=../../../vendor/$MANUFACTURER/$DEVICE +BASE=$OUTDIR/proprietary +rm -rf $BASE/* + +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 + cp $STAGESYS/$FILE $BASE/$FILE +done + +./setup-makefiles.sh 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/leo.mk b/leo.mk index 165d92d..323421f 100755 --- a/leo.mk +++ b/leo.mk @@ -24,6 +24,7 @@ PRODUCT_COPY_FILES += \ device/htc/leo/prebuilt/init.htcleo.rc:root/init.htcleo.rc \ + device/htc/leo/prebuilt/ueventd.htcleo.rc:root/ueventd.htcleo.rc \ # we have enough storage space to hold precise GC data PRODUCT_TAGS += dalvik.gc.type-precise @@ -87,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 \ @@ -96,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 new file mode 100644 index 0000000..c08ec21 --- /dev/null +++ b/overlay/packages/apps/Camera/res/values/config.xml @@ -0,0 +1,25 @@ + + + + + + + + diff --git a/postrecoveryboot.sh b/postrecoveryboot.sh index 6342351..d65a5ff 100755 --- a/postrecoveryboot.sh +++ b/postrecoveryboot.sh @@ -5,3 +5,12 @@ sleep 2 if [[ "`grep clk= /proc/cmdline`" == "" ]]; then sed -i 's/\/boot\t\tmtd/\/boot\t\tyaffs2/g' /etc/recovery.fstab fi + +# Commented out as it may or may not require this +#mount /dev/block/mmcblk0p2 /sd-ext | grep sd-ext | awk '{print $5}' +#FS=`mount | grep sd-ext | awk '{print $5}'` +#umount /sd-ext +#sed -i 's/\/sd-ext\ \ \ \ \ auto/\/sd-ext\t\t'$FS'/g' /etc/recovery.fstab +#cat >> /etc/fstab << EOF +#/dev/block/mmcblk0p2 /sd-ext $FS rw +#EOF diff --git a/prebuilt/init.htcleo.rc b/prebuilt/init.htcleo.rc index 4091774..9c7386f 100644 --- a/prebuilt/init.htcleo.rc +++ b/prebuilt/init.htcleo.rc @@ -1,4 +1,6 @@ on init + export TERMINFO /system/etc/terminfo + symlink /dev/msm_camera/control0 /dev/msm_camera/control1 symlink /dev/msm_camera/frame0 /dev/msm_camera/frame1 symlink /dev/msm_camera/config0 /dev/msm_camera/config1 @@ -8,6 +10,7 @@ on init on fs mount yaffs2 mtd@system /system remount mount rootfs rootfs / rw remount + mkdir /sd-ext 0771 system system # DRMv1 rights storage symlink /data/local /data/drm @@ -76,21 +79,26 @@ on boot setprop ro.ril.def.agps.mode 2 # performance tweaks for flash - write /sys/block/mtdblock0/bdi/read_ahead_kb 4 - write /sys/block/mtdblock1/bdi/read_ahead_kb 4 - write /sys/block/mtdblock2/bdi/read_ahead_kb 4 - write /sys/block/mtdblock4/bdi/read_ahead_kb 4 - write /sys/block/mtdblock5/bdi/read_ahead_kb 4 + write /sys/block/mtdblock3/bdi/read_ahead_kb 2048 + write /sys/block/mtdblock4/bdi/read_ahead_kb 2048 + write /sys/block/mtdblock5/bdi/read_ahead_kb 2048 + # increase read throughput from sd card + write /sys/block/mmcblk0/bdi/read_ahead_kb 204 # for wireless modem chown system system /sys/module/serial/parameters/modem_enabled chown system system /dev/ttyHSUSB0 chown system system /dev/smd9 + chown media media /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor # Power Management - chown media media /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 245000 write /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq 998400 + write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor ondemand + write /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate 40000 + chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor + chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq + chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq # Wakelock debug write /sys/module/wakelock/parameters/debug_mask 7 @@ -101,7 +109,7 @@ on boot setprop ro.ril.fd.scroff.timeout 3 # GPRS class - setprop ro.ril.gprsclass 10 + #setprop ro.ril.gprsclass 10 chown root radio /proc/cmdline chown system system /dev/ttyHS0 @@ -166,11 +174,14 @@ on boot chown system camera /sys/class/leds/flashlight/brightness chmod 0666 /sys/class/leds/flashlight/brightness chmod 0666 /sys/class/leds/flashlight/max_brightness + chown system camera /sys/devices/platform/flashlight.0/leds/flashlight/brightness + chmod 0660 /sys/devices/platform/flashlight.0/leds/flashlight/brightness + #720p cam support symlink /dev/msm_camera/control0 /dev/msm_camera/control1 - symlink /dev/msm_camera/frame0 /dev/msm_camera/frame1 - symlink /dev/msm_camera/config0 /dev/msm_camera/config1 + symlink /dev/msm_camera/frame0 /dev/msm_camera/frame1 + symlink /dev/msm_camera/config0 /dev/msm_camera/config1 chmod 666 /sys/class/i2c-adapter/i2c-0/0-0018/enable chmod 666 /sys/class/i2c-adapter/i2c-0/0-0019/enable @@ -208,7 +219,7 @@ on boot write /proc/sys/vm/min_free_kbytes 8192 fi -service hciattach /system/bin/brcm_patchram_plus --enable_hci \ +service hciattach /system/bin/brcm_patchram_plus --enable_hci --enable_lpm \ --baudrate 3000000 --patchram /etc/firmware/bcm4329.hcd /dev/ttyHS0 user bluetooth group bluetooth net_bt_admin 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 diff --git a/prebuilt/ueventd.leo.rc b/prebuilt/ueventd.leo.rc new file mode 100644 index 0000000..4df21fc --- /dev/null +++ b/prebuilt/ueventd.leo.rc @@ -0,0 +1 @@ +ueventd.htcleo.rc \ No newline at end of file diff --git a/proprietary-files.txt b/proprietary-files.txt new file mode 100644 index 0000000..33cb701 --- /dev/null +++ b/proprietary-files.txt @@ -0,0 +1,30 @@ +bin/akmd +bin/parse_radio_log +bin/vold +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/libaudio.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/hw/gps.htcleo.so +lib/hw/gps.leo.so +lib/hw/sensors.bravo.so diff --git a/setup-makefiles.sh b/setup-makefiles.sh index ddffb6e..c971cca 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/lib/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 - + diff --git a/unzip-files.sh b/unzip-files.sh index 86a684c..09804b9 100755 --- a/unzip-files.sh +++ b/unzip-files.sh @@ -15,71 +15,18 @@ # limitations under the License. DEVICE=leo +MANUFACTURER=htc -mkdir -p ../../../vendor/htc/$DEVICE/proprietary -unzip -j -o ../../../${DEVICE}_update.zip system/bin/akmd system/bin/mm-venc-omx-test system/bin/parse_radio_log system/etc/01_qcomm_omx.cfg system/etc/AudioBTID.csv system/etc/firmware/bcm4329.hcd system/etc/firmware/default.acdb system/etc/firmware/default_nel.acdb system/etc/firmware/default_france.acdb system/etc/firmware/fw_bcm4329_apsta.bin system/etc/firmware/fw_bcm4329.bin system/etc/firmware/yamato_pfp.fw system/etc/firmware/yamato_pm4.fw system/lib/egl/libEGL_adreno200.so system/lib/egl/libGLESv1_CM_adreno200.so system/lib/egl/libGLESv2_adreno200.so system/lib/egl/libq3dtools_adreno200.so system/lib/libcamera.so system/lib/libgps.so system/lib/libgsl.so system/lib/libhtc_acoustic.so system/lib/libhtc_ril.so system/lib/liblvmxipc.so system/lib/liboemcamera.so system/lib/libOmxVdec.so system/lib/libomx_wmadec_sharedlibrary.so system/lib/libomx_wmvdec_sharedlibrary.so system/lib/libpvasfcommon.so system/lib/libpvasflocalpbreg.so system/lib/libpvasflocalpb.so system/etc/pvasflocal.cfg -d ../../../vendor/htc/$DEVICE/proprietary -chmod 755 ../../../vendor/htc/$DEVICE/proprietary/akmd -chmod 755 ../../../vendor/htc/$DEVICE/proprietary/mm-venc-omx-test -chmod 755 ../../../vendor/htc/$DEVICE/proprietary/parse_radio_log +OUTDIR=../../../vendor/$MANUFACTURER/$DEVICE +BASE=$OUTDIR/proprietary +rm -rf $BASE/* -(cat << EOF) | sed s/__DEVICE__/$DEVICE/g > ../../../vendor/htc/$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/htc/__DEVICE__/extract-files.sh - -# Prebuilt libraries that are needed to build open-source libraries -PRODUCT_COPY_FILES := \\ - vendor/htc/__DEVICE__/proprietary/libcamera.so:obj/lib/libcamera.so - -# All the blobs necessary for leo -PRODUCT_COPY_FILES += \\ - vendor/htc/__DEVICE__/proprietary/akmd:/system/bin/akmd \\ - vendor/htc/__DEVICE__/proprietary/mm-venc-omx-test:/system/bin/mm-venc-omx-test \\ - vendor/htc/__DEVICE__/proprietary/parse_radio_log:/system/bin/parse_radio_log \\ - vendor/htc/__DEVICE__/proprietary/01_qcomm_omx.cfg:/system/etc/01_qcomm_omx.cfg \\ - vendor/htc/__DEVICE__/proprietary/AudioBTID.csv:/system/etc/AudioBTID.csv \\ - vendor/htc/__DEVICE__/proprietary/bcm4329.hcd:/system/etc/firmware/bcm4329.hcd \\ - vendor/htc/__DEVICE__/proprietary/default.acdb:/system/etc/firmware/default.acdb \\ - vendor/htc/__DEVICE__/proprietary/default_france.acdb:/system/etc/firmware/default_france.acdb \\ - vendor/htc/__DEVICE__/proprietary/default_nel.acdb:/system/etc/firmware/default_nel.acdb \\ - vendor/htc/__DEVICE__/proprietary/fw_bcm4329_apsta.bin:/system/etc/firmware/fw_bcm4329_apsta.bin \\ - vendor/htc/__DEVICE__/proprietary/fw_bcm4329.bin:/system/etc/firmware/fw_bcm4329.bin \\ - vendor/htc/__DEVICE__/proprietary/yamato_pfp.fw:/system/etc/firmware/yamato_pfp.fw \\ - vendor/htc/__DEVICE__/proprietary/yamato_pm4.fw:/system/etc/firmware/yamato_pm4.fw \\ - vendor/htc/__DEVICE__/proprietary/libEGL_adreno200.so:/system/lib/egl/libEGL_adreno200.so \\ - vendor/htc/__DEVICE__/proprietary/libGLESv1_CM_adreno200.so:/system/lib/egl/libGLESv1_CM_adreno200.so \\ - vendor/htc/__DEVICE__/proprietary/libGLESv2_adreno200.so:/system/lib/egl/libGLESv2_adreno200.so \\ - vendor/htc/__DEVICE__/proprietary/libq3dtools_adreno200.so:/system/lib/egl/libq3dtools_adreno200.so \\ - vendor/htc/__DEVICE__/proprietary/libcamera.so:/system/lib/libcamera.so \\ - vendor/htc/__DEVICE__/proprietary/libgsl.so:/system/lib/libgsl.so \\ - vendor/htc/__DEVICE__/proprietary/libhtc_acoustic.so:/system/lib/libhtc_acoustic.so \\ - vendor/htc/__DEVICE__/proprietary/libhtc_ril.so:/system/lib/libhtc_ril.so \\ - vendor/htc/__DEVICE__/proprietary/liblvmxipc.so:/system/lib/liblvmxipc.so \\ - vendor/htc/__DEVICE__/proprietary/liboemcamera.so:/system/lib/liboemcamera.so \\ - vendor/htc/__DEVICE__/proprietary/libOmxVdec.so:/system/lib/libOmxVdec.so - -ifdef WITH_WINDOWS_MEDIA -PRODUCT_COPY_FILES += \\ - vendor/htc/__DEVICE__/proprietary/libomx_wmadec_sharedlibrary.so:system/lib/libomx_wmadec_sharedlibrary.so \\ - vendor/htc/__DEVICE__/proprietary/libomx_wmvdec_sharedlibrary.so:system/lib/libomx_wmvdec_sharedlibrary.so \\ - vendor/htc/__DEVICE__/proprietary/libpvasfcommon.so:system/lib/libpvasfcommon.so \\ - vendor/htc/__DEVICE__/proprietary/libpvasflocalpbreg.so:system/lib/libpvasflocalpbreg.so \\ - vendor/htc/__DEVICE__/proprietary/libpvasflocalpb.so:system/lib/libpvasflocalpb.so \\ - vendor/htc/__DEVICE__/proprietary/pvasflocal.cfg:system/etc/pvasflocal.cfg -endif - -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 + unzip -j -o ../../../${DEVICE}_update.zip system/$FILE -d $BASE/$DIR +done ./setup-makefiles.sh