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

Side by Side Diff: pack_stub

Issue 6880299: fix mode=autoupdate on CR48 (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/firmware.git@master
Patch Set: check for zgb too Created 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/sh 1 #!/bin/sh
2 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 2 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 # Version information. Please keep this in head of the updater. 6 # Version information. Please keep this in head of the updater.
7 SHELLBALL_FWVERSION="REPLACE_FWVERSION" 7 SHELLBALL_FWVERSION="REPLACE_FWVERSION"
8 SHELLBALL_ECVERSION="REPLACE_ECVERSION" 8 SHELLBALL_ECVERSION="REPLACE_ECVERSION"
9 9
10 # All scripts should die on error unless commands are specifically excepted 10 # All scripts should die on error unless commands are specifically excepted
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 ;; 110 ;;
111 --sb_extract) 111 --sb_extract)
112 make_temp 112 make_temp
113 echo "The resources are extracted into: $TMP_DIR" 113 echo "The resources are extracted into: $TMP_DIR"
114 untar_and_chdir "$SELF" 114 untar_and_chdir "$SELF"
115 # Don't remove the temporary folder on exit. 115 # Don't remove the temporary folder on exit.
116 TMP_DIR="" 116 TMP_DIR=""
117 exit 0 117 exit 0
118 ;; 118 ;;
119 --mode=autoupdate) 119 --mode=autoupdate)
120 # This command is inside the stub for quick launch. 120 PLATFORM="$(/usr/sbin/mosys platform name 2>/dev/null || true)"
121 fw_version="$(crossystem fwid)" 121 # Mario uses the old updater.
122 ec_info="$(mosys -k ec info 2>/dev/null)" || ec_info="" 122 if [ "$PLATFORM" != "Mario" ] &&
123 ec_version="$(eval "$ec_info"; echo "$fw_version")" 123 [ "$PLATFORM" != "ZGA" ]; then
124 notify_update=0 124 # This command is inside the stub for quick launch.
125 verbose_message "ec_version: $ec_version ; ec_info: $ec_info" 125 fw_version="$(crossystem fwid)"
126 if [ "$SHELLBALL_FWVERSION" != "$fw_version" ] && 126 ec_info="$(mosys -k ec info 2>/dev/null)" || ec_info=""
127 [ "$SHELLBALL_FWVERSION" != "IGNORE" ]; then 127 ec_version="$(eval "$ec_info"; echo "$fw_version")"
128 echo "System firmware update available: [$SHELLBALL_FWVERSION]" 128 notify_update=0
129 echo "Currently installed system firmware: [$fw_version]" 129 verbose_message "ec_version: $ec_version ; ec_info: $ec_info"
130 notify_update=1 130 if [ "$SHELLBALL_FWVERSION" != "$fw_version" ] &&
131 fi 131 [ "$SHELLBALL_FWVERSION" != "IGNORE" ]; then
132 if [ "$SHELLBALL_ECVERSION" != "$ec_version" ] && 132 echo "System firmware update available: [$SHELLBALL_FWVERSION]"
133 [ "$SHELLBALL_ECVERSION" != "IGNORE" ]; then 133 echo "Currently installed system firmware: [$fw_version]"
134 echo "EC firmware update available: [$SHELLBALL_ECVERSION]" 134 notify_update=1
135 echo "Currently installed EC firmware: [$ec_version]" 135 fi
136 notify_update=1 136 if [ "$SHELLBALL_ECVERSION" != "$ec_version" ] &&
137 fi 137 [ "$SHELLBALL_ECVERSION" != "IGNORE" ]; then
138 if [ $notify_update -eq 0 ]; then 138 echo "EC firmware update available: [$SHELLBALL_ECVERSION]"
139 echo " 139 echo "Currently installed EC firmware: [$ec_version]"
140 No firmware auto update is available. Returning gracefully. 140 notify_update=1
141 " 141 fi
142 exit 0 142 if [ $notify_update -eq 0 ]; then
143 echo "
144 No firmware auto update is available. Returning gracefully.
145 "
146 exit 0
147 fi
143 fi 148 fi
144 break 149 break
145 ;; 150 ;;
146 --force) 151 --force)
147 force_flag=1 152 force_flag=1
148 shift 153 shift
149 ;; 154 ;;
150 -h|"-?"|--help) 155 -h|"-?"|--help)
151 echo "Shellball -- self-extract and install" 156 echo "Shellball -- self-extract and install"
152 echo "" 157 echo ""
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 fi 237 fi
233 fi 238 fi
234 239
235 verbose_message "Run built-in script ($SCRIPT) ..." 240 verbose_message "Run built-in script ($SCRIPT) ..."
236 if ! $SCRIPT "$@"; then 241 if ! $SCRIPT "$@"; then
237 error_exit "ERROR: $SCRIPT failed." 242 error_exit "ERROR: $SCRIPT failed."
238 fi 243 fi
239 exit 0 244 exit 0
240 245
241 # Below are uuencoded blob. Don't put code behind exit 0. 246 # Below are uuencoded blob. Don't put code behind exit 0.
OLDNEW
« 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