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
|
@ -45,6 +45,8 @@
|
|||
#include "file.h"
|
||||
#include "pcf50606.h"
|
||||
#include "common.h"
|
||||
#include "rb-loader.h"
|
||||
#include "loader_strerror.h"
|
||||
#include "rbunicode.h"
|
||||
#include "isp1362.h"
|
||||
#include "version.h"
|
||||
|
@ -361,10 +363,10 @@ void main(void)
|
|||
|
||||
printf("Loading firmware");
|
||||
i = load_firmware((unsigned char *)DRAM_START, BOOTFILE, MAX_LOADSIZE);
|
||||
if(i < 0)
|
||||
printf("Error: %s", strerror(i));
|
||||
if(i <= EFILE_EMPTY)
|
||||
printf("Error: %s", loader_strerror(i));
|
||||
|
||||
if (i == EOK)
|
||||
if (i > 0)
|
||||
start_firmware();
|
||||
|
||||
if (!detect_original_firmware())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue