diff options
Diffstat (limited to 'bootloader/x1000.c')
-rw-r--r-- | bootloader/x1000.c | 22 |
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[] = { | |||
137 | {MENUITEM_ACTION, "Restore", &bootloader_restore}, | 137 | {MENUITEM_ACTION, "Restore", &bootloader_restore}, |
138 | }; | 138 | }; |
139 | 139 | ||
140 | /* Final load address of rockbox binary. | ||
141 | * NOTE: this is really the load address of the bootloader... it relies | ||
142 | * on the fact that bootloader and app are linked at the same address. */ | ||
143 | extern unsigned char loadaddress[]; | ||
144 | |||
145 | /* Temp buffer to contain the binary in memory */ | 140 | /* Temp buffer to contain the binary in memory */ |
146 | extern unsigned char loadbuffer[]; | 141 | extern unsigned char loadbuffer[]; |
147 | extern unsigned char loadbufferend[]; | 142 | extern unsigned char loadbufferend[]; |
@@ -156,20 +151,6 @@ bool disk_inited = false; | |||
156 | * Set to false if a SYS_USB_DISCONNECTED event is seen */ | 151 | * Set to false if a SYS_USB_DISCONNECTED event is seen */ |
157 | bool is_usb_connected = false; | 152 | bool is_usb_connected = false; |
158 | 153 | ||
159 | /* Jump to loaded binary */ | ||
160 | void exec(void* dst, const void* src, size_t bytes) | ||
161 | __attribute__((noinline, noreturn, section(".icode"))); | ||
162 | |||
163 | void exec(void* dst, const void* src, size_t bytes) | ||
164 | { | ||
165 | memcpy(dst, src, bytes); | ||
166 | commit_discard_idcache(); | ||
167 | |||
168 | typedef void(*entry_fn)(void) __attribute__((noreturn)); | ||
169 | entry_fn fn = (entry_fn)dst; | ||
170 | fn(); | ||
171 | } | ||
172 | |||
173 | void clearscreen(void) | 154 | void clearscreen(void) |
174 | { | 155 | { |
175 | init_lcd(); | 156 | init_lcd(); |
@@ -368,8 +349,7 @@ void boot_rockbox(void) | |||
368 | if(lcd_inited) | 349 | if(lcd_inited) |
369 | backlight_hw_off(); | 350 | backlight_hw_off(); |
370 | 351 | ||
371 | disable_irq(); | 352 | x1000_boot_rockbox(loadbuffer, rc); |
372 | exec(loadaddress, loadbuffer, rc); | ||
373 | } | 353 | } |
374 | 354 | ||
375 | void usb_mode(void) | 355 | void usb_mode(void) |