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 | 9165c42 | 2023-03-03 20:49:59 +0800 | [diff] [blame] | 44 | # update_kernel_dtb 6971857 4.14 |
| 45 | # update_kernel_dtb 6972652 4.19 |
| 46 | |
| 47 | function update_hikey960_5_10(){ |
| 48 | local build_num="9668756" |
| 49 | local board="hikey960" |
| 50 | local kernel_version="5.10" |
| 51 | |
| 52 | rm -fr ${board}/${kernel_version} |
| 53 | mkdir -p ${board}/${kernel_version} |
| 54 | |
| 55 | cd ${board}/${kernel_version} |
| 56 | mkdir gki abi |
| 57 | local f_download_ci="./gki/download_from_ci" |
| 58 | local f_abitool="./abi/abitool.py" |
| 59 | curl "https://android.googlesource.com/kernel/build/+/master/gki/download_from_ci?format=text" | base64 --decode > "${f_download_ci}" |
| 60 | curl "https://android.googlesource.com/kernel/build/+/master/abi/abitool.py?format=text" | base64 --decode > "${f_abitool}" |
| 61 | chmod +x "${f_download_ci}" |
| 62 | "${f_download_ci}" "${build_num}" kernel_hikey960 |
| 63 | mv Image.gz Image-vendor.gz |
| 64 | wget_wrapper "${build_num}" "aarch64" Image.gz Image-gki.gz |
| 65 | cat Image-gki.gz hi3660-hikey960.dtb >Image.gz-dtb |
| 66 | |
| 67 | rm -fr gki abi |
| 68 | rm -f ./Image-gki.gz ./Image-vendor.gz vmlinux |
| 69 | rm -fr logs |
| 70 | cd - |
| 71 | } |
| 72 | |
| 73 | # https://ci.android.com/builds/submitted/9668756/kernel_aarch64/latest |
| 74 | # https://ci.android.com/builds/submitted/9668756/kernel_hikey960/latest |
| 75 | update_hikey960_5_10 "9668756" |