OLD | NEW |
1 #!/bin/bash | 1 #!/bin/bash |
2 | 2 |
3 # Copyright (c) 2009 The Chromium OS Authors. All rights reserved. | 3 # Copyright (c) 2009 The Chromium OS Authors. All rights reserved. |
4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
6 | 6 |
7 # Script to convert the output of build_image.sh to a usb image. | 7 # Script to convert the output of build_image.sh to a usb image. |
8 | 8 |
9 # Load common constants. This should be the first executable line. | 9 # Load common constants. This should be the first executable line. |
10 # The path to common.sh should be relative to your script's location. | 10 # The path to common.sh should be relative to your script's location. |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 --arch="${FLAGS_arch}" \ | 256 --arch="${FLAGS_arch}" \ |
257 --payload_image="${SRC_IMAGE}" \ | 257 --payload_image="${SRC_IMAGE}" \ |
258 --dst="${FLAGS_to}" | 258 --dst="${FLAGS_to}" |
259 fi | 259 fi |
260 echo "Done." | 260 echo "Done." |
261 else | 261 else |
262 # Output to a file, so just make a copy. | 262 # Output to a file, so just make a copy. |
263 echo "Copying ${SRC_IMAGE} to ${FLAGS_to}..." | 263 echo "Copying ${SRC_IMAGE} to ${FLAGS_to}..." |
264 cp -f "${SRC_IMAGE}" "${FLAGS_to}" | 264 cp -f "${SRC_IMAGE}" "${FLAGS_to}" |
265 | 265 |
266 echo "Done. To copy to a USB drive, outside the chroot, do something like:" | 266 echo "Done. To copy to a USB drive, do something like:" |
267 echo " sudo dd if=${FLAGS_to} of=/dev/sdX bs=4M" | 267 echo " sudo dd if=${FLAGS_to} of=/dev/sdX bs=4M oflag=sync" |
268 echo "where /dev/sdX is the entire drive." | 268 echo "where /dev/sdX is the entire drive." |
269 if [ ${INSIDE_CHROOT} -eq 1 ] | |
270 then | |
271 example=$(basename "${FLAGS_to}") | |
272 echo "NOTE: Since you are currently inside the chroot, and you'll need to" | |
273 echo "run dd outside the chroot, the path to the USB image will be" | |
274 echo "different (ex: ~/chromeos/trunk/src/build/images/SOME_DIR/$example)." | |
275 fi | |
276 fi | 269 fi |
OLD | NEW |