mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2025-02-07 15:41:57 +02:00
firmware-utils/mkzynfw: fix available flash space calculation
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@24653 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
010807acc0
commit
934c0029fd
@ -999,12 +999,13 @@ calc_block_offsets(int type, uint32_t *offset)
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
next_offs = ALIGN(*offset, block->align);
|
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) {
|
if (block->file_size > avail) {
|
||||||
ERR("file %s is too big, offset = %u, size=%u,"
|
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)next_offs,
|
||||||
(unsigned)block->file_size,
|
(unsigned)block->file_size,
|
||||||
|
(unsigned)avail,
|
||||||
(unsigned)block->align);
|
(unsigned)block->align);
|
||||||
res = -1;
|
res = -1;
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user