aboutsummaryrefslogtreecommitdiff
path: root/image_chromeos.py
diff options
context:
space:
mode:
authorLuis Lozano <llozano@chromium.org>2013-03-15 14:44:13 -0700
committerChromeBot <chrome-bot@google.com>2013-03-15 15:51:37 -0700
commitf81680c018729fd4499e1e200d04b48c4b90127c (patch)
tree940608da8374604b82edfdb2d7df55d065f05d4c /image_chromeos.py
parent2296ee0b914aba5bba07becab4ff68884ce9b8a5 (diff)
downloadtoolchain-utils-f81680c018729fd4499e1e200d04b48c4b90127c.tar.gz
Cleaned up directory after copy of tools from perforce directory
Got rid of stale copies of some tools like "crosperf" and moved all files under v14 directory (that came from perforce) into the top directory. BUG=None TEST=None Change-Id: I408d17a36ceb00e74db71403d2351fd466a14f8e Reviewed-on: https://gerrit-int.chromium.org/33887 Tested-by: Luis Lozano <llozano@chromium.org> Reviewed-by: Yunlian Jiang <yunlian@google.com> Commit-Queue: Luis Lozano <llozano@chromium.org>
Diffstat (limited to 'image_chromeos.py')
-rwxr-xr-ximage_chromeos.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/image_chromeos.py b/image_chromeos.py
index 30b29a45..d5d5f7fe 100755
--- a/image_chromeos.py
+++ b/image_chromeos.py
@@ -171,6 +171,7 @@ def DoImage(argv):
options.remote)
logger.GetLogger().LogFatalIf(not successfully_imaged,
"Image verification failed!")
+ TryRemountPartitionAsRW(options.chromeos_root, options.remote)
else:
l.LogOutput("Checksums match. Skipping reimage")
return retval
@@ -268,6 +269,23 @@ def VerifyChromeChecksum(chromeos_root, image, remote):
else:
return False
+# Remount partition as writable.
+# TODO: auto-detect if an image is built using --noenable_rootfs_verification.
+def TryRemountPartitionAsRW(chromeos_root, remote):
+ l = logger.GetLogger()
+ cmd_executer = command_executer.GetCommandExecuter()
+ command = "sudo mount -o remount,rw /"
+ retval = cmd_executer.CrosRunCommand(\
+ command, chromeos_root=chromeos_root, machine=remote, terminated_timeout=10)
+ if retval:
+ ## Safely ignore.
+ l.LogWarning("Failed to remount partition as rw, "
+ "probably the image was not built with "
+ "\"--noenable_rootfs_verification\", "
+ "you can safely ignore this.")
+ else:
+ l.LogOutput("Re-mounted partition as writable.")
+
def EnsureMachineUp(chromeos_root, remote):
l = logger.GetLogger()