Fix default build arguments.
build_image: Only enable serial output on factory install and test images.
This is factory-branch-only change.
Enabling serial output on "all" images would cause signer test to fail.
BUG=chrome-os-partner:38520
TEST=./build_image test
Change-Id: I276aa23fc049141fb71084ab4722b4b5862656dc
Reviewed-on: https://chromium-review.googlesource.com/263031
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Commit-Queue: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
diff --git a/build_image b/build_image
index 988ebb4..aa59531 100755
--- a/build_image
+++ b/build_image
@@ -27,7 +27,7 @@
"Directory in which to place image result directories (named by version)"
DEFINE_string disk_layout "default" \
"The disk layout type to use for this image."
-DEFINE_string enable_serial "ttyMSM0" \
+DEFINE_string enable_serial "" \
"Enable serial port for printks. Example values: ttyS0"
DEFINE_integer loglevel 7 \
"The loglevel to add to the kernel command line."
@@ -133,12 +133,18 @@
export USE="${USE} fbconsole vtconsole factory_shim_ramfs tpm i2cdev vfat"
fi
-if should_build_image ${CHROMEOS_FACTORY_TEST_IMAGE_NAME}; then
+if should_build_image ${CHROMEOS_TEST_IMAGE_NAME}; then
# Disable module restrictions on factory test image to allow for
# external third party drivers in /usr/local.
FLAGS_boot_args="${FLAGS_boot_args} lsm.module_locking=0"
fi
+if should_build_image "${CHROMEOS_FACTORY_SHIM_NAME}" ||
+ should_build_image "${CHROMEOS_TEST_IMAGE_NAME}"; then
+ # Enable serial if not specified.
+ [ -n "${FLAGS_enable_serial}" ] || FLAGS_enable_serial="ttyMSM0"
+fi
+
# TODO: </prebuild hook>
# If we are creating a developer image, also create a pristine image with a