• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/bin/bash
2# Find builds here:
3# https://ci.android.com/builds/branches/aosp_kernel-common-android15-6.6/grid
4set -e
5
6files=(
7  "ffa-module.ko"
8  "system_heap.ko"
9  "trusty-core.ko"
10  "trusty-ipc.ko"
11  "trusty-log.ko"
12  "trusty-test.ko"
13  "trusty-virtio.ko"
14)
15
16# Change directory to the script patj
17cd "$(dirname "$(realpath $0)")"
18
19if [ $# == 1 ]
20then
21build=$1
22else
23	echo "Usage: $0 <build>"
24	exit 1
25fi
26
27download_trusty_file()
28{
29  local target=$1
30  local ko_file=$2
31
32  local ci_url="https://ci.android.com/builds/submitted/${build}/${target}/latest/raw"
33  echo "Downloading $ko_file..."
34  curl -fL "$ci_url/$ko_file" -o $ko_file
35
36  echo "Adding $ko_file to current branch"
37  git add $ko_file
38}
39
40for file in "${files[@]}"; do
41  download_trusty_file "trusty_aarch64" "$file"
42done
43
44echo "Committing build $build..."
45git commit -m "Update Trusty prebuilts to $build
46
47Bug: None
48Test: Presubmit"
49
50topic="trusty_module_prebuilts_$build"
51echo "Uploading topic $topic"
52repo upload -c . --topic=$topic
53