Add Rockbox magic (RBOFe200) to the end of the mi4 header in the original firmware. This may not be needed, but completes the set of RBBL for the bootloader, RBOS for Rockbox itself, and RBOF for the original firmware. Also add more info to an error message.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12818 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
f68362ad6f
commit
341b03a242
1 changed files with 5 additions and 1 deletions
|
@ -540,6 +540,9 @@ static int load_original_firmware(struct sansa_t* sansa, unsigned char* buf, str
|
|||
|
||||
set_mi4header(buf,mi4header);
|
||||
|
||||
/* Add Rockbox-specific header */
|
||||
memcpy(buf+0x1f8,"RBOFe200",8);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -604,7 +607,8 @@ int sansa_add_bootloader(struct sansa_t* sansa, char* filename, int type)
|
|||
}
|
||||
|
||||
if (memcmp(sectorbuf+0x200+0x1f8,"RBBL",4)!=0) {
|
||||
fprintf(stderr,"[ERR] Not a Rockbox bootloader, aborting.\n");
|
||||
fprintf(stderr,"[ERR] %s is not a Rockbox bootloader, aborting.\n",
|
||||
filename);
|
||||
return -1;
|
||||
}
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue