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

Unified Diff: scripts/image_signing/resign_firmwarefd.sh

Issue 6516004: Support new style flashmap labels for firmware signing (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/vboot_reference.git@master
Patch Set: Created 9 years, 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scripts/image_signing/resign_firmwarefd.sh
diff --git a/scripts/image_signing/resign_firmwarefd.sh b/scripts/image_signing/resign_firmwarefd.sh
index 363347181f6dcf3fc4dc34f763f26a30495382ba..42412ef49c1c2da817710af9f043fe4ae2ade82b 100755
--- a/scripts/image_signing/resign_firmwarefd.sh
+++ b/scripts/image_signing/resign_firmwarefd.sh
@@ -81,15 +81,21 @@ echo "Using firmware version: $VERSION"
# Parse offsets and size of firmware data and vblocks
for i in "A" "B"
do
- match_str="$i Key"
- line=$(mosys -f -k eeprom map $1 | grep "$match_str")
+ line=$(mosys -f -k eeprom map $1 | grep "$i Key") ||
+ line=$(mosys -f -k eeprom map $1 | grep "VBLOCK_$i") ||
+ { echo "Couldn't parse vblock section $i from mosys output";
+ exit 1; }
+
offset="$(echo $line | sed -e 's/.*area_offset=\"\([a-f0-9x]*\)\".*/\1/')"
eval fw${i}_vblock_offset=$((offset))
size="$(echo $line | sed -e 's/.*area_size=\"\([a-f0-9x]*\)\".*/\1/')"
eval fw${i}_vblock_size=$((size))
- match_str="$i Data"
- line=$(mosys -f -k eeprom map $1 | grep "$match_str")
+ line=$(mosys -f -k eeprom map $1 | grep "$i Data") ||
+ line=$(mosys -f -k eeprom map $1 | grep "FW_MAIN_$i") ||
+ { echo "Couldn't parse Firmware $i section from mosys output";
+ exit 1; }
+
offset="$(echo $line | sed -e 's/.*area_offset=\"\([a-f0-9x]*\)\".*/\1/')"
eval fw${i}_offset=$((offset))
size="$(echo $line | sed -e 's/.*area_size=\"\([a-f0-9x]*\)\".*/\1/')"
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698