summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Hillenbrand <daniel.hillenbrand@codeworkx.de>2012-06-20 19:34:45 +0200
committerDaniel Hillenbrand <daniel.hillenbrand@codeworkx.de>2012-06-20 19:34:45 +0200
commitdb8be97682cd9ade94c67a6b8a65424b231ab6ba (patch)
tree4af82e252b13488c8307a40415c87c7254c8e225
parente67203b7aaf027a0e48def3697b710528819f9c1 (diff)
downloaddevice_samsung_p5110-db8be97682cd9ade94c67a6b8a65424b231ab6ba.zip
device_samsung_p5110-db8be97682cd9ade94c67a6b8a65424b231ab6ba.tar.gz
device_samsung_p5110-db8be97682cd9ade94c67a6b8a65424b231ab6ba.tar.bz2
extract script
-rwxr-xr-xextract-files.sh82
-rw-r--r--proprietary-common-files.txt71
-rw-r--r--proprietary-p5110-files.txt2
-rwxr-xr-xsetup-makefiles.sh99
4 files changed, 188 insertions, 66 deletions
diff --git a/extract-files.sh b/extract-files.sh
index e9a96e2..943c374 100755
--- a/extract-files.sh
+++ b/extract-files.sh
@@ -16,64 +16,28 @@
# This file is generated by device/common/generate-blob-scripts.sh - DO NOT EDIT
-DEVICE=p51xx
-MANUFACTURER=samsung
-
-mkdir -p ../../../vendor/$MANUFACTURER/$DEVICE/proprietary
-
-adb pull /system/bin/bcm4330B1.hcd ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/system/bin/bcm4330B1.hcd
-
-(cat << EOF) | sed s/__DEVICE__/$DEVICE/g | sed s/__MANUFACTURER__/$MANUFACTURER/g > ../../../vendor/$MANUFACTURER/$DEVICE/$DEVICE-vendor-blobs.mk
-# Copyright (C) 2012 The CyanogenMod 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
-
-LOCAL_PATH := vendor/__MANUFACTURER__/__DEVICE__
-
-# Prebuilt libraries that are needed to build open-source libraries
-PRODUCT_COPY_FILES := \\
- \$(LOCAL_PATH)/proprietary/system/lib/libril.so:obj/lib/libril.so \\
- \$(LOCAL_PATH)/proprietary/system/lib/libsecril-client.so:obj/lib/libsecril-client.so
-
-PRODUCT_COPY_FILES += \\
- \$(LOCAL_PATH)/proprietary/system/bin/bcm4330B1.hcd:system/bin/bcm4330B1.hcd \\
- \$(LOCAL_PATH)/proprietary/system/bin/bintvoutservice:system/bin/bintvoutservice \\
-
-EOF
-
-(cat << EOF) | sed s/__DEVICE__/$DEVICE/g | sed s/__MANUFACTURER__/$MANUFACTURER/g > ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/Android.mk
-# Copyright (C) 2012 The CyanogenMod 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
-
-ifeq (\$(TARGET_DEVICE),p5100)
-LOCAL_PATH:=\$(call my-dir)
-endif
-
-EOF
+VENDOR=samsung
+COMMON=p51xx
+DEVICE=p5110
+COMMONBASE=../../../vendor/$VENDOR/$COMMON/common
+DEVICEBASE=../../../vendor/$VENDOR/$COMMON/$DEVICE
+
+echo "Pulling common files..."
+for FILE in `cat proprietary-common-files.txt | grep -v ^# | grep -v ^$`; do
+ DIR=`dirname $FILE`
+ if [ ! -d $COMMONBASE/$DIR ]; then
+ mkdir -p $COMMONBASE/$DIR
+ fi
+ adb pull /$FILE $COMMONBASE/$FILE
+done
+
+echo "Pulling device specific files..."
+for FILE in `cat proprietary-$DEVICE-files.txt | grep -v ^# | grep -v ^$`; do
+ DIR=`dirname $FILE`
+ if [ ! -d $DEVICEBASE/$DIR ]; then
+ mkdir -p $DEVICEBASE/$DIR
+ fi
+ adb pull /$FILE $DEVICEBASE/$FILE
+done
./setup-makefiles.sh
diff --git a/proprietary-common-files.txt b/proprietary-common-files.txt
new file mode 100644
index 0000000..1c092d4
--- /dev/null
+++ b/proprietary-common-files.txt
@@ -0,0 +1,71 @@
+system/bin/geomagneticd
+system/bin/gpsd
+system/bin/orientationd
+system/etc/audio/LVVEFS_Rx_Configuration.txt
+system/etc/audio/LVVEFS_Tx_Configuration.txt
+system/etc/audio/Rx_ControlParams_BLUETOOTH_HEADSET.txt
+system/etc/audio/Rx_ControlParams_EARPIECE_WIDEBAND.txt
+system/etc/audio/Rx_ControlParams_SPEAKER_WIDEBAND.txt
+system/etc/audio/Rx_ControlParams_WIRED_HEADPHONE_WIDEBAND.txt
+system/etc/audio/Rx_ControlParams_WIRED_HEADSET_WIDEBAND.txt
+system/etc/audio/Tx_ControlParams_BLUETOOTH_HEADSET.txt
+system/etc/audio/Tx_ControlParams_EARPIECE_WIDEBAND.txt
+system/etc/audio/Tx_ControlParams_SPEAKER_WIDEBAND.txt
+system/etc/audio/Tx_ControlParams_WIRED_HEADPHONE_WIDEBAND.txt
+system/etc/audio/Tx_ControlParams_WIRED_HEADSET_WIDEBAND.txt
+system/etc/wifi/bcmdhd_apsta.bin
+system/etc/wifi/bcmdhd_mfg.bin
+system/etc/wifi/bcmdhd_p2p.bin
+system/etc/wifi/bcmdhd_sta.bin
+system/etc/wifi/nvram_mfg.txt
+system/etc/wifi/nvram_net.txt
+system/lib/hw/audio.primary.piranha.so
+system/lib/hw/audio_policy.piranha.so
+system/lib/hw/camera.omap4.so
+system/lib/hw/gps.omap4.so
+system/lib/hw/sensors.omap4.so
+system/lib/libI420colorconvert.so
+system/lib/libOMX.TI.DUCATI1.MISC.SAMPLE.so
+system/lib/libOMX.TI.DUCATI1.VIDEO.CAMERA.so
+system/lib/libOMX.TI.DUCATI1.VIDEO.DECODER.secure.so
+system/lib/libOMX.TI.DUCATI1.VIDEO.DECODER.so
+system/lib/libOMX.TI.DUCATI1.VIDEO.H264E.so
+system/lib/libOMX.TI.DUCATI1.VIDEO.MPEG4E.so
+system/lib/libOMX_Core.so
+system/lib/libQmageDecoder.so
+system/lib/lib_SamsungRec_V01003.so
+system/lib/lib_Samsung_Resampler.so
+system/lib/lib_Samsung_SB_AM_for_ICS_v03002.so
+system/lib/lib_SoundAlive_for_ICS_V01012.so
+system/lib/libaudiopolicy_sec.so
+system/lib/libcontrolcsc.so
+system/lib/libdomx.so
+system/lib/libion.so
+system/lib/liblibSoundAlive_VSP_ver305.so
+system/lib/liblvvefs.so
+system/lib/libmm_osal.so
+system/lib/libril.so
+system/lib/libsamsungRecord.so
+system/lib/libsamsungSoundbooster.so
+system/lib/libsec-ril.so
+system/lib/libsecnativefeature.so
+system/lib/libsecril-client.so
+system/lib/libsoundalive.so
+system/lib/libtinyalsa.so
+system/lib/libtiutils.so
+system/vendor/bin/pvrsrvinit
+system/vendor/firmware/BCM4330.hcd
+system/vendor/firmware/ducati-m3.bin
+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.omap4.so
+system/vendor/lib/libIMGegl.so
+system/vendor/lib/libPVRScopeServices.so
+system/vendor/lib/libglslcompiler.so
+system/vendor/lib/libpvr2d.so
+system/vendor/lib/libpvrANDROID_WSEGL.so
+system/vendor/lib/libsrv_init.so
+system/vendor/lib/libsrv_um.so
+system/vendor/lib/libusc.so
+
diff --git a/proprietary-p5110-files.txt b/proprietary-p5110-files.txt
new file mode 100644
index 0000000..1040d27
--- /dev/null
+++ b/proprietary-p5110-files.txt
@@ -0,0 +1,2 @@
+system/lib/libril.so
+system/lib/libsecril-client.so
diff --git a/setup-makefiles.sh b/setup-makefiles.sh
index 79f616c..179e990 100755
--- a/setup-makefiles.sh
+++ b/setup-makefiles.sh
@@ -14,12 +14,97 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-DEVICE=p51xx
-MANUFACTURER=samsung
+VENDOR=samsung
+COMMON=p51xx
+DEVICE=p5110
+OUTDIR=vendor/$VENDOR/$COMMON
+COMMONMAKEFILE=../../../$OUTDIR/$COMMON-vendor-blobs.mk
+DEVICEMAKEFILE=../../../$OUTDIR/$DEVICE-vendor-blobs.mk
-mkdir -p ../../../vendor/$MANUFACTURER/$DEVICE
+mkdir -p ../../../vendor/$VENDOR/$DEVICE
-(cat << EOF) | sed s/__DEVICE__/$DEVICE/g | sed s/__MANUFACTURER__/$MANUFACTURER/g > ../../../vendor/$MANUFACTURER/$DEVICE/p51xx-vendor.mk
+(cat << EOF) > $COMMONMAKEFILE
+# Copyright (C) 2012 The CyanogenMod 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/$VENDOR/$DEVICE/setup-makefiles.sh
+
+PRODUCT_COPY_FILES += \\
+EOF
+
+LINEEND=" \\"
+COUNT=`cat proprietary-common-files.txt | grep -v ^# | grep -v ^$ | wc -l | awk {'print $1'}`
+for FILE in `cat proprietary-common-files.txt | grep -v ^# | grep -v ^$`; do
+ COUNT=`expr $COUNT - 1`
+ if [ $COUNT = "0" ]; then
+ LINEEND=""
+ fi
+ echo " $OUTDIR/common/$FILE:$FILE$LINEEND" >> $COMMONMAKEFILE
+done
+
+(cat << EOF) > $DEVICEMAKEFILE
+# Copyright (C) 2012 The CyanogenMod 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/$VENDOR/$DEVICE/setup-makefiles.sh
+
+PRODUCT_COPY_FILES += \\
+EOF
+
+LINEEND=" \\"
+COUNT=`cat proprietary-$DEVICE-files.txt | grep -v ^# | grep -v ^$ | wc -l | awk {'print $1'}`
+for FILE in `cat proprietary-$DEVICE-files.txt | grep -v ^# | grep -v ^$`; do
+ COUNT=`expr $COUNT - 1`
+ if [ $COUNT = "0" ]; then
+ LINEEND=""
+ fi
+ echo " $OUTDIR/common/$FILE:$FILE$LINEEND" >> $DEVICEMAKEFILE
+done
+
+(cat << EOF) | sed s/__COMMON__/$COMMON/g | sed s/__DEVICE__/$DEVICE/g | sed s/__VENDOR__/$VENDOR/g > ../../../vendor/$VENDOR/$COMMON/$DEVICE-vendor.mk
+# Copyright (C) 2012 The CyanogenMod 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.
+
+# Pick up overlay for features that depend on non-open-source files
+DEVICE_PACKAGE_OVERLAYS := vendor/samsung/__COMMON__/overlay
+
+\$(call inherit-product, vendor/samsung/__COMMON__/__DEVICE__-vendor-blobs.mk)
+EOF
+
+(cat << EOF) | sed s/__COMMON__/$COMMON/g | sed s/__DEVICE__/$DEVICE/g | sed s/__VENDOR__/$VENDOR/g > ../../../vendor/$VENDOR/$COMMON/$COMMON-vendor.mk
# Copyright (C) 2012 The CyanogenMod Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -35,12 +120,12 @@ mkdir -p ../../../vendor/$MANUFACTURER/$DEVICE
# limitations under the License.
# Pick up overlay for features that depend on non-open-source files
-DEVICE_PACKAGE_OVERLAYS := vendor/__MANUFACTURER__/__DEVICE__/overlay
+DEVICE_PACKAGE_OVERLAYS := vendor/__VENDOR__/__COMMON__/overlay
-\$(call inherit-product, vendor/__MANUFACTURER__/__DEVICE__/p51xx-vendor-blobs.mk)
+\$(call inherit-product, vendor/__VENDOR__/__COMMON__/__COMMON__-vendor-blobs.mk)
EOF
-(cat << EOF) | sed s/__DEVICE__/$DEVICE/g | sed s/__MANUFACTURER__/$MANUFACTURER/g > ../../../vendor/$MANUFACTURER/$DEVICE/BoardConfigVendor.mk
+(cat << EOF) | sed s/__COMMON__/$COMMON/g | sed s/__DEVICE__/$DEVICE/g | sed s/__VENDOR__/$VENDOR/g > ../../../vendor/$VENDOR/$COMMON/BoardConfigVendor.mk
# Copyright (C) 2012 The CyanogenMod Project
#
# Licensed under the Apache License, Version 2.0 (the "License");