Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(115)

Unified Diff: factory_install.sh

Issue 6840031: Clear TPM if software firmware WP is disabled (Closed) Base URL: ssh://gitrw.chromium.org:9222/factory_installer.git@master
Patch Set: Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: factory_install.sh
diff --git a/factory_install.sh b/factory_install.sh
index fef4779bf76d198f6a1bc4fdfb7650f9897b34ef..dc0cb43f2b9a41bfc678ed30389cfb28c9b3d747 100644
--- a/factory_install.sh
+++ b/factory_install.sh
@@ -1,6 +1,6 @@
#!/bin/sh -ex
-# Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
+# Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
@@ -89,9 +89,14 @@ if crossystem hwid >/dev/null; then
# Check for physical firmware write protect. We'll only
# clear this stuff if the case is open.
if [ "$(crossystem wpsw_cur)" = "0" ]; then
- # Ensure that flash chips are in a known good state.
+ # Clear software firmware write protect.
clear_fwwp
+ fi
+ # Check for software firmware write protect. We only clear the TPM if
+ # software write protect is disabled.
+ if flashrom -p internal:bus=spi --wp-status 2>/dev/null |
+ grep -q "write protect is disabled"; then
# Ensure that we can wipe TPM if necessary.
clear_tpm
fi
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698