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 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 fi | 146 fi |
147 | 147 |
148 # Check for instqall shim. | 148 # Check for instqall shim. |
149 if [ ${FLAGS_factory_install} -eq ${FLAGS_TRUE} ] ; then | 149 if [ ${FLAGS_factory_install} -eq ${FLAGS_TRUE} ] ; then |
150 EXTRA_ARGS="--factory_install" | 150 EXTRA_ARGS="--factory_install" |
151 fi | 151 fi |
152 | 152 |
153 # Modify it. Pass --yes so that mod_image_for_test.sh won't ask us if we | 153 # Modify it. Pass --yes so that mod_image_for_test.sh won't ask us if we |
154 # really want to modify the image; the user gave their assent already with | 154 # really want to modify the image; the user gave their assent already with |
155 # --test-image and the original image is going to be preserved. | 155 # --test-image and the original image is going to be preserved. |
156 "${SCRIPTS_DIR}/mod_image_for_test.sh" --image \ | 156 "${SCRIPTS_DIR}/mod_image_for_test.sh" --image --board=${FLAGS_board} \ |
157 "${FLAGS_from}/chromiumos_test_image.bin" ${EXTRA_ARGS} --yes | 157 "${FLAGS_from}/chromiumos_test_image.bin" ${EXTRA_ARGS} --yes |
158 echo "Done with mod_image_for_test." | 158 echo "Done with mod_image_for_test." |
159 else | 159 else |
160 echo "Using cached test image." | 160 echo "Using cached test image." |
161 fi | 161 fi |
162 SRC_IMAGE="${FLAGS_from}/chromiumos_test_image.bin" | 162 SRC_IMAGE="${FLAGS_from}/chromiumos_test_image.bin" |
163 echo "Source test image is: ${SRC_IMAGE}" | 163 echo "Source test image is: ${SRC_IMAGE}" |
164 fi | 164 fi |
165 | 165 |
166 | 166 |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 echo " sudo dd if=${FLAGS_to} of=/dev/sdX bs=4M" | 226 echo " sudo dd if=${FLAGS_to} of=/dev/sdX bs=4M" |
227 echo "where /dev/sdX is the entire drive." | 227 echo "where /dev/sdX is the entire drive." |
228 if [ ${INSIDE_CHROOT} -eq 1 ] | 228 if [ ${INSIDE_CHROOT} -eq 1 ] |
229 then | 229 then |
230 example=$(basename "${FLAGS_to}") | 230 example=$(basename "${FLAGS_to}") |
231 echo "NOTE: Since you are currently inside the chroot, and you'll need to" | 231 echo "NOTE: Since you are currently inside the chroot, and you'll need to" |
232 echo "run dd outside the chroot, the path to the USB image will be" | 232 echo "run dd outside the chroot, the path to the USB image will be" |
233 echo "different (ex: ~/chromeos/trunk/src/build/images/SOME_DIR/$example)." | 233 echo "different (ex: ~/chromeos/trunk/src/build/images/SOME_DIR/$example)." |
234 fi | 234 fi |
235 fi | 235 fi |
OLD | NEW |