summaryrefslogtreecommitdiffstats
path: root/utils/bcmflash
diff options
context:
space:
mode:
authorEvan Lojewski <github@meklort.com>2019-02-23 13:48:11 -0700
committerEvan Lojewski <github@meklort.com>2019-02-23 13:48:11 -0700
commitcbfa625bf806544ac40b017bbd8002fd8876e40d (patch)
tree47943f19871406b24f91bc99878dab63a5453782 /utils/bcmflash
parentbfbf9dbba7f1d88e20cbf9ebea3e18f88d645791 (diff)
downloadbcm5719-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.cpp14
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
{
OpenPOWER on IntegriCloud