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

Unified Diff: scripts/image_signing/swap_rootfs.sh

Issue 3529007: Add a script to put in a rootfs from one image into another. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/vboot_reference.git
Patch Set: fix space Created 10 years, 3 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 | « scripts/image_signing/sign_official_build.sh ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scripts/image_signing/swap_rootfs.sh
diff --git a/scripts/image_signing/swap_rootfs.sh b/scripts/image_signing/swap_rootfs.sh
new file mode 100755
index 0000000000000000000000000000000000000000..f4564b08db593656f5129c2ef98ef4392372ab3a
--- /dev/null
+++ b/scripts/image_signing/swap_rootfs.sh
@@ -0,0 +1,29 @@
+#!/bin/bash
+
+# Copyright (c) 2010 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.
+
+# Load common constants and variables.
+. "$(dirname "$0")/common.sh"
+
+# Print usage string
+usage() {
+ cat <<EOF
+Usage: $PROG dst_image src_image
+This will put the root file system from src_image into dst_image.
+EOF
+}
+
+if [ $# -ne 2 ]; then
+ usage
+ exit 1
+fi
+
+DST_IMAGE=$1
+SRC_IMAGE=$2
+
+temp_rootfs=$(make_temp_file)
+extract_image_partition ${SRC_IMAGE} 3 ${temp_rootfs}
+replace_image_partition ${DST_IMAGE} 3 ${temp_rootfs}
+echo "RootFS from ${SRC_IMAGE} was copied into ${DST_IMAGE}"
« no previous file with comments | « scripts/image_signing/sign_official_build.sh ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698