summaryrefslogtreecommitdiffstats
path: root/bootloader/telechips.c
diff options
context:
space:
mode:
authorMarcin Bukat <marcin.bukat@gmail.com>2012-03-04 15:34:29 +0100
committerMarcin Bukat <marcin.bukat@gmail.com>2013-06-27 13:50:11 +0200
commit0b29691324e5700f15ea653592bf29f8552d47d7 (patch)
tree00e4f77f28c813a493cd8af22170f486f6e82903 /bootloader/telechips.c
parent46ea8bfe7c690c8db230fff3a582a69779f8e432 (diff)
downloadrockbox-0b29691324e5700f15ea653592bf29f8552d47d7.tar.gz
rockbox-0b29691324e5700f15ea653592bf29f8552d47d7.tar.bz2
rockbox-0b29691324e5700f15ea653592bf29f8552d47d7.zip
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>
Diffstat (limited to 'bootloader/telechips.c')
-rw-r--r--bootloader/telechips.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/bootloader/telechips.c b/bootloader/telechips.c
index fca475e20d..af4ec72bc4 100644
--- a/bootloader/telechips.c
+++ b/bootloader/telechips.c
@@ -43,6 +43,8 @@
#include "power.h"
#include "file.h"
#include "common.h"
+#include "rb-loader.h"
+#include "loader_strerror.h"
#include "version.h"
/* Show the Rockbox logo - in show_logo.c */
@@ -170,11 +172,11 @@ void* main(void)
rc = load_firmware(loadbuffer, BOOTFILE, MAX_LOAD_SIZE);
- if (rc < 0)
+ if (rc <= EFILE_EMPTY)
{
error(EBOOTFILE,rc, true);
}
- else if (rc == EOK)
+ else
{
int(*kernel_entry)(void) = (void *) loadbuffer;