summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bootloader/iriver_h1x0.c31
-rw-r--r--bootloader/iriver_h300.c32
2 files changed, 28 insertions, 35 deletions
diff --git a/bootloader/iriver_h1x0.c b/bootloader/iriver_h1x0.c
index 94ec6cb0fb..7efaaa3308 100644
--- a/bootloader/iriver_h1x0.c
+++ b/bootloader/iriver_h1x0.c
@@ -479,19 +479,6 @@ void main(void)
check_battery();
- /* Don't start if the Hold button is active on the device you
- are starting with */
- if ((usb_detect() != USB_INSERTED) && (hold_status || recovery_mode))
- {
- if (detect_original_firmware())
- {
- printf("Hold switch on");
- shutdown();
- }
-
- failsafe_menu();
- }
-
/* Holding REC while starting runs the original firmware */
if (detect_original_firmware() && rec_button)
{
@@ -544,10 +531,20 @@ void main(void)
lcd_update();
}
- /* boot from flash if that is the default */
- try_flashboot();
- if (recovery_mode)
- printf("Falling back to boot from disk");
+ /* recheck the hold switch status as it may have changed */
+ hold_status = (button_hold() || remote_button_hold());
+
+ /* hold switch shutdown or failsafe recovery mode */
+ if (hold_status || recovery_mode)
+ {
+ if (detect_original_firmware())
+ {
+ printf("Hold switch on");
+ shutdown();
+ }
+
+ failsafe_menu();
+ }
rc = storage_init();
if(rc)
diff --git a/bootloader/iriver_h300.c b/bootloader/iriver_h300.c
index 2e4909fd53..3a254f4487 100644
--- a/bootloader/iriver_h300.c
+++ b/bootloader/iriver_h300.c
@@ -473,20 +473,6 @@ void main(void)
if(rtc_alarm)
printf("RTC alarm detected");
- /* Don't start if the Hold button is active on the device you
- are starting with */
- if ((hold_status || recovery_mode) && !rtc_alarm &&
- (usb_detect() != USB_INSERTED) && !charger_inserted())
- {
- if (detect_original_firmware())
- {
- printf("Hold switch on");
- shutdown();
- }
-
- failsafe_menu();
- }
-
/* Holding REC while starting runs the original firmware */
if (detect_original_firmware() && rec_button)
{
@@ -605,10 +591,20 @@ void main(void)
usb_charge = false;
}
- /* boot from flash if that is the default */
- try_flashboot();
- if (recovery_mode)
- printf("Falling back to boot from disk");
+ /* recheck the hold switch status as it may have changed */
+ hold_status = (button_hold() || remote_button_hold());
+
+ /* hold switch shutdown or failsafe recovery mode */
+ if (hold_status || recovery_mode)
+ {
+ if (detect_original_firmware())
+ {
+ printf("Hold switch on");
+ shutdown();
+ }
+
+ failsafe_menu();
+ }
rc = storage_init();
if(rc)