diff --git a/bin/cros_make_image_bootable b/bin/cros_make_image_bootable index 6a661623dc..1c2bccbd03 100755 --- a/bin/cros_make_image_bootable +++ b/bin/cros_make_image_bootable @@ -125,6 +125,9 @@ DEFINE_boolean crosbug12352_arm_kernel_signing ${FLAGS_TRUE} \ # TODO(sosa): Remove once known images no longer use this in their config. DEFINE_string arm_extra_bootargs "" "DEPRECATED FLAG. Do not use." +DEFINE_boolean force_developer_mode ${FLAGS_FALSE} \ + "Add cros_debug to boot args." + # Parse the boot.desc and any overrides eval set -- "${BOOT_DESC} ${FLAG_OVERRIDES}" FLAGS "${@}" || exit 1 @@ -188,6 +191,10 @@ make_image_bootable() { use_dev_keys="--use_dev_keys" fi + if [ ${FLAGS_force_developer_mode} -eq ${FLAGS_TRUE} ]; then + FLAGS_boot_args="${FLAGS_boot_args} cros_debug" + fi + # Builds the kernel partition image. The temporary files are kept around # so that we can perform a load_kernel_test later on the final image. ${SCRIPTS_DIR}/build_kernel_image.sh \ diff --git a/build_image b/build_image index 70e8e6c3ab..237232fc77 100755 --- a/build_image +++ b/build_image @@ -487,6 +487,9 @@ update_dev_packages() { sudo /sbin/ldconfig -r "${ROOT_FS_DIR}" # Mark the image as a developer image (input to chromeos_startup). + # TODO(arkaitzr): Remove this file when applications no longer rely on it + # (crosbug.com/16648). The preferred way of determining developer mode status + # is via crossystem cros_debug?1 (checks boot args for "cros_debug"). sudo mkdir -p "${ROOT_FS_DIR}/root" sudo touch "${ROOT_FS_DIR}/root/.dev_mode" @@ -938,7 +941,8 @@ if [ ${FLAGS_withdev} -eq ${FLAGS_TRUE} ] ; then update_dev_packages ${DEVELOPER_IMAGE_NAME} ${SCRIPTS_DIR}/bin/cros_make_image_bootable "${OUTPUT_DIR}" \ "${DEVELOPER_IMAGE_NAME}" \ - ${crosbug12352_flag} + ${crosbug12352_flag} \ + --force_developer_mode fi # Create a test or factory test image if desired