Fix the SPD bug of 'vpd -O' in R11 factory branch.

In R11, the vpd -O would clean the SPD data in VPD partition. The CL edca624
in ToT has fixed this, but it is a big change. So I extracted few code in
that CL and apply to branch remotes/cros/0.11.241.B.

The original code overwrites the SPD if no FMAP structure is found. This CL
reads in the 'FMAP' partition so that vpd.c can parse the FMAP structure and
set found_vpd=1. So that saveFile() can preserve the SPD in file, rather than
create a new file.

TEST=tested on a*x machine.

Change-Id: I3db7af263e46a3809ef36ce51f4502e9516f8e38
Reviewed-by: David Hendricks <>
Tested-by: Yung-Chieh Lo <>
2 files changed
tree: 8468c01cb7c349f20acdf387b3e1e8145a15012d
  1. include/
  2. lib/
  3. util/
  4. inherit-review-settings-ok
  6. Makefile
  8. vpd.c