1 #!/bin/sh 2 3 # Copyright 2014 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 17 rm -f extract-lists.txt 18 cat ../vendor_owner_info.txt | 19 cut -d : -f 2 | 20 sort -u | 21 #grep -v google | 22 while read target_owner 23 do 24 mkdir -p $target_owner/staging 25 cat > $target_owner/staging/device-partial.mk << EOF 26 # Copyright 2014 The Android Open Source Project 27 # 28 # Licensed under the Apache License, Version 2.0 (the "License"); 29 # you may not use this file except in compliance with the License. 30 # You may obtain a copy of the License at 31 # 32 # http://www.apache.org/licenses/LICENSE-2.0 33 # 34 # Unless required by applicable law or agreed to in writing, software 35 # distributed under the License is distributed on an "AS IS" BASIS, 36 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 37 # See the License for the specific language governing permissions and 38 # limitations under the License. 39 40 EOF 41 echo -n "# " >> $target_owner/staging/device-partial.mk 42 case $target_owner in 43 asus) 44 echo -n Asus >> $target_owner/staging/device-partial.mk 45 ;; 46 broadcom) 47 echo -n Broadcom >> $target_owner/staging/device-partial.mk 48 ;; 49 google) 50 echo -n Google >> $target_owner/staging/device-partial.mk 51 ;; 52 intel) 53 echo -n Intel >> $target_owner/staging/device-partial.mk 54 ;; 55 esac 56 echo " blob(s) necessary for Fugu hardware" >> $target_owner/staging/device-partial.mk 57 echo "PRODUCT_COPY_FILES := \\" >> $target_owner/staging/device-partial.mk 58 59 echo " $target_owner)" >> extract-lists.txt 60 echo " TO_EXTRACT=\"\\" >> extract-lists.txt 61 62 63 cat ../proprietary-blobs.txt | 64 grep ^/ | 65 cut -b 2- | 66 sort | 67 while read file 68 do 69 70 auto_owner=$(grep ^$file: ../vendor_owner_info.txt | cut -d : -f 2) 71 if test $file = system/lib/hw/gps.msm8974.so -o $file = system/lib/libgps.utils.so -o $file = system/lib/libloc_adapter.so -o $file = system/lib/libloc_eng.so 72 then 73 auto_owner=qcom 74 fi 75 76 if test "$auto_owner" = "" 77 then 78 echo $file has no known owner 79 fi 80 81 if test "$auto_owner" = "$target_owner" -a $file != system/app/shutdownlistener.apk -a $file != system/app/TimeService.apk 82 then 83 if test $file != ZZZ 84 then 85 if [[ $file == *.apk ]] 86 then 87 echo " $file \\" >> extract-lists.txt 88 continue 89 fi 90 91 if [[ $file == */lib64/* ]] 92 then 93 echo " vendor/$target_owner/fugu/proprietary/lib64/$(basename $file):$file:$target_owner \\" >> $target_owner/staging/device-partial.mk 94 elif [[ $file == */arm/nb/* ]] 95 then 96 echo " vendor/$target_owner/fugu/proprietary/armnb/$(basename $file):$file:$target_owner \\" >> $target_owner/staging/device-partial.mk 97 else 98 echo " vendor/$target_owner/fugu/proprietary/$(basename $file):$file:$target_owner \\" >> $target_owner/staging/device-partial.mk 99 fi 100 fi 101 echo " $file \\" >> extract-lists.txt 102 fi 103 done 104 105 echo >> $target_owner/staging/device-partial.mk 106 if test $target_owner = qcom 107 then 108 true ; #echo PRODUCT_PACKAGES := libacdbloader >> $target_owner/staging/device-partial.mk 109 fi 110 111 echo " \"" >> extract-lists.txt 112 echo " ;;" >> extract-lists.txt 113 done 114