Skip to content

Commit

Permalink
Patch for Rockbox loading by linuxstb.
Browse files Browse the repository at this point in the history
  • Loading branch information
rwcr committed Mar 26, 2006
1 parent c8573f5 commit 9fee349
Showing 1 changed file with 18 additions and 7 deletions.
25 changes: 18 additions & 7 deletions tools/ipodloader2/loader.c
Original file line number Diff line number Diff line change
Expand Up @@ -222,13 +222,24 @@ static void load_rockbox(ipod_t *ipod,char *image) {
return;
}

// Transfer execution directly to Rockbox - we don't want
// to run the rest of the bootloader startup code.

__asm__ volatile(
"mov r0, #0x10000000 \n"
"mov pc, r0 \n"
);
// Store the IPOD hw revision in last 4 bytes of DRAM for use by Rockbox
// and transfer execution directly to Rockbox - we don't want to run
// the rest of the bootloader startup code.
if (ipod->hw_rev <= 0x30000) { // PP5002
outl(ipod->hw_rev,0x29fffffc);

__asm__ volatile(
"mov r0, #0x28000000 \n"
"mov pc, r0 \n"
);
} else { // PP502x
outl(ipod->hw_rev,0x11fffffc);

__asm__ volatile(
"mov r0, #0x10000000 \n"
"mov pc, r0 \n"
);
}
}

extern void hd_demo();
Expand Down

0 comments on commit 9fee349

Please sign in to comment.