OLD | NEW |
1 #!/bin/sh -ex | 1 #!/bin/sh -ex |
2 | 2 |
3 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 3 # Copyright (c) 2010 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 . "$(dirname "$0")/chromeos-common.sh" | 7 . "$(dirname "$0")/chromeos-common.sh" |
8 . "/opt/google/memento_updater/memento_updater_logging.sh" | 8 . "/opt/google/memento_updater/memento_updater_logging.sh" |
9 . "/opt/google/memento_updater/find_omaha.sh" | 9 . "/opt/google/memento_updater/find_omaha.sh" |
10 | 10 |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 } | 71 } |
72 | 72 |
73 log "Starting Factory Installer." | 73 log "Starting Factory Installer." |
74 | 74 |
75 log "Checking for Firmware Write Protect" | 75 log "Checking for Firmware Write Protect" |
76 | 76 |
77 # Only ChromeOS machines have meaninful output here. | 77 # Only ChromeOS machines have meaninful output here. |
78 if crossystem hwid >/dev/null; then | 78 if crossystem hwid >/dev/null; then |
79 # Check for physical firmware write protect. We'll only | 79 # Check for physical firmware write protect. We'll only |
80 # clear this stuff if the case is open. | 80 # clear this stuff if the case is open. |
81 if [ "$(crossystem wpsw_cur)" = "0" ; then | 81 if [ "$(crossystem wpsw_cur)" = "0" ]; then |
82 # Ensure that flash chips are in a known good state. | 82 # Ensure that flash chips are in a known good state. |
83 clear_fwwp | 83 clear_fwwp |
84 | 84 |
85 # Ensure that we can wipe TPM if necessary. | 85 # Ensure that we can wipe TPM if necessary. |
86 clear_tpm | 86 clear_tpm |
87 fi | 87 fi |
88 fi | 88 fi |
89 | 89 |
90 log "Waiting for ethernet connectivity to install" | 90 log "Waiting for ethernet connectivity to install" |
91 log "Or disable developer mode to factory reset." | 91 log "Or disable developer mode to factory reset." |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 dd if=/dev/zero of=${DST_DRIVE}$((${DST_RELEASE_PART} - 1)) | 219 dd if=/dev/zero of=${DST_DRIVE}$((${DST_RELEASE_PART} - 1)) |
220 dd if=/dev/zero of=${DST_DRIVE}$((${DST_FACTORY_PART} - 1)) | 220 dd if=/dev/zero of=${DST_DRIVE}$((${DST_FACTORY_PART} - 1)) |
221 exit 1 | 221 exit 1 |
222 fi | 222 fi |
223 | 223 |
224 log "All done installing." | 224 log "All done installing." |
225 | 225 |
226 sleep 3 | 226 sleep 3 |
227 shutdown -r now | 227 shutdown -r now |
228 sleep 1d # sleep indefinitely to avoid respawning rather than shutting down | 228 sleep 1d # sleep indefinitely to avoid respawning rather than shutting down |
OLD | NEW |