forked from len0rd/rockbox
Move load_firmware() to separate file
The idea is to share loading code between bootloaders and rolo(). Change-Id: I1656ed91946d7a05cb7c9fa7a16793c3c862a5cd Reviewed-on: http://gerrit.rockbox.org/190 Reviewed-by: Marcin Bukat <marcin.bukat@gmail.com>
This commit is contained in:
parent
46ea8bfe7c
commit
0b29691324
29 changed files with 727 additions and 608 deletions
|
@ -31,6 +31,8 @@
|
|||
#include "backlight.h"
|
||||
#include "button-target.h"
|
||||
#include "common.h"
|
||||
#include "rb-loader.h"
|
||||
#include "loader_strerror.h"
|
||||
#include "storage.h"
|
||||
#include "disk.h"
|
||||
#include "panic.h"
|
||||
|
@ -180,7 +182,7 @@ void main(uint32_t arg, uint32_t addr)
|
|||
loadbuffer = (unsigned char*)loadaddress;
|
||||
buffer_size = (int)(loadaddressend - loadaddress);
|
||||
|
||||
while((ret = load_firmware(loadbuffer, BOOTFILE, buffer_size)) < 0)
|
||||
while((ret = load_firmware(loadbuffer, BOOTFILE, buffer_size)) <= EFILE_EMPTY)
|
||||
{
|
||||
error(EBOOTFILE, ret, true);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue