OLD | NEW |
1 #!/bin/sh -u | 1 #!/bin/sh -u |
2 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 2 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 # | 5 # |
6 # Run TPM diagnostics in recovery mode, and attempt to fix problems. This is | 6 # Run TPM diagnostics in recovery mode, and attempt to fix problems. This is |
7 # specific to devices with chromeos firmware. | 7 # specific to devices with chromeos firmware. |
8 # | 8 # |
9 # Usage: chromeos_tpm_recovery <log file> | 9 # Usage: chromeos-tpm-recovery <log file> |
10 # | 10 # |
11 # Most of the diagnostics examine the TPM state and try to fix it. This may | 11 # Most of the diagnostics examine the TPM state and try to fix it. This may |
12 # require clearing TPM ownership. | 12 # require clearing TPM ownership. |
13 | 13 |
14 tpmc=${USR_BIN:=/usr/bin}/tpmc | 14 tpmc=${USR_BIN:=/usr/bin}/tpmc |
15 nvtool=${USR_LOCAL_BIN:=/usr/local/bin}/tpm-nvtool | 15 nvtool=${USR_LOCAL_BIN:=/usr/local/bin}/tpm-nvtool |
16 tpm_takeownership=${USR_LOCAL_SBIN:=/usr/local/sbin}/tpm_takeownership | 16 tpm_takeownership=${USR_LOCAL_SBIN:=/usr/local/sbin}/tpm_takeownership |
17 tcsd=${USR_SBIN:=/usr/sbin}/tcsd | 17 tcsd=${USR_SBIN:=/usr/sbin}/tcsd |
18 dot_recovery=${DOT_RECOVERY:=/mnt/stateful_partition/.recovery} | 18 dot_recovery=${DOT_RECOVERY:=/mnt/stateful_partition/.recovery} |
19 acpi=${ACPI_DIR:=/sys/devices/platform/chromeos_acpi} | 19 acpi=${ACPI_DIR:=/sys/devices/platform/chromeos_acpi} |
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
328 fix_space 0x1008 0x1 0xd "01 4c 57 52 47 00 00 00 00 00 00 00 00" || \ | 328 fix_space 0x1008 0x1 0xd "01 4c 57 52 47 00 00 00 00 00 00 00 00" || \ |
329 log "could not fix kernel space" | 329 log "could not fix kernel space" |
330 | 330 |
331 # Cleanup: don't leave the tpm owned with the well-known password. | 331 # Cleanup: don't leave the tpm owned with the well-known password. |
332 if [ $tpm_owned_with_well_known_password -eq 1 ]; then | 332 if [ $tpm_owned_with_well_known_password -eq 1 ]; then |
333 tpm_clear_and_reenable | 333 tpm_clear_and_reenable |
334 fi | 334 fi |
335 | 335 |
336 ensure_tcsd_is_not_running | 336 ensure_tcsd_is_not_running |
337 log "tpm recovery has completed" | 337 log "tpm recovery has completed" |
OLD | NEW |