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 modify a keyfob-based chromeos system image for testability. | 7 # Script to modify a keyfob-based chromeos system image for testability. |
8 | 8 |
9 # --- BEGIN COMMON.SH BOILERPLATE --- | 9 # --- BEGIN COMMON.SH BOILERPLATE --- |
10 # Load common CrOS utilities. Inside the chroot this file is installed in | 10 # Load common CrOS utilities. Inside the chroot this file is installed in |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 | 54 |
55 | 55 |
56 # Parse command line | 56 # Parse command line |
57 FLAGS "$@" || exit 1 | 57 FLAGS "$@" || exit 1 |
58 eval set -- "${FLAGS_ARGV}" | 58 eval set -- "${FLAGS_ARGV}" |
59 | 59 |
60 EMERGE_CMD="emerge" | 60 EMERGE_CMD="emerge" |
61 EMERGE_BOARD_CMD="emerge-${FLAGS_board}" | 61 EMERGE_BOARD_CMD="emerge-${FLAGS_board}" |
62 if [ "${FLAGS_fast}" -eq "${FLAGS_TRUE}" ]; then | 62 if [ "${FLAGS_fast}" -eq "${FLAGS_TRUE}" ]; then |
63 echo "Using alternate emerge" | 63 echo "Using alternate emerge" |
64 EMERGE_CMD="${SCRIPTS_DIR}/parallel_emerge" | 64 EMERGE_CMD="${GCLIENT_ROOT}/chromite/bin/parallel_emerge" |
65 EMERGE_BOARD_CMD="${EMERGE_CMD} --board=${FLAGS_board}" | 65 EMERGE_BOARD_CMD="${EMERGE_CMD} --board=${FLAGS_board}" |
66 fi | 66 fi |
67 | 67 |
68 # No board, no default and no image set then we can't find the image | 68 # No board, no default and no image set then we can't find the image |
69 if [ -z $FLAGS_image ] && [ -z $FLAGS_board ] ; then | 69 if [ -z $FLAGS_image ] && [ -z $FLAGS_board ] ; then |
70 setup_board_warning | 70 setup_board_warning |
71 die "mod_image_for_test failed. No board set and no image set" | 71 die "mod_image_for_test failed. No board set and no image set" |
72 fi | 72 fi |
73 | 73 |
74 # We have a board name but no image set. Use image at default location | 74 # We have a board name but no image set. Use image at default location |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 cleanup | 245 cleanup |
246 | 246 |
247 # Now make it bootable with the flags from build_image | 247 # Now make it bootable with the flags from build_image |
248 "${SCRIPTS_DIR}/bin/cros_make_image_bootable" "$(dirname "${FLAGS_image}")" \ | 248 "${SCRIPTS_DIR}/bin/cros_make_image_bootable" "$(dirname "${FLAGS_image}")" \ |
249 $(basename "${FLAGS_image}") | 249 $(basename "${FLAGS_image}") |
250 | 250 |
251 print_time_elapsed | 251 print_time_elapsed |
252 | 252 |
253 trap - EXIT | 253 trap - EXIT |
254 | 254 |
OLD | NEW |