Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Thank You for your continued support and contributions!

+  Rockbox Technical Forums
|-+  Rockbox General
| |-+  Rockbox General Discussion
| | |-+  iRiver H340 orig fw boot
« previous next »
  • Print
Pages: [1]

Author Topic: iRiver H340 orig fw boot  (Read 1573 times)

Offline Eric Draven

  • Member
  • *
  • Posts: 31
iRiver H340 orig fw boot
« on: March 04, 2007, 10:33:16 PM »
Just wanted to run this by you guys... see if anyone else noticed...

I noticed on my H340 that if I press the play button one short and one press-hold in rapid succession, the device boots in the original iRiver firmware.  Was that intended?  If so, since when?  G'day guys!
Logged

Offline nls

  • Developer
  • Member
  • *
  • Posts: 460
Re: iRiver H340 orig fw boot
« Reply #1 on: March 05, 2007, 07:01:40 AM »
I think LinusN made it this way in the bootloader as a fail-safe since the play button is the only button that can be read if the ADC driver doesn't work and booting iriver firmware allows you to flash a new bootloader.
Logged

Offline LinusN

  • Member
  • *
  • Posts: 1914
Re: iRiver H340 orig fw boot
« Reply #2 on: March 05, 2007, 07:42:19 AM »
It is a side effect of the so-called "cookie". When the bootloader starts, the first thing it does is to check a special "cookie" in memory. If it is cleared, it continues the bootloader. If it is set to a special value, however, the bootloader starts the original firmware.

The idea is that the bootloader sets the cookie to the special value when it runs, and clears it when it starts Rockbox. Therefore, if the bootloader crashes, the cookie is still set, and if you reboot it will start the original firmware, so you are able to reflash the broken loader.

Now, the double-click behaviour you see is an effect of this, and actually a bug in the bootloader. The bootloader checks if the ON button is held, and powers off if it isn't. This is to prevent Rockbox from starting if the ON button is accidentally pressed in your pocket or bag.

However, the bootloader forgets to reset the cookie in this case, and if the ON button is pressed again very quickly, the player starts again and the memory has retained the cookie value even though it has been powered off, and Rockbox starts the original firmware.
Logged
Archos Jukebox 6000, Recorder, FM Recorder/iAudio X5/iriver H1x0, H3x0/Toshiba Gigabeat F20/iPod G5, G5.5

Offline Eric Draven

  • Member
  • *
  • Posts: 31
Re: iRiver H340 orig fw boot
« Reply #3 on: March 05, 2007, 10:13:19 PM »
Thanks for the replies!

To think I actually thought it was quite cool to have another way of booting the original firmware, and then later realize it was unintended behavior  :D it's still cool just the same.  Thanks again, guys!
Logged

Offline dommo

  • Member
  • *
  • Posts: 23
Re: iRiver H340 orig fw boot
« Reply #4 on: March 06, 2007, 06:12:03 PM »
Yeah I discovered this quite a while back on my H340, put hold on and keep clicking the play button (or whatever you do) and the iriver firmware Hold screen comes on rather than the "Hold switch on, power off" (or similar) of the rockbox firmware. Never thought anything of it though ;)
Logged

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Rockbox General
| |-+  Rockbox General Discussion
| | |-+  iRiver H340 orig fw boot
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.084 seconds with 15 queries.