aboutsummaryrefslogtreecommitdiffstats
path: root/tools/firmware-utils/src
diff options
context:
space:
mode:
authorFlorian Fainelli <florian@openwrt.org>2009-08-09 10:19:47 +0000
committerFlorian Fainelli <florian@openwrt.org>2009-08-09 10:19:47 +0000
commit85698765da14d1389679bfe356bc75432704dee6 (patch)
tree2850866aca59cc0d641a492b1111e925411560f2 /tools/firmware-utils/src
parent2d629e3a01af070e1d3597fd33a798b555156f30 (diff)
downloadupstream-85698765da14d1389679bfe356bc75432704dee6.tar.gz
upstream-85698765da14d1389679bfe356bc75432704dee6.tar.bz2
upstream-85698765da14d1389679bfe356bc75432704dee6.zip
add support for the Pirelli AG226G board (#5337)
SVN-Revision: 17190
Diffstat (limited to 'tools/firmware-utils/src')
-rw-r--r--tools/firmware-utils/src/imagetag.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/firmware-utils/src/imagetag.c b/tools/firmware-utils/src/imagetag.c
index bd62b20339..e93f5f45e8 100644
--- a/tools/firmware-utils/src/imagetag.c
+++ b/tools/firmware-utils/src/imagetag.c
@@ -219,6 +219,10 @@ int tagfile(const char *kernel, const char *rootfs, const char *bin,
fseek(binfile, rootfsoff + rootfslen - fwaddr, SEEK_SET);
fwrite(&deadcode, sizeof(uint32_t), 1, binfile);
+ /* Flush the binfile buffer so that when we read from file, it contains
+ * everything in the buffer
+ */
+ fflush(binfile);
/* Choose and compute the CRC32 that should be inserted in the tag */
if ( tagid && ( (strncmp(tagid, "bccfe", TAGID_LEN) == 0)) || ( strncmp(tagid, "bc300", TAGID_LEN) == 0)) {