summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Peng <robinpeng@google.com>2023-10-12 07:46:39 +0000
committerRobin Peng <robinpeng@google.com>2023-10-12 07:46:39 +0000
commitff2d23367cec723089e846c62068d19ac94c1618 (patch)
tree944da2be98aa0ff6cbb24457c13370bbffd9bbca
parent30001c8f3e1f11e65435946da56b08543a1d1d1e (diff)
downloadshusky-ff2d23367cec723089e846c62068d19ac94c1618.tar.gz
build_<DEVICE>.sh: remove script messages while building with extra parameters
Bug: 304773854 Change-Id: I69ff26d8e45a15ac8e0bc29ac21be54c216345c1 Signed-off-by: Robin Peng <robinpeng@google.com>
-rwxr-xr-xbuild_shusky.sh42
1 files changed, 22 insertions, 20 deletions
diff --git a/build_shusky.sh b/build_shusky.sh
index c2240ee..6f7b2b3 100755
--- a/build_shusky.sh
+++ b/build_shusky.sh
@@ -13,26 +13,28 @@ if [ "${BUILD_AOSP_KERNEL}" = "1" -a "${BUILD_STAGING_KERNEL}" = "1" ]; then
exit_if_error 1 "Flags incompatible with BUILD_AOSP_KERNEL detected"
fi
-parameters=
-bazelrc_file="private/google-modules/soc/gs/device.bazelrc"
-GKI_BUILD_ID=`sed -n 's/.*gki_prebuilts=\([0-9]\+\).*/\1/p' $bazelrc_file`
-USE_GKI=`grep "^build --config=download_gki" $bazelrc_file`
-NO_USE_GKI=`grep "^build --config=no_download_gki" $bazelrc_file`
-USE_AOSP=`grep "^build --config=use_source_tree_aosp$" $bazelrc_file`
-USE_AOSP_STAGING=`grep "^build --config=use_source_tree_aosp_staging$" $bazelrc_file`
-if [ "${BUILD_AOSP_KERNEL}" = "1" ] || [ -n "${USE_AOSP}" ]; then
- echo -e "\nBuilding with core-kernel generated from source tree aosp/\n"
- parameters="--config=use_source_tree_aosp --config=no_download_gki"
-elif [ "${BUILD_STAGING_KERNEL}" = "1" ] || [ -n "${USE_AOSP_STAGING}" ]; then
- echo -e "\nBuilding with core-kernel generated from source tree aosp-staging/\n"
- parameters="--config=use_source_tree_aosp_staging --config=no_download_gki"
-elif [ -n "${GKI_BUILD_ID}" ] && [ -n "${USE_GKI}" ] && [ -z "${NO_USE_GKI}" ] && [ -z "${USE_AOSP}" ] && [ -z "${USE_AOSP_STAGING}" ]; then
- echo -e "\nBuilding with GKI prebuilts from ab/$GKI_BUILD_ID - kernel_aarch64\n"
-else
- echo -e "\nPlease check private/google-modules/soc/gs/device.bazelrc"
- echo -e " 1) IF \"build --config=use_source_tree_aosp\" ----> core-kernel generated from source tree aosp/"
- echo -e " 2) IF \"build --config=use_source_tree_aosp_staging\" ----> core-kernel generated from source tree aosp-staging/"
- echo -e " 3) IF \"build --config=download_gki\" ----> core-kernel based on GKI prebuilts\n"
+if [ "${#}" = "0" ]; then
+ parameters=
+ bazelrc_file="private/google-modules/soc/gs/device.bazelrc"
+ GKI_BUILD_ID=`sed -n 's/.*gki_prebuilts=\([0-9]\+\).*/\1/p' $bazelrc_file`
+ USE_GKI=`grep "^build --config=download_gki" $bazelrc_file`
+ NO_USE_GKI=`grep "^build --config=no_download_gki" $bazelrc_file`
+ USE_AOSP=`grep "^build --config=use_source_tree_aosp$" $bazelrc_file`
+ USE_AOSP_STAGING=`grep "^build --config=use_source_tree_aosp_staging$" $bazelrc_file`
+ if [ "${BUILD_AOSP_KERNEL}" = "1" ] || [ -n "${USE_AOSP}" ]; then
+ echo -e "\nBuilding with core-kernel generated from source tree aosp/\n"
+ parameters="--config=use_source_tree_aosp --config=no_download_gki"
+ elif [ "${BUILD_STAGING_KERNEL}" = "1" ] || [ -n "${USE_AOSP_STAGING}" ]; then
+ echo -e "\nBuilding with core-kernel generated from source tree aosp-staging/\n"
+ parameters="--config=use_source_tree_aosp_staging --config=no_download_gki"
+ elif [ -n "${GKI_BUILD_ID}" ] && [ -n "${USE_GKI}" ] && [ -z "${NO_USE_GKI}" ] && [ -z "${USE_AOSP}" ] && [ -z "${USE_AOSP_STAGING}" ]; then
+ echo -e "\nBuilding with GKI prebuilts from ab/$GKI_BUILD_ID - kernel_aarch64\n"
+ else
+ echo -e "\nPlease check private/google-modules/soc/gs/device.bazelrc"
+ echo -e " 1) IF \"build --config=use_source_tree_aosp\" ----> core-kernel generated from source tree aosp/"
+ echo -e " 2) IF \"build --config=use_source_tree_aosp_staging\" ----> core-kernel generated from source tree aosp-staging/"
+ echo -e " 3) IF \"build --config=download_gki\" ----> core-kernel based on GKI prebuilts\n"
+ fi
fi
exec tools/bazel run ${parameters} --config=stamp --config=shusky --config=fast //private/devices/google/shusky:zuma_shusky_dist "$@"