forked from len0rd/rockbox
sansapatcher: factor out handling of bundled bootloaders.
Instead of handling bundled bootloaders in the sansapatcher functions leave that to the caller. This removes the need to have Rockbox Utility specific parts in sansapatcher. sansa_add_bootloader() now operates on an already loaded bootloader. For loading a convenience function sansa_read_bootloader() is added. This also introduces a new check on loading to prevent installing an e200 bootloader on a c200 (and vice versa). These changes will allow building a libsansapatcher for linking with Rockbox Utility later. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31144 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
38890ac6dc
commit
38f03d4eae
4 changed files with 80 additions and 66 deletions
|
|
@ -34,14 +34,12 @@ extern int sansa_verbose;
|
|||
#define BUFFER_SIZE 8*1024*1024
|
||||
extern unsigned char* sansa_sectorbuf;
|
||||
|
||||
#define FILETYPE_MI4 0
|
||||
#define FILETYPE_INTERNAL 1
|
||||
|
||||
int sansa_read_partinfo(struct sansa_t* sansa, int silent);
|
||||
int is_sansa(struct sansa_t* sansa);
|
||||
int sansa_scan(struct sansa_t* sansa);
|
||||
int sansa_read_firmware(struct sansa_t* sansa, const char* filename);
|
||||
int sansa_add_bootloader(struct sansa_t* sansa, const char* filename, int type);
|
||||
unsigned int sansa_read_bootloader(struct sansa_t* sansa, const char* filename, unsigned char** bl_buffer);
|
||||
int sansa_add_bootloader(struct sansa_t* sansa, const unsigned char* buf, unsigned int len);
|
||||
int sansa_delete_bootloader(struct sansa_t* sansa);
|
||||
int sansa_update_of(struct sansa_t* sansa,const char* filename);
|
||||
int sansa_update_ppbl(struct sansa_t* sansa,const char* filename);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue