mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-08 13:36:58 +02:00
Use new cgpt tool when creating images and the pack/unpack scripts.
Review URL: http://codereview.chromium.org/2792011
This commit is contained in:
parent
6f17b5e5fe
commit
fc752ffdfa
@ -87,6 +87,7 @@ export CHROME_BASE=
|
||||
# directory containing chrome-chromeos.zip - an svn rev or a full version
|
||||
export CHROME_BUILD=
|
||||
|
||||
# Print version info.
|
||||
# Print (and remember) version info.
|
||||
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/^/ /'
|
||||
|
@ -26,7 +26,7 @@ UNPACK="${DIR}/unpack_partitions.sh"
|
||||
locate_gpt
|
||||
|
||||
TMP=$(mktemp)
|
||||
sudo $GPT -r show -l "$IMAGE" > $TMP
|
||||
$GPT show "$IMAGE" > $TMP
|
||||
|
||||
HEADER='#!/bin/sh -eu
|
||||
# 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/^/# /' >> "$UNPACK"
|
||||
|
||||
sort -n -k 3 $TMP | \
|
||||
grep 'GPT part -' | \
|
||||
while read start size part x x x label x; do \
|
||||
$GPT show -q "$IMAGE" | \
|
||||
while read start size part x; do \
|
||||
file="part_$part"
|
||||
loc="\"\$TARGET\""
|
||||
echo "dd if=$loc of=$file bs=512 skip=$start count=$size" \
|
||||
|
@ -11,6 +11,7 @@
|
||||
|
||||
# For functions related to gpt images.
|
||||
. "$(dirname "$0")/chromeos-common.sh"
|
||||
locate_gpt
|
||||
|
||||
get_default_board
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user