Use new cgpt tool when creating images and the pack/unpack scripts.

Review URL: http://codereview.chromium.org/2792011
This commit is contained in:
Bill Richardson 2010-06-11 09:16:09 -07:00
parent 6f17b5e5fe
commit fc752ffdfa
3 changed files with 7 additions and 6 deletions

View File

@ -87,6 +87,7 @@ export CHROME_BASE=
# directory containing chrome-chromeos.zip - an svn rev or a full version # directory containing chrome-chromeos.zip - an svn rev or a full version
export CHROME_BUILD= export CHROME_BUILD=
# Print version info. # Print (and remember) version info.
echo "ChromeOS version information:" echo "ChromeOS version information:"
env | egrep '^CHROMEOS_VERSION|CHROME_' | sed 's/^/ /' logvers="/tmp/version_${CHROMEOS_VERSION_STRING}"
env | egrep '^CHROMEOS_VERSION|CHROME_' | tee $logvers | sed 's/^/ /'

View File

@ -26,7 +26,7 @@ UNPACK="${DIR}/unpack_partitions.sh"
locate_gpt locate_gpt
TMP=$(mktemp) TMP=$(mktemp)
sudo $GPT -r show -l "$IMAGE" > $TMP $GPT show "$IMAGE" > $TMP
HEADER='#!/bin/sh -eu HEADER='#!/bin/sh -eu
# File generated by emit_gpt_scripts.sh. Do not edit. # File generated by emit_gpt_scripts.sh. Do not edit.
@ -42,9 +42,8 @@ echo "$HEADER" > "$UNPACK"
cat $TMP | sed -e 's/^/# /' >> "$PACK" cat $TMP | sed -e 's/^/# /' >> "$PACK"
cat $TMP | sed -e 's/^/# /' >> "$UNPACK" cat $TMP | sed -e 's/^/# /' >> "$UNPACK"
sort -n -k 3 $TMP | \ $GPT show -q "$IMAGE" | \
grep 'GPT part -' | \ while read start size part x; do \
while read start size part x x x label x; do \
file="part_$part" file="part_$part"
loc="\"\$TARGET\"" loc="\"\$TARGET\""
echo "dd if=$loc of=$file bs=512 skip=$start count=$size" \ echo "dd if=$loc of=$file bs=512 skip=$start count=$size" \

View File

@ -11,6 +11,7 @@
# For functions related to gpt images. # For functions related to gpt images.
. "$(dirname "$0")/chromeos-common.sh" . "$(dirname "$0")/chromeos-common.sh"
locate_gpt
get_default_board get_default_board