summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvan Lojewski <github@meklort.com>2019-06-11 21:43:02 -0600
committerEvan Lojewski <github@meklort.com>2019-06-11 21:43:02 -0600
commit12984bad4ee89630a08ea9d0c5b36d047c7fed3c (patch)
tree46f91de39643d133742066026ebe1a639b0cf49f
parent9dacf1e3a80a906b60e5101f83d09dbc0a591ef3 (diff)
downloadbcm5719-ortega-12984bad4ee89630a08ea9d0c5b36d047c7fed3c.tar.gz
bcm5719-ortega-12984bad4ee89630a08ea9d0c5b36d047c7fed3c.zip
Fix APE flashing code.
-rw-r--r--utils/bcmflash/main.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/utils/bcmflash/main.cpp b/utils/bcmflash/main.cpp
index 4afe5b8..903b26a 100644
--- a/utils/bcmflash/main.cpp
+++ b/utils/bcmflash/main.cpp
@@ -492,14 +492,8 @@ int main(int argc, char const *argv[])
}
}
- // CD is updat
- uint32_t new_crc = be32toh(~NVRam_crc(ape, new_ape_length, 0xffffffff));
- printf("New CRC: 0x%08X\n", new_crc);
printf("New Length (bytes): 0x%08X\n", new_ape_length);
- // Update the CRC in the file copy.
- // ape_wd[crc_word] = htobe32(new_crc);
-
// TODO: update length (if changed);
if("file" == options["target"])
@@ -513,6 +507,12 @@ int main(int argc, char const *argv[])
if("hardware" == options["target"])
{
+ // Ensure everything is in the correct endianness.
+ for(int i = 0; i < new_ape_length/4; i++)
+ {
+ ape_wd[i] = be32toh(ape_wd[i]);
+ }
+
NVRam_acquireLock();
NVRam_enable();
OpenPOWER on IntegriCloud