mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
Shanling Q1: Support OF-initiated firmware updates
It's now possible to install OF updates on a rockboxed Shanling Q1. Previously these didn't work because the RB bootloader interrupted the update process. Updates will proceed as they normally do on a non-Rockboxed Q1, except at the end of the update you'll reboot to Rockbox instead of the OF. This is only a minor inconvienience and doesn't affect the update process. Change-Id: I0f8fc96f073c50c1512bf60e0927491be8178eb0
This commit is contained in:
parent
d09fb6bb6b
commit
a5b08d0af7
1 changed files with 13 additions and 1 deletions
|
@ -43,8 +43,10 @@ static int read_btn(void)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void main(void)
|
void main(uint32_t saved_cpm_scratch)
|
||||||
{
|
{
|
||||||
|
(void)saved_cpm_scratch;
|
||||||
|
|
||||||
system_init();
|
system_init();
|
||||||
core_allocator_init();
|
core_allocator_init();
|
||||||
kernel_init();
|
kernel_init();
|
||||||
|
@ -71,6 +73,16 @@ void main(void)
|
||||||
* present, blocking with an "insert SD card" prompt if appropriate. */
|
* present, blocking with an "insert SD card" prompt if appropriate. */
|
||||||
disk_mount_all();
|
disk_mount_all();
|
||||||
|
|
||||||
|
#ifdef SHANLING_Q1
|
||||||
|
/* This is needed for OF updates. The OF extracts the update package
|
||||||
|
* to the SD card and reboots to the recovery kernel to complete the
|
||||||
|
* update. */
|
||||||
|
if ((saved_cpm_scratch & 0xffff) == 0x1a1a) {
|
||||||
|
cpm_scratch_set(saved_cpm_scratch & 0xffff0000);
|
||||||
|
boot_of_recovery();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* If USB booting, the user probably needs to enter recovery mode;
|
/* If USB booting, the user probably needs to enter recovery mode;
|
||||||
* let's not force them to hold down the recovery key. */
|
* let's not force them to hold down the recovery key. */
|
||||||
bool recovery_mode = get_boot_flag(BOOT_FLAG_USB_BOOT);
|
bool recovery_mode = get_boot_flag(BOOT_FLAG_USB_BOOT);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue