diff options
| author | Evan Lojewski <github@meklort.com> | 2020-11-01 12:58:52 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-11-01 12:58:52 -0700 |
| commit | e223b341640c3eff0ab0e2189346e07afa171b39 (patch) | |
| tree | f37ec2587574dd63853e6f4fe371068469104a74 /utils/bcmflash/main.cpp | |
| parent | 8dd6ad9871e35d0f3383e973207b8538d30a03a7 (diff) | |
| download | bcm5719-ortega-e223b341640c3eff0ab0e2189346e07afa171b39.tar.gz bcm5719-ortega-e223b341640c3eff0ab0e2189346e07afa171b39.zip | |
bcmflash: Enable extracting raw vpd information. (#156)
Diffstat (limited to 'utils/bcmflash/main.cpp')
| -rw-r--r-- | utils/bcmflash/main.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/utils/bcmflash/main.cpp b/utils/bcmflash/main.cpp index 499abee..063acf3 100644 --- a/utils/bcmflash/main.cpp +++ b/utils/bcmflash/main.cpp @@ -770,5 +770,21 @@ int main(int argc, char const *argv[]) dump_vpd(gVPD, gVPDLength); + if (extract) + { + if (!bcmflash_file_write("vpd.bin", nvram.contents.vpd.bytes, sizeof(nvram.contents.vpd))) + { + exit(-1); + } + + if (gVPD != nvram.contents.vpd.bytes) + { + if (!bcmflash_file_write("vpd-e.bin", gVPD, gVPDLength)) + { + exit(-1); + } + } + } + return 0; } |

