Yongqin Liu | b106302 | 2020-04-24 19:15:45 +0800 | [diff] [blame] | 1 | #!/bin/bash -ex |
| 2 | |
| 3 | function wget_wrapper(){ |
| 4 | local build_num="${1}" && shift |
| 5 | local board="${1}" && shift |
| 6 | local target_name="${1}" && shift |
| 7 | local local_name="${1}" && shift |
| 8 | wget https://ci.android.com/builds/submitted/${build_num}/kernel_${board}/latest/raw/${target_name} -O ${local_name} |
| 9 | } |
| 10 | |
| 11 | function update_kernel_dtb_hikey960(){ |
| 12 | local build_num="${1}" && shift |
| 13 | local kernel_version="${1}" && shift |
| 14 | local board="hikey960" |
John Stultz | 650d521 | 2020-06-05 04:16:20 +0000 | [diff] [blame] | 15 | mkdir -p ${board}/${kernel_version} |
| 16 | wget_wrapper ${build_num} ${board} Image.gz-dtb ${board}/${kernel_version}/Image.gz-dtb |
| 17 | wget_wrapper ${build_num} ${board} hi3660-hikey960.dtb ${board}/${kernel_version}/hi3660-hikey960.dtb |
| 18 | wget_wrapper ${build_num} ${board} manifest_${build_num}.xml ${board}/${kernel_version}/manifest_${build_num}-${board}.xml |
Yongqin Liu | b106302 | 2020-04-24 19:15:45 +0800 | [diff] [blame] | 19 | } |
| 20 | |
| 21 | |
| 22 | function update_kernel_dtb_hikey(){ |
| 23 | local build_num="${1}" && shift |
| 24 | local kernel_version="${1}" && shift |
| 25 | local board="hikey" |
Yongqin Liu | cc19ab9 | 2020-11-16 16:01:47 +0800 | [diff] [blame] | 26 | rm -fr ${board}/${kernel_version} |
John Stultz | 650d521 | 2020-06-05 04:16:20 +0000 | [diff] [blame] | 27 | mkdir -p ${board}/${kernel_version} |
| 28 | wget_wrapper ${build_num} ${board} Image.gz-dtb ${board}/${kernel_version}/Image.gz-dtb |
| 29 | wget_wrapper ${build_num} ${board} hi6220-hikey.dtb ${board}/${kernel_version}/hi6220-hikey.dtb |
| 30 | wget_wrapper ${build_num} ${board} manifest_${build_num}.xml ${board}/${kernel_version}/manifest_${build_num}-${board}.xml |
Yongqin Liu | b106302 | 2020-04-24 19:15:45 +0800 | [diff] [blame] | 31 | } |
| 32 | |
| 33 | function update_kernel_dtb(){ |
| 34 | local build_num="${1}" && shift |
| 35 | local kernel_version="${1}" && shift |
| 36 | |
Yongqin Liu | cc19ab9 | 2020-11-16 16:01:47 +0800 | [diff] [blame] | 37 | # update_kernel_dtb_hikey960 ${build_num} ${kernel_version} |
Yongqin Liu | b106302 | 2020-04-24 19:15:45 +0800 | [diff] [blame] | 38 | update_kernel_dtb_hikey ${build_num} ${kernel_version} |
| 39 | } |
| 40 | |
| 41 | # https://ci.android.com/builds/branches/aosp_kernel-hikey-linaro-android-4.19/grid? |
| 42 | # https://ci.android.com/builds/submitted/6423191/kernel_hikey960/latest |
| 43 | # https://ci.android.com/builds/submitted/6423191/kernel_hikey/latest |
Yongqin Liu | cc19ab9 | 2020-11-16 16:01:47 +0800 | [diff] [blame] | 44 | update_kernel_dtb 6971857 4.14 |
| 45 | update_kernel_dtb 6972652 4.19 |