Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(93)

Side by Side Diff: image_to_usb.sh

Issue 3448022: build_image: Merge x86 and ARM where possible. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/crosutils.git
Patch Set: Codereview ate my homework. Created 10 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « create_esp.sh ('k') | update_bootloaders.sh » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 236
237 if [ ${FLAGS_install} -ne ${FLAGS_TRUE} ]; then 237 if [ ${FLAGS_install} -ne ${FLAGS_TRUE} ]; then
238 echo "Copying ${SRC_IMAGE} to ${FLAGS_to}..." 238 echo "Copying ${SRC_IMAGE} to ${FLAGS_to}..."
239 sudo dd if="${SRC_IMAGE}" of="${FLAGS_to}" bs=4M 239 sudo dd if="${SRC_IMAGE}" of="${FLAGS_to}" bs=4M
240 sync 240 sync
241 else 241 else
242 if [ ${INSIDE_CHROOT} -ne 1 ]; then 242 if [ ${INSIDE_CHROOT} -ne 1 ]; then
243 echo "Installation must be done from inside the chroot." 243 echo "Installation must be done from inside the chroot."
244 exit 1 244 exit 1
245 fi 245 fi
246 #TODO(kwaters): fix when verified root works on ARM
247 [ "${FLAGS_arch}" = "ARM" ] && SKIP_VBLOCK="--skip_vblock"
248 246
249 echo "Installing ${SRC_IMAGE} to ${FLAGS_to}..." 247 echo "Installing ${SRC_IMAGE} to ${FLAGS_to}..."
250 "${FLAGS_build_root}/${FLAGS_board}/usr/sbin/chromeos-install" \ 248 "${FLAGS_build_root}/${FLAGS_board}/usr/sbin/chromeos-install" \
251 --yes \ 249 --yes \
252 --skip_src_removable \ 250 --skip_src_removable \
253 --skip_dst_removable \ 251 --skip_dst_removable \
254 ${SKIP_VBLOCK:-} \
255 --arch="${FLAGS_arch}" \ 252 --arch="${FLAGS_arch}" \
256 --payload_image="${SRC_IMAGE}" \ 253 --payload_image="${SRC_IMAGE}" \
257 --dst="${FLAGS_to}" 254 --dst="${FLAGS_to}"
258 fi 255 fi
259 echo "Done." 256 echo "Done."
260 else 257 else
261 # Output to a file, so just make a copy. 258 # Output to a file, so just make a copy.
262 echo "Copying ${SRC_IMAGE} to ${FLAGS_to}..." 259 echo "Copying ${SRC_IMAGE} to ${FLAGS_to}..."
263 cp -f "${SRC_IMAGE}" "${FLAGS_to}" 260 cp -f "${SRC_IMAGE}" "${FLAGS_to}"
264 261
265 echo "Done. To copy to a USB drive, outside the chroot, do something like:" 262 echo "Done. To copy to a USB drive, outside the chroot, do something like:"
266 echo " sudo dd if=${FLAGS_to} of=/dev/sdX bs=4M" 263 echo " sudo dd if=${FLAGS_to} of=/dev/sdX bs=4M"
267 echo "where /dev/sdX is the entire drive." 264 echo "where /dev/sdX is the entire drive."
268 if [ ${INSIDE_CHROOT} -eq 1 ] 265 if [ ${INSIDE_CHROOT} -eq 1 ]
269 then 266 then
270 example=$(basename "${FLAGS_to}") 267 example=$(basename "${FLAGS_to}")
271 echo "NOTE: Since you are currently inside the chroot, and you'll need to" 268 echo "NOTE: Since you are currently inside the chroot, and you'll need to"
272 echo "run dd outside the chroot, the path to the USB image will be" 269 echo "run dd outside the chroot, the path to the USB image will be"
273 echo "different (ex: ~/chromeos/trunk/src/build/images/SOME_DIR/$example)." 270 echo "different (ex: ~/chromeos/trunk/src/build/images/SOME_DIR/$example)."
274 fi 271 fi
275 fi 272 fi
OLDNEW
« no previous file with comments | « create_esp.sh ('k') | update_bootloaders.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698