summaryrefslogtreecommitdiff
path: root/tc0/vendorsetup.sh
blob: aecf073b0b371943f6d3f164df3503b20733a06c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash
#
# Copyright (c) 2020, ARM Ltd.
# All rights reserved.
#a
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

function apply_patch {
  pushd .
  cd $1
  git am $PATCHES_DIR/$2 >/dev/null 2>&1
  if [ $? -eq 0 ];
  then
    echo "Applied $2"
  else
    echo "Patch am failed, Either patch did not apply cleanly or was already applied." \
         "Aborting git am."
    git am --abort
  fi
  popd
}

ANDROID_TOP_DIR=$(pwd)
PATCHES_DIR=$ANDROID_TOP_DIR/device/arm/tc0/patches

apply_patch "system/core" "0001-Add-amba-bus-support-to-platform-devices.patch"
apply_patch "external/minigbm" "0001-minigbm-komeda-Add-driver.patch"
apply_patch "external/swiftshader" "0001-Don-t-unlock-Android-buffers-immediately-after-locki.patch"