summaryrefslogtreecommitdiffstats
path: root/bootloader/x1000.c
diff options
context:
space:
mode:
Diffstat (limited to 'bootloader/x1000.c')
-rw-r--r--bootloader/x1000.c22
1 files changed, 1 insertions, 21 deletions
diff --git a/bootloader/x1000.c b/bootloader/x1000.c
index 675a1c1840..bce7b69784 100644
--- a/bootloader/x1000.c
+++ b/bootloader/x1000.c
@@ -137,11 +137,6 @@ const struct menuitem recovery_items[] = {
{MENUITEM_ACTION, "Restore", &bootloader_restore},
};
-/* Final load address of rockbox binary.
- * NOTE: this is really the load address of the bootloader... it relies
- * on the fact that bootloader and app are linked at the same address. */
-extern unsigned char loadaddress[];
-
/* Temp buffer to contain the binary in memory */
extern unsigned char loadbuffer[];
extern unsigned char loadbufferend[];
@@ -156,20 +151,6 @@ bool disk_inited = false;
* Set to false if a SYS_USB_DISCONNECTED event is seen */
bool is_usb_connected = false;
-/* Jump to loaded binary */
-void exec(void* dst, const void* src, size_t bytes)
- __attribute__((noinline, noreturn, section(".icode")));
-
-void exec(void* dst, const void* src, size_t bytes)
-{
- memcpy(dst, src, bytes);
- commit_discard_idcache();
-
- typedef void(*entry_fn)(void) __attribute__((noreturn));
- entry_fn fn = (entry_fn)dst;
- fn();
-}
-
void clearscreen(void)
{
init_lcd();
@@ -368,8 +349,7 @@ void boot_rockbox(void)
if(lcd_inited)
backlight_hw_off();
- disable_irq();
- exec(loadaddress, loadbuffer, rc);
+ x1000_boot_rockbox(loadbuffer, rc);
}
void usb_mode(void)