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

Unified Diff: src/platform/firmware/x86-generic/pack_firmware.sh

Issue 2366001: Pack firmware into an image and do update in factory install process. (Closed) Base URL: ssh://git@chromiumos-git/chromiumos
Patch Set: add 2 emtpy firmware images Created 10 years, 7 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
Index: src/platform/firmware/x86-generic/pack_firmware.sh
diff --git a/src/platform/firmware/x86-generic/pack_firmware.sh b/src/platform/firmware/x86-generic/pack_firmware.sh
new file mode 100755
index 0000000000000000000000000000000000000000..2f45cfb55922b57e1ddf30f478b98e3ce1c2238f
--- /dev/null
+++ b/src/platform/firmware/x86-generic/pack_firmware.sh
@@ -0,0 +1,37 @@
+#!/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. This should be the first executable line.
+# The path to common.sh should be relative to your script's location.
+. "$(dirname "$0")/../../../scripts/common.sh"
+
+DEFINE_string to "-" "Path of the output image; if \\\"-\\\", meaning stdout."
+
+# Parse command line
+FLAGS "$@" || exit 1
+eval set -- "${FLAGS_ARGV}"
+
+# List the files need to be packed.
+PACK_FILES="system_rom.bin ec_rom.bin"
+
+for file in ${PACK_FILES}; do
+ if [ ! -e ${file} ]; then
+ echo "File ${file} does not exist." >&2
+ exit 1
+ fi
+done
+
+TMP_FILE="/tmp/firmware"
+cp -f install_firmware.sh "${TMP_FILE}"
+tar zcO ${PACK_FILES} | uuencode packed_files.tgz >> "${TMP_FILE}"
+
+if [ ${FLAGS_to} = "-" ]; then
+ cat "${TMP_FILE}"
+ rm -f "${TMP_FILE}"
+else
+ mv "${TMP_FILE}" "${FLAGS_to}"
+ echo "Packed output image is: ${FLAGS_to}"
+fi
« no previous file with comments | « src/platform/firmware/x86-generic/install_firmware.sh ('k') | src/platform/firmware/x86-generic/system_rom.bin » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698