From 35242c8d98566da64f0f5210e0f580e7bcdb0365 Mon Sep 17 00:00:00 2001 From: Aidan MacDonald Date: Thu, 3 Mar 2022 20:03:12 +0000 Subject: x1000: support new binary header in bootloader Change-Id: I89754215139ec027bb122759f5b54400f544d3c1 --- bootloader/x1000.c | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) (limited to 'bootloader/x1000.c') 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) -- cgit v1.2.3