diff options
author | Jochen Friedrich <jochen@scram.de> | 2008-09-02 11:24:59 +0200 |
---|---|---|
committer | Ben Warren <biggerbadderben@gmail.com> | 2008-09-02 21:18:19 -0700 |
commit | be1b0d2777e179191a57b138b660547a17e55aad (patch) | |
tree | 59cb7bce221c6b381b76fd940b93c2c14fecc833 /net/tftp.c | |
parent | 33314470ab32a3f5412bb61b5f3d6c216c88bf9b (diff) | |
download | bootable_bootloader_goldelico_gta04-be1b0d2777e179191a57b138b660547a17e55aad.zip bootable_bootloader_goldelico_gta04-be1b0d2777e179191a57b138b660547a17e55aad.tar.gz bootable_bootloader_goldelico_gta04-be1b0d2777e179191a57b138b660547a17e55aad.tar.bz2 |
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: Jochen Friedrich <jochen@scram.de>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
Diffstat (limited to 'net/tftp.c')
-rw-r--r-- | net/tftp.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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; |