diff options
| author | Evan Lojewski <github@meklort.com> | 2019-02-23 13:48:11 -0700 |
|---|---|---|
| committer | Evan Lojewski <github@meklort.com> | 2019-02-23 13:48:11 -0700 |
| commit | cbfa625bf806544ac40b017bbd8002fd8876e40d (patch) | |
| tree | 47943f19871406b24f91bc99878dab63a5453782 /utils/bcmflash | |
| parent | bfbf9dbba7f1d88e20cbf9ebea3e18f88d645791 (diff) | |
| download | bcm5719-ortega-cbfa625bf806544ac40b017bbd8002fd8876e40d.tar.gz bcm5719-ortega-cbfa625bf806544ac40b017bbd8002fd8876e40d.zip | |
Add the ability to write modified stage1 firmware back to nvm
Diffstat (limited to 'utils/bcmflash')
| -rw-r--r-- | utils/bcmflash/main.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/utils/bcmflash/main.cpp b/utils/bcmflash/main.cpp index ae0dfea..1e104ba 100644 --- a/utils/bcmflash/main.cpp +++ b/utils/bcmflash/main.cpp @@ -293,6 +293,20 @@ int main(int argc, char const *argv[]) exit(-1); } } + + if("hardware" == options["target"]) + { + NVRam_acquireLock(); + + NVRam_enable(); + NVRam_enableWrites(); + + NVRam_write(0, nvram.words, NVRAM_SIZE / 4); + + NVRam_disableWrites(); + + NVRam_releaseLock(); + } } else { |

