summaryrefslogtreecommitdiffstats
path: root/rbutil/sansapatcher
diff options
context:
space:
mode:
authorDave Chapman <dave@dchapman.com>2007-03-17 10:01:54 +0000
committerDave Chapman <dave@dchapman.com>2007-03-17 10:01:54 +0000
commit341b03a24229f16bba98f88832a07d37b834eb63 (patch)
treef76c7bdeeb18d786c8bdd8547eb97df2322890a2 /rbutil/sansapatcher
parentf68362ad6ffef77261e2f64cedc08a023c721ae7 (diff)
downloadrockbox-341b03a24229f16bba98f88832a07d37b834eb63.tar.gz
rockbox-341b03a24229f16bba98f88832a07d37b834eb63.tar.bz2
rockbox-341b03a24229f16bba98f88832a07d37b834eb63.zip
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
Diffstat (limited to 'rbutil/sansapatcher')
-rw-r--r--rbutil/sansapatcher/sansapatcher.c6
1 files changed, 5 insertions, 1 deletions
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 {