summaryrefslogtreecommitdiffstats
path: root/bootloader/main-pp.c
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2007-05-17 11:35:57 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2007-05-17 11:35:57 +0000
commit875c725e1cb9a50f98de648e4f98043d314b7d18 (patch)
treec4b6fa27afd88e42ac05ee4051c6c10d7f93930f /bootloader/main-pp.c
parent95bab9193593a0ecd468a2c00f5e22212a93ceca (diff)
downloadrockbox-875c725e1cb9a50f98de648e4f98043d314b7d18.tar.gz
rockbox-875c725e1cb9a50f98de648e4f98043d314b7d18.tar.bz2
rockbox-875c725e1cb9a50f98de648e4f98043d314b7d18.zip
add some code to dump the sansa hidden partition (commented out), usefull for when we need to figure out which byte to modify so the OF doesnt rebuild its DB after usb
CAUTION: Current svn bootloader cannot read buttons, so don't upgrade git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13402 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'bootloader/main-pp.c')
-rw-r--r--bootloader/main-pp.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/bootloader/main-pp.c b/bootloader/main-pp.c
index 99200da1b9..86e9868554 100644
--- a/bootloader/main-pp.c
+++ b/bootloader/main-pp.c
@@ -620,6 +620,22 @@ void* main(void)
error(0, 0);
} else {
+#if 0 /* e200: enable to be able to dump the hidden partition */
+ if(btn & BUTTON_UP)
+ {
+ int fd;
+ pinfo = disk_partinfo(1);
+ fd = open("/part.bin", O_CREAT|O_RDWR);
+ char sector[512];
+ for(i=0; i<40960; i++){
+ printf("dumping sector %d", i);
+ lcd_update();
+ ata_read_sectors(pinfo->start + i,1 , sector);
+ write(fd,sector,512);
+ }
+ close(fd);
+ }
+#endif
printf("Loading Rockbox...");
rc=load_mi4(loadbuffer, BOOTFILE, MAX_LOADSIZE);
if (rc < EOK) {