blob: 5c251616e562948bcfa7bef63d181f732f353382 [file] [log] [blame]
Yongqin Liub1063022020-04-24 19:15:45 +08001#!/bin/bash -ex
2
3function 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
11function update_kernel_dtb_hikey960(){
12 local build_num="${1}" && shift
13 local kernel_version="${1}" && shift
14 local board="hikey960"
John Stultz650d5212020-06-05 04:16:20 +000015 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 Liub1063022020-04-24 19:15:45 +080019}
20
21
22function update_kernel_dtb_hikey(){
23 local build_num="${1}" && shift
24 local kernel_version="${1}" && shift
25 local board="hikey"
Yongqin Liucc19ab92020-11-16 16:01:47 +080026 rm -fr ${board}/${kernel_version}
John Stultz650d5212020-06-05 04:16:20 +000027 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 Liub1063022020-04-24 19:15:45 +080031}
32
33function update_kernel_dtb(){
34 local build_num="${1}" && shift
35 local kernel_version="${1}" && shift
36
Yongqin Liucc19ab92020-11-16 16:01:47 +080037# update_kernel_dtb_hikey960 ${build_num} ${kernel_version}
Yongqin Liub1063022020-04-24 19:15:45 +080038 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 Liucc19ab92020-11-16 16:01:47 +080044update_kernel_dtb 6971857 4.14
45update_kernel_dtb 6972652 4.19