summaryrefslogtreecommitdiffstats
path: root/rbutil/sansapatcher
diff options
context:
space:
mode:
authorBertrik Sikken <bertrik@sikken.nl>2008-07-14 15:53:29 +0000
committerBertrik Sikken <bertrik@sikken.nl>2008-07-14 15:53:29 +0000
commitf85d55bb8979e8e87cf7b84a200ff2eb76e35cea (patch)
treeb1ff64f6dbd76015adc50a81a1a898754173f4ec /rbutil/sansapatcher
parentb632ddf9caf27cc055c584f6e61d537fc6820b7e (diff)
downloadrockbox-f85d55bb8979e8e87cf7b84a200ff2eb76e35cea.tar.gz
rockbox-f85d55bb8979e8e87cf7b84a200ff2eb76e35cea.tar.bz2
rockbox-f85d55bb8979e8e87cf7b84a200ff2eb76e35cea.zip
Fix FS#9002 - Bootloader on c200 shows "target id: e200"
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18035 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'rbutil/sansapatcher')
-rw-r--r--rbutil/sansapatcher/sansapatcher.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/rbutil/sansapatcher/sansapatcher.c b/rbutil/sansapatcher/sansapatcher.c
index 82a87bf46e..504220a0d9 100644
--- a/rbutil/sansapatcher/sansapatcher.c
+++ b/rbutil/sansapatcher/sansapatcher.c
@@ -556,7 +556,7 @@ int sansa_scan(struct sansa_t* sansa)
/* Prepare original firmware for writing to the firmware partition by decrypting
and updating the header */
-static int prepare_original_firmware(unsigned char* buf, struct mi4header_t* mi4header)
+static int prepare_original_firmware(struct sansa_t* sansa, unsigned char* buf, struct mi4header_t* mi4header)
{
unsigned char* tmpbuf;
int i;
@@ -611,7 +611,8 @@ static int prepare_original_firmware(unsigned char* buf, struct mi4header_t* mi4
set_mi4header(buf,mi4header);
/* Add Rockbox-specific header */
- memcpy(buf+0x1f8,"RBOFe200",8);
+ memcpy(buf+0x1f8,"RBOF",4);
+ memcpy(buf+0x1fc,sansa->targetname,4);
return 0;
}
@@ -650,7 +651,7 @@ static int load_original_firmware(struct sansa_t* sansa, unsigned char* buf, str
return -1;
}
}
- return prepare_original_firmware(buf, mi4header);
+ return prepare_original_firmware(sansa, buf, mi4header);
}
int sansa_read_firmware(struct sansa_t* sansa, char* filename)
@@ -885,7 +886,7 @@ int sansa_update_of(struct sansa_t* sansa, char* filename)
}
/* Decrypt and build the header */
- if(prepare_original_firmware(sansa_sectorbuf, &mi4header)!=0){
+ if(prepare_original_firmware(sansa, sansa_sectorbuf, &mi4header)!=0){
fprintf(stderr,"[ERR] Unable to build decrypted mi4 from %s\n"
,filename);
return -1;