aboutsummaryrefslogtreecommitdiffstats
path: root/tools
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
commit29379780a6ba1509e1df5a86b4cabed8ceefbbc7 (patch)
tree17abb0aaa9c93bac194bd03d0701f2acfd1d1f5f /tools
parent96da72dc56b53577fa748f0359be14cb6485091a (diff)
downloadupstream-29379780a6ba1509e1df5a86b4cabed8ceefbbc7.tar.gz
upstream-29379780a6ba1509e1df5a86b4cabed8ceefbbc7.tar.bz2
upstream-29379780a6ba1509e1df5a86b4cabed8ceefbbc7.zip
firmware-utils/mkzynfw: fix available flash space calculation
SVN-Revision: 24653
Diffstat (limited to 'tools')
-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;