Skip to content
Snippets Groups Projects
Commit be1b0d27 authored by Jochen Friedrich's avatar Jochen Friedrich Committed by Ben Warren
Browse files

Don't tftp to unknown flash


If a board has a variable number of flash banks, there are empty entries
in flash_info[] and CFG_DIRECT_FLASH_TFTP is set, tftp boot fails with
"Outside available Flash". This patch skips flash banks with unknown
flash ids.

Signed-off-by: default avatarJochen Friedrich <jochen@scram.de>
Signed-off-by: default avatarBen Warren <biggerbadderben@gmail.com>
parent 33314470
No related branches found
No related tags found
No related merge requests found
......@@ -111,6 +111,8 @@ store_block (unsigned block, uchar * src, unsigned len)
for (i=0; i<CFG_MAX_FLASH_BANKS; i++) {
/* start address in flash? */
if (flash_info[i].flash_id == FLASH_UNKNOWN)
continue;
if (load_addr + offset >= flash_info[i].start[0]) {
rc = 1;
break;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment