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

@ -21,16 +21,6 @@
#include <stdbool.h>
/* Error codes */
#define EOK 0
#define EFILE_NOT_FOUND -1
#define EREAD_CHKSUM_FAILED -2
#define EREAD_MODEL_FAILED -3
#define EREAD_IMAGE_FAILED -4
#define EBAD_CHKSUM -5
#define EFILE_TOO_BIG -6
#define EINVALID_FORMAT -7
/* Set this to true to enable lcd_update() in the printf function */
extern bool verbose;
@ -42,9 +32,7 @@ extern bool verbose;
/* Functions common to all bootloaders */
void reset_screen(void);
int printf(const char *format, ...);
char *strerror(int error);
void error(int errortype, int error, bool shutdown);
int load_firmware(unsigned char* buf, char* firmware, int buffer_size);
int load_raw_firmware(unsigned char* buf, char* firmware, int buffer_size);
#ifdef ROCKBOX_HAS_LOGF
void display_logf(void);