-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild_comet.sh
executable file
·32 lines (27 loc) · 1.01 KB
/
build_comet.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/bash
# SPDX-License-Identifier: GPL-2.0
parameters=
if [ "${BUILD_AOSP_KERNEL}" = "1" ]; then
echo "WARNING: BUILD_AOSP_KERNEL is deprecated." \
"Use --kernel_package=@//aosp instead." >&2
parameters="--kernel_package=@//aosp"
fi
if [ "${BUILD_STAGING_KERNEL}" = "1" ]; then
echo "WARNING: BUILD_STAGING_KERNEL is deprecated." \
"Use --kernel_package=@//aosp-staging instead." >&2
parameters="--kernel_package=@//aosp-staging"
fi
# clean out/ to avoid confusion with signing keys
test -d out/ && rm -rf out/
tools/bazel run \
${parameters} \
--config=stamp \
--config=comet \
//private/devices/google/comet:zumapro_comet_dist "$@" || exit 1
sign_file=$(mktemp)
trap '{ rm -f -- "$sign_file"; }' EXIT
prebuilts/clang/host/linux-x86/clang-r487747c/bin/clang aosp/scripts/sign-file.c -lssl -lcrypto -o ${sign_file}
find out/comet/dist -type f -name "*.ko" \
-exec ${sign_file} sha256 \
$(find out/ -type f -name "signing_key.pem") \
$(find out/ -type f -name "signing_key.x509") {} \;