Cache full VPD text file to speed up the dump_vpd_log performance.
The old fashion of dump_vpd_log script is calling 'vpd' twice (for RO and RW
partiions). Every 'vpd' could invoke flashrom twice (one for partial, and one
for full BIOS read) on Mario. This is a long processing time, because
Mario FMAP structure doesn't contain the 'FMAP' partition itself.
The new fashion is once dump_vpd_log is called, it would cache the full file
content in the filesystem so that the next call can benefit from it.
Also, we call flashrom only once and pass '-f bios_file' for sencond 'vpd'.
This saves half of execution time.
BUG=chromium-os:21525
TEST=Tested on Mario and Alex.
Change-Id: I1c7d2a0afb2346d1f71ae5f15a5161c3fabccd08
Reviewed-on: https://gerrit.chromium.org/gerrit/12363
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
Tested-by: Yung-Chieh Lo <yjlou%chromium.org@gtempaccount.com>
1 file changed