diff --git a/gsi/build_with_kernel/repack_kernels_common.sh b/gsi/build_with_kernel/repack_kernels_common.sh index 401553854..5e47c42d6 100755 --- a/gsi/build_with_kernel/repack_kernels_common.sh +++ b/gsi/build_with_kernel/repack_kernels_common.sh @@ -86,7 +86,12 @@ function prepare_kernel_image() #EOF printf "generate ${dist_root}/prebuilt-info.txt with kernel\n" cksum "${out_root}/kernel-${kernel_version}${postfix}" - strings "${out_root}/kernel-${kernel_version}${postfix}" |grep -E "Linux version [0-9]\." | sed -e 's/Linux version.*-ab//'| cut -f1 -d ' ' > "${dist_root}/prebuilt-info.txt" + local t="${out_root}/prebuilt-info.txt" + echo "{" > $t + echo -n " \"kernel-build-id\": " >> $t + strings "${out_root}/kernel-${kernel_version}${postfix}" |grep -E "Linux version [0-9]\." | sed -e 's/Linux version.*-ab//'| cut -f1 -d ' ' >> $t + echo "}" >> $t + cp $t ${dist_root}/prebuilt-info.txt } @@ -131,7 +136,8 @@ function update_kernel_prebuilts_with_artifact kernel-${kernel_version}-lz4-allsyms \ kernel-${kernel_version} \ kernel-${kernel_version}-gz \ - kernel-${kernel_version}-lz4" + kernel-${kernel_version}-lz4 \ + prebuilt-info.txt" printf "%20s\n --> %20s\n" "${out_root}" "${prebuilts_dir}" for f in ${list}; do echo \