From: Gabor Juhos Date: Fri, 17 Dec 2010 20:34:31 +0000 (+0000) Subject: firmware-utils/mkzynfw: fix available flash space calculation X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=aa60be42a6057d2690ce15e3096d1da5a7aec809;p=project%2Ffirmware-utils.git firmware-utils/mkzynfw: fix available flash space calculation SVN-Revision: 24653 --- diff --git a/src/mkzynfw.c b/src/mkzynfw.c index f3343df..36c176f 100644 --- a/src/mkzynfw.c +++ b/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;