1#!/bin/sh 2 3# Copyright 2013 The Android Open Source Project 4# 5# Licensed under the Apache License, Version 2.0 (the "License"); 6# you may not use this file except in compliance with the License. 7# You may obtain a copy of the License at 8# 9# http://www.apache.org/licenses/LICENSE-2.0 10# 11# Unless required by applicable law or agreed to in writing, software 12# distributed under the License is distributed on an "AS IS" BASIS, 13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14# See the License for the specific language governing permissions and 15# limitations under the License. 16 17rm -f extract-lists.txt 18cat ../vendor_owner_info.txt | 19cut -d : -f 2 | 20sort -u | 21grep -v google | 22while read target_owner 23do 24cat > $target_owner/staging/device-partial.mk << EOF 25# Copyright 2013 The Android Open Source Project 26# 27# Licensed under the Apache License, Version 2.0 (the "License"); 28# you may not use this file except in compliance with the License. 29# You may obtain a copy of the License at 30# 31# http://www.apache.org/licenses/LICENSE-2.0 32# 33# Unless required by applicable law or agreed to in writing, software 34# distributed under the License is distributed on an "AS IS" BASIS, 35# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 36# See the License for the specific language governing permissions and 37# limitations under the License. 38 39EOF 40echo -n "# " >> $target_owner/staging/device-partial.mk 41case $target_owner in 42asus) 43echo -n Asus >> $target_owner/staging/device-partial.mk 44;; 45broadcom) 46echo -n Broadcom >> $target_owner/staging/device-partial.mk 47;; 48qcom) 49echo -n Qualcomm >> $target_owner/staging/device-partial.mk 50;; 51esac 52echo " blob(s) necessary for Deb hardware" >> $target_owner/staging/device-partial.mk 53echo "PRODUCT_COPY_FILES := \\" >> $target_owner/staging/device-partial.mk 54 55echo " $target_owner)" >> extract-lists.txt 56echo " TO_EXTRACT=\"\\" >> extract-lists.txt 57 58 59cat ../proprietary-blobs.txt | 60grep ^/ | 61cut -b 2- | 62sort | 63while read file 64do 65 66auto_owner=$(grep ^$file: ../vendor_owner_info.txt | cut -d : -f 2) 67if test $file = system/bin/mm-qcamera-app -o $file = system/lib/hw/camera.deb.so -o $file = system/lib/hw/gps.msm8960.so -o $file = system/lib/libgps.utils.so -o $file = system/lib/libloc_adapter.so -o $file = system/lib/libloc_eng.so -o $file = system/lib/libmmcamera_interface.so -o $file = system/lib/libmmjpeg_interface.so -o $file = system/lib/libqomx_core.so 68then 69auto_owner=qcom 70fi 71 72if test "$auto_owner" = "" -a $file != system/etc/firmware/tzapps.b00 -a $file != system/etc/firmware/tzapps.b01 -a $file != system/etc/firmware/tzapps.b02 -a $file != system/etc/firmware/tzapps.b03 -a $file != system/etc/firmware/tzapps.mdt -a $file != system/etc/firmware/wcd9310/wcd9310_anc.bin -a $file != system/etc/firmware/wcd9310/wcd9310_mbhc.bin 73then 74echo $file has no known owner 75fi 76 77if test "$auto_owner" = "$target_owner" 78then 79if test $file != system/lib/libacdbloader.so -a $file != system/vendor/firmware/tzapps.mdt 80then 81echo " vendor/$target_owner/deb/proprietary/$(basename $file):$file:$target_owner \\" >> $target_owner/staging/device-partial.mk 82fi 83echo " $file \\" >> extract-lists.txt 84fi 85done 86 87echo >> $target_owner/staging/device-partial.mk 88if test $target_owner = qcom 89then 90echo PRODUCT_PACKAGES := libacdbloader tzapps.mdt >> $target_owner/staging/device-partial.mk 91fi 92 93echo " \"" >> extract-lists.txt 94echo " ;;" >> extract-lists.txt 95done 96