aboutsummaryrefslogtreecommitdiffstats
path: root/tools/firmware-utils/src
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2010-12-17 20:34:31 +0000
committerGabor Juhos <juhosg@openwrt.org>2010-12-17 20:34:31 +0000
commit82e2bf1f1646853c9887fce1bf0dc23ca512f4cd (patch)
treeab4dae601f25fa6328a674752cac329f09cc6143 /tools/firmware-utils/src
parent6a95a13b123566fdb3a7d59695438eeb880f9705 (diff)
downloadmaster-187ad058-82e2bf1f1646853c9887fce1bf0dc23ca512f4cd.tar.gz
master-187ad058-82e2bf1f1646853c9887fce1bf0dc23ca512f4cd.tar.bz2
master-187ad058-82e2bf1f1646853c9887fce1bf0dc23ca512f4cd.zip
firmware-utils/mkzynfw: fix available flash space calculation
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@24653 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'tools/firmware-utils/src')
-rw-r--r--tools/firmware-utils/src/mkzynfw.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/firmware-utils/src/mkzynfw.c b/tools/firmware-utils/src/mkzynfw.c
index f3343df726..36c176f432 100644
--- a/tools/firmware-utils/src/mkzynfw.c
+++ b/tools/firmware-utils/src/mkzynfw.c
@@ -999,12 +999,13 @@ calc_block_offsets(int type, uint32_t *offset)
continue;
next_offs = ALIGN(*offset, block->align);
- avail = board->flash_size - board->romio_offs - next_offs;
+ avail = board->flash_size - next_offs;
if (block->file_size > avail) {
ERR("file %s is too big, offset = %u, size=%u,"
- " align = %u", block->file_name,
+ " avail = %u, align = %u", block->file_name,
(unsigned)next_offs,
(unsigned)block->file_size,
+ (unsigned)avail,
(unsigned)block->align);
res = -1;
break;