blob: 497bb447d799421320eff4f21cbaea963d0951ef [file] [log] [blame]
Jean-Baptiste Queru95dfbb22013-07-03 07:59:39 -07001#!/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
42broadcom)
43echo -n Broadcom >> $target_owner/staging/device-partial.mk
44;;
45lge)
46echo -n LGE >> $target_owner/staging/device-partial.mk
47;;
48qcom)
49echo -n Qualcomm >> $target_owner/staging/device-partial.mk
50;;
51esac
52echo " blob(s) necessary for Hammerhead 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/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
68then
69auto_owner=qcom
70fi
71
72if test "$auto_owner" = ""
73then
74echo $file has no known owner
75fi
76
Jean-Baptiste Queru38e55292013-07-15 07:42:24 -070077if test "$auto_owner" = "$target_owner" -a $file != system/app/shutdownlistener.apk -a $file != system/app/TimeService.apk
Jean-Baptiste Queru95dfbb22013-07-03 07:59:39 -070078then
Jean-Baptiste Queru38e55292013-07-15 07:42:24 -070079if test $file != ZZZ
Jean-Baptiste Queru95dfbb22013-07-03 07:59:39 -070080then
81echo " vendor/$target_owner/hammerhead/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
90true ; #echo PRODUCT_PACKAGES := libacdbloader >> $target_owner/staging/device-partial.mk
91fi
92
93echo " \"" >> extract-lists.txt
94echo " ;;" >> extract-lists.txt
95done