From 0f8e00108b57497cae9f2a48f55f3a94b0a5e3e1 Mon Sep 17 00:00:00 2001 From: Dan Pasanen Date: Thu, 5 Nov 2015 08:38:41 -0600 Subject: [PATCH] jf: update blob list and extraction scripts Change-Id: Ie95d28cdaea9e69e0db9415a4b2ab69676e4e521 --- common-proprietary-files.txt | 36 +------------------------------ extract-files.sh | 18 ++++++++++------ setup-makefiles.sh | 41 ++++++++++++++++++++++++++++++------ 3 files changed, 48 insertions(+), 47 deletions(-) diff --git a/common-proprietary-files.txt b/common-proprietary-files.txt index 04d4967bc..c667f1c10 100644 --- a/common-proprietary-files.txt +++ b/common-proprietary-files.txt @@ -86,7 +86,6 @@ vendor/lib/egl/eglsubAndroid.so vendor/lib/egl/libEGL_adreno.so vendor/lib/egl/libGLESv1_CM_adreno.so vendor/lib/egl/libGLESv2_adreno.so -vendor/lib/egl/libGLESv2S3D_adreno.so vendor/lib/egl/libq3dtools_adreno.so vendor/lib/libadreno_utils.so vendor/lib/libC2D2.so @@ -149,39 +148,6 @@ bin/mm-pp-daemon lib/libmm-abl.so lib/libmm-abl-oem.so -# QMI -lib/libidl.so -lib/libqcci_legacy.so -lib/libqmi_client_qmux.so -lib/libqmiservices.so -lib/libqmi.so -vendor/lib/libqmi_cci.so -vendor/lib/libqmi_common_so.so -vendor/lib/libqmi_csi.so -vendor/lib/libqmi_encdec.so - -# Radio -bin/efsks -bin/ks -bin/netmgrd -bin/qcks -bin/qmuxd -bin/rild -bin/rmt_storage -lib/libatparser.so -lib/libdsi_netctrl.so -lib/libfactoryutil.so -lib/libomission_avoidance.so -lib/libqdp.so -lib/libqmi.so -lib/libreference-ril.so -lib/libsecril-client.so -lib/libdsutils.so -lib/libnetmgr.so -lib/libril-qcril-external.so -lib/libril-qcril-hook-oem.so -vendor/lib/libdiag.so - # Sensors lib/libsam.so lib/libsensirion_j1.so @@ -189,7 +155,7 @@ lib/hw/sensors.msm8960.so lib/hw/sensorhubs.msm8960.so # Time services -app/TimeService/TimeService.apk +app/TimeService.apk bin/time_daemon lib/libTimeService.so vendor/lib/libtime_genoff.so diff --git a/extract-files.sh b/extract-files.sh index d177e4410..8d1acaa4a 100755 --- a/extract-files.sh +++ b/extract-files.sh @@ -46,13 +46,19 @@ else fi fi -BASE=../../../vendor/$VENDOR/jf-common/proprietary -rm -rf $BASE/* +BLOBLOC=$DEVICE +if [ "$DEVICE" == "jflteatt" ] || [ "$DEVICE" == "jfltecan" ] || [ "$DEVICE" == "jfltetmo" ] || [ "$DEVICE" == "jfltexx" ]; then + BLOBLOC=jf-gsm-common +fi + + +BASE=../../../vendor/$VENDOR/jf-common +rm -rf $BASE -DEVBASE=../../../vendor/$VENDOR/$DEVICE/proprietary -rm -rf $DEVBASE/* +DEVBASE=../../../vendor/$VENDOR/$BLOBLOC +rm -rf $DEVBASE -extract ../../$VENDOR/jf-common/common-proprietary-files.txt $BASE -extract ../../$VENDOR/$DEVICE/device-proprietary-files.txt $DEVBASE +extract ../../$VENDOR/jf-common/common-proprietary-files.txt $BASE/proprietary +extract ../../$VENDOR/$DEVICE/device-proprietary-files.txt $DEVBASE/proprietary ../jf-common/setup-makefiles.sh diff --git a/setup-makefiles.sh b/setup-makefiles.sh index a7792d05b..952fff2d2 100755 --- a/setup-makefiles.sh +++ b/setup-makefiles.sh @@ -1,7 +1,12 @@ -OUTDIR=vendor/$VENDOR/$DEVICE -MAKEFILE=../../../$OUTDIR/$DEVICE-vendor-blobs.mk +BLOBLOC=$DEVICE +if [ "$DEVICE" == "jflteatt" ] || [ "$DEVICE" == "jfltecan" ] || [ "$DEVICE" == "jfltetmo" ] || [ "$DEVICE" == "jfltexx" ]; then + BLOBLOC=jf-gsm-common +fi -(cat << EOF) > ../../../$OUTDIR/$DEVICE-vendor.mk +OUTDIR=vendor/$VENDOR/$BLOBLOC +MAKEFILE=../../../$OUTDIR/$BLOBLOC-vendor-blobs.mk + +(cat << EOF) > ../../../$OUTDIR/$BLOBLOC-vendor.mk # Copyright (C) 2011 The CyanogenMod Project # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,13 +21,37 @@ MAKEFILE=../../../$OUTDIR/$DEVICE-vendor-blobs.mk # 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 +# This file is generated by device/$VENDOR/$BLOBLOC/setup-makefiles.sh # Pick up overlay for features that depend on non-open-source files -\$(call inherit-product, vendor/$VENDOR/$DEVICE/$DEVICE-vendor-blobs.mk) +\$(call inherit-product, vendor/$VENDOR/$BLOBLOC/$BLOBLOC-vendor-blobs.mk) EOF +LINEEND=" \\" +COUNT=`wc -l ../$DEVICE/device-proprietary-files.txt | awk {'print $1'}` +DISM=`egrep -c '(^#|^$)' ../$DEVICE/device-proprietary-files.txt` +COUNT=`expr $COUNT - $DISM` +for FILE in `egrep -v '(^#|^$)' ../$DEVICE/device-proprietary-files.txt`; do + COUNT=`expr $COUNT - 1` + if [ $COUNT = "0" ]; then + LINEEND="" + fi + # Split the file from the destination (format is "file[:destination]") + OLDIFS=$IFS IFS=":" PARSING_ARRAY=($FILE) IFS=$OLDIFS + FILE=${PARSING_ARRAY[0]} + DEST=${PARSING_ARRAY[1]} + + if [ -n "$DEST" ]; then + FILE=$DEST + fi + if [ -f ../../../$OUTDIR/proprietary/$FILE ]; then + echo " $OUTDIR/proprietary/$FILE:system/$FILE$LINEEND" >> $MAKEFILE + else + echo "ERR: file not found: $OUTDIR/proprietary/$FILE" + fi +done + (cat << EOF) > ../../../$OUTDIR/BoardConfigVendor.mk # Copyright (C) 2011 The CyanogenMod Project # @@ -38,7 +67,7 @@ EOF # 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 +# This file is generated by device/$VENDOR/$BLOBLOC/setup-makefiles.sh EOF export DEVICE=jf-common