build/debian: Disable ballooning on images with a generic kernel
As described in the linked bug report, enabling memory ballooning
on a generic kernel (without our patches) results in strange
corruption issues on Arm64.
In this CL, we update our build script to:
1. make building with our custom kernel the default build option,
2. disable ballooning on Arm64 images with unpatched generic kernel.
Bug: 396233393
Test: Deployed and tested on Komodo:
Test: - ./build_in_container.sh -a aarch64
Test: - ./build_in_container.sh -g -a aarch64
Change-Id: I4441dbf5886675251836ed772eaa804d0520bea9
diff --git a/build/debian/build_in_container.sh b/build/debian/build_in_container.sh
index e3adcae..739d2dd 100755
--- a/build/debian/build_in_container.sh
+++ b/build/debian/build_in_container.sh
@@ -6,7 +6,7 @@
echo "Options:"
echo "-h Print usage and this help message and exit."
echo "-a ARCH Architecture of the image [default is host arch: $(uname -m)]"
- echo "-k Build and use our custom kernel [default is cloud kernel]"
+ echo "-g Use Debian generic kernel [default is our custom kernel]"
echo "-r Release mode build"
echo "-s Leave a shell open [default: only if the build fails]"
echo "-w Save temp work directory in the container [for debugging]"
@@ -18,17 +18,17 @@
save_workdir_flag=
shell_condition="||"
-while getopts "a:hkrsw" option; do
+while getopts "a:ghrsw" option; do
case ${option} in
a)
arch="$OPTARG"
;;
+ g)
+ kernel_flag="-g"
+ ;;
h)
show_help ; exit
;;
- k)
- kernel_flag="-k"
- ;;
r)
release_flag="-r"
;;