x1000: support new binary header in bootloader
Change-Id: I89754215139ec027bb122759f5b54400f544d3c1
This commit is contained in:
parent
428491df69
commit
35242c8d98
1 changed files with 1 additions and 21 deletions
|
@ -137,11 +137,6 @@ const struct menuitem recovery_items[] = {
|
||||||
{MENUITEM_ACTION, "Restore", &bootloader_restore},
|
{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 */
|
/* Temp buffer to contain the binary in memory */
|
||||||
extern unsigned char loadbuffer[];
|
extern unsigned char loadbuffer[];
|
||||||
extern unsigned char loadbufferend[];
|
extern unsigned char loadbufferend[];
|
||||||
|
@ -156,20 +151,6 @@ bool disk_inited = false;
|
||||||
* Set to false if a SYS_USB_DISCONNECTED event is seen */
|
* Set to false if a SYS_USB_DISCONNECTED event is seen */
|
||||||
bool is_usb_connected = false;
|
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)
|
void clearscreen(void)
|
||||||
{
|
{
|
||||||
init_lcd();
|
init_lcd();
|
||||||
|
@ -368,8 +349,7 @@ void boot_rockbox(void)
|
||||||
if(lcd_inited)
|
if(lcd_inited)
|
||||||
backlight_hw_off();
|
backlight_hw_off();
|
||||||
|
|
||||||
disable_irq();
|
x1000_boot_rockbox(loadbuffer, rc);
|
||||||
exec(loadaddress, loadbuffer, rc);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void usb_mode(void)
|
void usb_mode(void)
|
||||||
|
|
Loading…
Reference in a new issue