From 341b03a24229f16bba98f88832a07d37b834eb63 Mon Sep 17 00:00:00 2001 From: Dave Chapman Date: Sat, 17 Mar 2007 10:01:54 +0000 Subject: 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 --- rbutil/sansapatcher/sansapatcher.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'rbutil/sansapatcher') diff --git a/rbutil/sansapatcher/sansapatcher.c b/rbutil/sansapatcher/sansapatcher.c index 55f5245bd9..e96b202fed 100644 --- a/rbutil/sansapatcher/sansapatcher.c +++ b/rbutil/sansapatcher/sansapatcher.c @@ -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 { -- cgit v1.2.3