OLD | NEW |
(Empty) | |
| 1 # Copyright (c) 2011 The Chromium OS Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. |
| 4 |
| 5 description "dumps VPD information for chrome://system" |
| 6 author "chromium-os-dev@chromium.org" |
| 7 |
| 8 # VPD (Vital Product Data) information is shown on chrome://system for |
| 9 # user, feedback, and partner's customer service center. |
| 10 # |
| 11 # This script will read VPD from BIOS and dump into /var/log/vpd_2.0.txt. |
| 12 # It should be executed at least once some time after boot and before user |
| 13 # types "chrome://system" in chrome location bar. |
| 14 # |
| 15 # Since VPD utility could invoke flashrom utility to access BIOS, which is |
| 16 # slow, this script should be run after calculating boot time. |
| 17 # Hence, later than boot-complete can be acceptable. |
| 18 start on stopped boot-complete |
| 19 |
| 20 script |
| 21 VPD_2_0="/var/log/vpd_2.0.txt" |
| 22 TMP="/tmp/vpd.bin" |
| 23 |
| 24 # Since we don't change the VPD data too often, only create the log file |
| 25 # if it does not exist. |
| 26 if [ ! -f $VPD_2_0 ]; then |
| 27 if flashrom -r $TMP > /dev/null ; then |
| 28 vpd -f $TMP -i "RO VPD" -l || echo "RO VPD execute error." |
| 29 vpd -f $TMP -i "RW VPD" -l || echo "RW VPD execute error." |
| 30 else |
| 31 echo "flashrom execute error." |
| 32 fi >> $VPD_2_0 |
| 33 rm -f $TMP |
| 34 fi |
| 35 end script |
OLD | NEW |