Skip to content

Commit

Permalink
jf: update blob list and extraction scripts
Browse files Browse the repository at this point in the history
Change-Id: Ie95d28cdaea9e69e0db9415a4b2ab69676e4e521
  • Loading branch information
invisiblek committed Nov 5, 2015
1 parent c902b08 commit 0f8e001
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 47 deletions.
36 changes: 1 addition & 35 deletions common-proprietary-files.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -149,47 +148,14 @@ 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
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
Expand Down
18 changes: 12 additions & 6 deletions extract-files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
41 changes: 35 additions & 6 deletions setup-makefiles.sh
Original file line number Diff line number Diff line change
@@ -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");
Expand All @@ -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
#
Expand All @@ -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
Expand Down

0 comments on commit 0f8e001

Please sign in to comment.