From 2ffe2bed8b26e2c2bd5c812af3ed9c28f1f197e3 Mon Sep 17 00:00:00 2001 From: Hung-Te Lin Date: Tue, 5 Oct 2010 08:15:40 +0800 Subject: [PATCH] crosutils: refine imaging output message (as instructions) image_to_usb has been made to work inside chroot for quite some time (maybe since http://codereview.chromium.org/1991006), and some special modes may even require it to be executed inside chroot. However the output messages were not fixed, so we should remove the "OUTSIDE CHROOT" alerts. BUG=none TEST=manually: 1. executed build_image and verified that output messages is correct, and the image is really built successfully. 2. executed image_to_usb.sh --from=... --to=/dev/sde and verified output messages is correct, and the USB device is really imaged by the given target Change-Id: I8f4274c5f59a0aa585471469ac285e91c0cead13 Review URL: http://codereview.chromium.org/3519003 --- build_image | 2 +- image_to_usb.sh | 11 ++--------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/build_image b/build_image index 2df9a3cc05..77aa152a81 100755 --- a/build_image +++ b/build_image @@ -751,7 +751,7 @@ fi print_time_elapsed -echo "To copy to USB keyfob, OUTSIDE the chroot, do something like:" +echo "To copy to USB keyfob, do something like:" echo " ./image_to_usb.sh --from=${OUTSIDE_OUTPUT_DIR} --to=/dev/sdX" echo "To convert to VMWare image, INSIDE the chroot, do something like:" echo " ./image_to_vm.sh --from=${OUTSIDE_OUTPUT_DIR} --board=${BOARD}" diff --git a/image_to_usb.sh b/image_to_usb.sh index 81a3ab58dd..8248c393de 100755 --- a/image_to_usb.sh +++ b/image_to_usb.sh @@ -263,14 +263,7 @@ else echo "Copying ${SRC_IMAGE} to ${FLAGS_to}..." cp -f "${SRC_IMAGE}" "${FLAGS_to}" - echo "Done. To copy to a USB drive, outside the chroot, do something like:" - echo " sudo dd if=${FLAGS_to} of=/dev/sdX bs=4M" + echo "Done. To copy to a USB drive, do something like:" + echo " sudo dd if=${FLAGS_to} of=/dev/sdX bs=4M oflag=sync" echo "where /dev/sdX is the entire drive." - if [ ${INSIDE_CHROOT} -eq 1 ] - then - example=$(basename "${FLAGS_to}") - echo "NOTE: Since you are currently inside the chroot, and you'll need to" - echo "run dd outside the chroot, the path to the USB image will be" - echo "different (ex: ~/chromeos/trunk/src/build/images/SOME_DIR/$example)." - fi fi