OLD | NEW |
---|---|
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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
142 root shell: | 142 root shell: |
143 | 143 |
144 sudo chromeos-firmwareupdate --mode=recovery | 144 sudo chromeos-firmwareupdate --mode=recovery |
145 " | 145 " |
146 fi | 146 fi |
147 | 147 |
148 # TODO(hungte) add some info here to tell user how to update firmware | 148 # TODO(hungte) add some info here to tell user how to update firmware |
149 exit 0 | 149 exit 0 |
150 ;; | 150 ;; |
151 --mode=autoupdate) | 151 --mode=autoupdate) |
152 # This command is inside the stub for quick launch. | 152 PLATFORM=$(mosys platform name) |
153 fw_version="$(crossystem fwid)" | 153 # Mario uses the old updater. |
154 ec_info="$(mosys -k ec info 2>/dev/null)" || ec_info="" | 154 if [ "${PLATFORM}" != "Mario" ]; then |
jrbarnette
2011/04/29 22:23:36
Further down in this script (lines 232-234), there
Stefan Reinauer
2011/04/29 22:43:53
You are right, I will fix it to include ZGA too. N
| |
155 ec_version="$(eval "$ec_info"; echo "$fw_version")" | 155 # This command is inside the stub for quick launch. |
156 notify_update=0 | 156 fw_version="$(crossystem fwid)" |
157 verbose_message "ec_version: $ec_version ; ec_info: $ec_info" | 157 ec_info="$(mosys -k ec info 2>/dev/null)" || ec_info="" |
158 if [ "$SHELLBALL_FWVERSION" != "$fw_version" ] && | 158 ec_version="$(eval "$ec_info"; echo "$fw_version")" |
159 [ "$SHELLBALL_FWVERSION" != "IGNORE" ]; then | 159 notify_update=0 |
160 echo "System firmware update available: [$SHELLBALL_FWVERSION]" | 160 verbose_message "ec_version: $ec_version ; ec_info: $ec_info" |
161 echo "Currently installed system firmware: [$fw_version]" | 161 if [ "$SHELLBALL_FWVERSION" != "$fw_version" ] && |
162 notify_update=1 | 162 [ "$SHELLBALL_FWVERSION" != "IGNORE" ]; then |
163 fi | 163 echo "System firmware update available: [$SHELLBALL_FWVERSION]" |
164 if [ "$SHELLBALL_ECVERSION" != "$ec_version" ] && | 164 echo "Currently installed system firmware: [$fw_version]" |
165 [ "$SHELLBALL_ECVERSION" != "IGNORE" ]; then | 165 notify_update=1 |
166 echo "EC firmware update available: [$SHELLBALL_ECVERSION]" | 166 fi |
167 echo "Currently installed EC firmware: [$ec_version]" | 167 if [ "$SHELLBALL_ECVERSION" != "$ec_version" ] && |
168 notify_update=1 | 168 [ "$SHELLBALL_ECVERSION" != "IGNORE" ]; then |
169 fi | 169 echo "EC firmware update available: [$SHELLBALL_ECVERSION]" |
170 if [ $notify_update -eq 0 ]; then | 170 echo "Currently installed EC firmware: [$ec_version]" |
171 echo " | 171 notify_update=1 |
172 No firmware auto update is available. Returning gracefully. | 172 fi |
173 " | 173 if [ $notify_update -eq 0 ]; then |
174 exit 0 | 174 echo " |
175 No firmware auto update is available. Returning gracefully. | |
176 " | |
177 exit 0 | |
178 fi | |
175 fi | 179 fi |
176 break | 180 break |
177 ;; | 181 ;; |
178 --force) | 182 --force) |
179 force_flag=1 | 183 force_flag=1 |
180 shift | 184 shift |
181 ;; | 185 ;; |
182 -h|"-?"|--help) | 186 -h|"-?"|--help) |
183 echo "Shellball -- self-extract and install" | 187 echo "Shellball -- self-extract and install" |
184 echo "" | 188 echo "" |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
260 fi | 264 fi |
261 fi | 265 fi |
262 | 266 |
263 verbose_message "Run built-in script ($SCRIPT) ..." | 267 verbose_message "Run built-in script ($SCRIPT) ..." |
264 if ! $SCRIPT "$@"; then | 268 if ! $SCRIPT "$@"; then |
265 error_exit "ERROR: $SCRIPT failed." | 269 error_exit "ERROR: $SCRIPT failed." |
266 fi | 270 fi |
267 exit 0 | 271 exit 0 |
268 | 272 |
269 # Below are uuencoded blob. Don't put code behind exit 0. | 273 # Below are uuencoded blob. Don't put code behind exit 0. |
OLD | NEW |