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:
Marcin Bukat 2012-03-04 15:34:29 +01:00
parent 46ea8bfe7c
commit 0b29691324
29 changed files with 727 additions and 608 deletions

View file

@ -27,6 +27,7 @@
#include "backlight.h"
#include "button.h"
#include "common.h"
#include "rb-loader.h"
#include "version.h"
#include "uart-target.h"
#include "power.h"
@ -115,11 +116,11 @@ void main(void)
ret = load_firmware(loadbuffer, BOOTFILE, buffer_size);
if(ret < 0)
if(ret <= EFILE_EMPTY)
{
error(EBOOTFILE, ret, true);
}
else if(ret == EOK)
else
{
system_prepare_fw_start();