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 # 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. |
11 . "$(dirname "$0")/common.sh" | 11 . "$(dirname "$0")/common.sh" |
12 | 12 |
13 # Load functions and constants for chromeos-install | 13 # Load functions and constants for chromeos-install |
14 . "$(dirname "$0")/chromeos-common.sh" | 14 . "$(dirname "$0")/chromeos-common.sh" |
15 | 15 |
| 16 if [ ${INSIDE_CHROOT} -eq 0 ] ; then |
| 17 "$(dirname "$0")/enter_chroot.sh" ./mod_image_for_test.sh "$@" |
| 18 exit 0 |
| 19 fi |
| 20 |
16 get_default_board | 21 get_default_board |
17 | 22 |
18 DEFINE_string board "$DEFAULT_BOARD" "Board for which the image was built" | 23 DEFINE_string board "$DEFAULT_BOARD" "Board for which the image was built" |
19 DEFINE_string qualdb "/tmp/run_remote_tests.*" \ | 24 DEFINE_string qualdb "/tmp/run_remote_tests.*" \ |
20 "Location of qualified component file" | 25 "Location of qualified component file" |
21 DEFINE_string image "" "Location of the rootfs raw image file" | 26 DEFINE_string image "" "Location of the rootfs raw image file" |
22 DEFINE_boolean factory $FLAGS_FALSE "Modify the image for manufacturing testing" | 27 DEFINE_boolean factory $FLAGS_FALSE "Modify the image for manufacturing testing" |
23 DEFINE_boolean yes $FLAGS_FALSE "Answer yes to all prompts" "y" | 28 DEFINE_boolean yes $FLAGS_FALSE "Answer yes to all prompts" "y" |
24 | 29 |
25 # Parse command line | 30 # Parse command line |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 MOD_FACTORY_ROOT="${GCLIENT_ROOT}/src/scripts/mod_for_factory_scripts" | 150 MOD_FACTORY_ROOT="${GCLIENT_ROOT}/src/scripts/mod_for_factory_scripts" |
146 # Run factory setup script to modify the image | 151 # Run factory setup script to modify the image |
147 sudo GCLIENT_ROOT="${GCLIENT_ROOT}" ROOT_FS_DIR="${ROOT_FS_DIR}" \ | 152 sudo GCLIENT_ROOT="${GCLIENT_ROOT}" ROOT_FS_DIR="${ROOT_FS_DIR}" \ |
148 STATEFUL_DIR="${STATEFUL_DIR}/dev_image" QUALDB="${FLAGS_qualdb}" \ | 153 STATEFUL_DIR="${STATEFUL_DIR}/dev_image" QUALDB="${FLAGS_qualdb}" \ |
149 "${MOD_FACTORY_ROOT}/factory_setup.sh" | 154 "${MOD_FACTORY_ROOT}/factory_setup.sh" |
150 fi | 155 fi |
151 | 156 |
152 cleanup | 157 cleanup |
153 trap - EXIT | 158 trap - EXIT |
154 | 159 |
OLD | NEW |