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