Chromium Code Reviews| 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 generate a factory install partition set and miniomaha.conf | 7 # Script to generate a factory install partition set and miniomaha.conf |
| 8 # file from a release image and a factory image. This creates a server | 8 # file from a release image and a factory image. This creates a server |
| 9 # configuration that can be installed using a factory install shim. | 9 # configuration that can be installed using a factory install shim. |
| 10 # | 10 # |
| 11 # miniomaha lives in src/platform/dev/ and miniomaha partition sets live | 11 # miniomaha lives in src/platform/dev/ and miniomaha partition sets live |
| 12 # in src/platform/dev/static. | 12 # in src/platform/dev/static. |
| 13 | 13 |
| 14 # Load common constants. This should be the first executable line. | 14 # Load common constants. This should be the first executable line. |
| 15 # The path to common.sh should be relative to your script's location. | 15 # The path to common.sh should be relative to your script's location. |
| 16 . "$(dirname "$0")/common.sh" | 16 . "$(dirname "$0")/common.sh" |
| 17 | 17 |
| 18 # Load functions and constants for chromeos-install | 18 # Load functions and constants for chromeos-install |
| 19 . "$(dirname "$0")/chromeos-common.sh" | 19 . "$(dirname "$0")/chromeos-common.sh" |
| 20 | 20 |
| 21 # Load functions designed for image processing | 21 # Load functions designed for image processing |
| 22 . "$(dirname "$0")/image_common.sh" | 22 LIB_CROS_IMAGE_COMMON="$(dirname "$0")/lib/cros_image_common.sh" |
| 23 [ -f "$LIB_CROS_IMAGE_COMMON" ] || | |
|
sosa
2010/11/12 19:42:02
Why do you do these extra checks here for include
Hung-Te
2010/11/12 19:56:25
There's some plan to create a mini factory bundle
| |
| 24 LIB_CROS_IMAGE_COMMON="$(dirname "$0")/cros_image_common.sh" | |
| 25 if ! . "$LIB_CROS_IMAGE_COMMON"; then | |
| 26 echo "ERROR: Cannot load required library: $LIB_CROS_IMAGE_COMMON. Abort." | |
| 27 exit 1 | |
| 28 fi | |
| 23 | 29 |
| 24 get_default_board | 30 get_default_board |
| 25 | 31 |
| 26 # Flags | 32 # Flags |
| 27 DEFINE_string board "${DEFAULT_BOARD}" "Board for which the image was built" | 33 DEFINE_string board "${DEFAULT_BOARD}" "Board for which the image was built" |
| 28 DEFINE_string factory "" \ | 34 DEFINE_string factory "" \ |
| 29 "Directory and file containing factory image: /path/chromiumos_test_image.bin" | 35 "Directory and file containing factory image: /path/chromiumos_test_image.bin" |
| 30 DEFINE_string firmware_updater "" \ | 36 DEFINE_string firmware_updater "" \ |
| 31 "If set, include the firmware shellball into the server configuration" | 37 "If set, include the firmware shellball into the server configuration" |
| 32 DEFINE_string release "" \ | 38 DEFINE_string release "" \ |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 249 }, | 255 }, |
| 250 ] | 256 ] |
| 251 " >> ${OMAHA_DIR}/miniomaha.conf | 257 " >> ${OMAHA_DIR}/miniomaha.conf |
| 252 | 258 |
| 253 echo "The miniomaha server lives in src/platform/dev" | 259 echo "The miniomaha server lives in src/platform/dev" |
| 254 echo "to validate the configutarion, run:" | 260 echo "to validate the configutarion, run:" |
| 255 echo " python2.6 devserver.py --factory_config miniomaha.conf \ | 261 echo " python2.6 devserver.py --factory_config miniomaha.conf \ |
| 256 --validate_factory_config" | 262 --validate_factory_config" |
| 257 echo "To run the server:" | 263 echo "To run the server:" |
| 258 echo " python2.6 devserver.py --factory_config miniomaha.conf" | 264 echo " python2.6 devserver.py --factory_config miniomaha.conf" |
| OLD | NEW |