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

Issue 2795004: Pack firmware into an image and do update in factory install (separated git). (Closed)

Created:
10 years, 6 months ago by Tom Wai-Hong Tam
Modified:
9 years, 5 months ago
CC:
chromium-os-reviews_chromium.org
Base URL:
ssh://git@chromiumos-git/firmware.git
Visibility:
Public.

Description

Pack firmware into an image and do update in factory install (separated git). Since different platforms have different instructions to update their firmware. In order not to depend on the install shim, we pack all firmware update files into a single file, i.e. an executable shell script with embedded files. The original CL (http://codereview.chromium.org/2366001) is reviewed and is broken down into 5 CLs. This is one of them.

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+51 lines, -1 line) Patch
M README View 1 chunk +1 line, -2 lines 0 comments Download
A inherit-review-settings-ok View 0 chunks +-1 lines, --1 lines 0 comments Download
A x86-generic/ec_room.bin View Binary file 0 comments Download
A x86-generic/install_firmware.sh View 1 chunk +14 lines, -0 lines 0 comments Download
A x86-generic/pack_firmware.sh View 1 chunk +37 lines, -0 lines 0 comments Download
A x86-generic/system_rom.bin View Binary file 0 comments Download

Messages

Total messages: 2 (0 generated)
Tom Wai-Hong Tam
10 years, 6 months ago (2010-06-11 07:33:56 UTC) #1
adlr
10 years, 6 months ago (2010-06-11 17:19:58 UTC) #2
LGTM

On Fri, Jun 11, 2010 at 12:33 AM, <waihong@chromium.org> wrote:

> Reviewers: adlr, tammo, Nick Sanders,
>
> Description:
> Pack firmware into an image and do update in factory install (separated
> git).
>
> Since different platforms have different instructions to update their
> firmware.
> In order not to depend on the install shim, we pack all firmware update
> files
> into a single file, i.e. an executable shell script with embedded files.
>
> The original CL (http://codereview.chromium.org/2366001) is reviewed and
> is
> broken down into 5 CLs. This is one of them.
>
> Please review this at http://codereview.chromium.org/2795004/show
>
> SVN Base: ssh://git@chromiumos-git/firmware.git
>
> Affected files:
>  M README
>  A inherit-review-settings-ok
>  A x86-generic/ec_room.bin
>  A x86-generic/install_firmware.sh
>  A x86-generic/pack_firmware.sh
>  A x86-generic/system_rom.bin
>
>
> Index: README
> diff --git a/README b/README
> index
>
fc25c5f28b93b86c66a1c0e84f9f425f516ec5d7..a3630df0a72eaafeceb028b4aa6abeae9c7cc44f
> 100644
> --- a/README
> +++ b/README
> @@ -1,2 +1 @@
> -First checkin.
> -.
> +This directory contains the firmware images and install scripts for BIOS
> and EC.
> Index: inherit-review-settings-ok
> diff --git a/inherit-review-settings-ok b/inherit-review-settings-ok
> new file mode 100644
> index
>
0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
> Index: x86-generic/ec_room.bin
> diff --git a/x86-generic/ec_room.bin b/x86-generic/ec_room.bin
> new file mode 100644
> index
>
0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
> Index: x86-generic/install_firmware.sh
> diff --git a/x86-generic/install_firmware.sh
> b/x86-generic/install_firmware.sh
> new file mode 100644
> index
>
0000000000000000000000000000000000000000..6f88bb9a72945028a498dd2805ccb9905aaac6c0
> --- /dev/null
> +++ b/x86-generic/install_firmware.sh
> @@ -0,0 +1,14 @@
> +#!/bin/sh
> +
> +# 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.
> +
> +uudecode -o - $0 | tar zxf -
> +
> +echo "Flash system firmware..."
> +
> +echo "Flash EC firmware..."
> +
> +exit 0
> +
> Index: x86-generic/pack_firmware.sh
> diff --git a/x86-generic/pack_firmware.sh b/x86-generic/pack_firmware.sh
> new file mode 100644
> index
>
0000000000000000000000000000000000000000..2f45cfb55922b57e1ddf30f478b98e3ce1c2238f
> --- /dev/null
> +++ b/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
> Index: x86-generic/system_rom.bin
> diff --git a/x86-generic/system_rom.bin b/x86-generic/system_rom.bin
> new file mode 100644
> index
>
0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
>
>
>

Powered by Google App Engine
This is Rietveld 408576698