Rockbox

Tasklist

FS#6721 - RoLo ipod disk mode from ROM instead of rebooting

Attached to Project: Rockbox
Opened by Dave Chapman (linuxstb) - Saturday, 03 March 2007, 13:22 GMT
Task Type Patches
Category Drivers
Status New
Assigned To No-one
Operating System PortalPlayer-based
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 1
Private No

Details

This patch should apply to all ipods, but needs testing - on both a mixture of ipods and mixture of operating systems. I've tested it successfully on my Color with both Linux and Mac OS X.

Current SVN behaviour is to write some magic to the end of IRAM and reboot the ipod when a USB connection is detected. This causes the Apple bootloader to start the disk mode application which is stored in flash ROM.

This patch cuts out the reboot stage and uses rolo to start the disk mode application directly from flash - meaning the ipod enters disk mode almost immediately. This is done in a new rolo_load_rom() function which copies the image from ROM to RAM and then executes it.

This task depends upon

Comment by Douglas Valentine (Dwyloc) - Saturday, 03 March 2007, 20:32 GMT
I have just tested your patch on my ipod nano connecting to my MS Windows XP Pro SP2 laptop and it work’s perfectly and boots into disk mode very quickly.

Sadly it dose not fix the flash disk mode being to slow when writing files to disk to be much use, but I don’t think you were expecting this patch to help with that problem. As it still takes about 20 minutes to extract rockbox with disk mode as opposed to under 1 minute to extract rockbox under the retain OS disk mode.
Comment by Zakk Roberts (midkay) - Saturday, 03 March 2007, 21:16 GMT
Douglas: Really? On my iPod 5G it takes about 45 seconds to extract in Disk Mode, maybe 20 seconds in RetailOS. I don't see why the nano should be slower.. and such a difference between RetailOS and disk mode.
Comment by Douglas Valentine (Dwyloc) - Sunday, 04 March 2007, 02:09 GMT
The strange part is that although copying over the zip file is slightly slower under the firmware disk mode its not that much lower, its when you start accessing lots of files it gets very slow.

I have also tested this with 6 different computers running Windows XP Pro, 2000 Pro, Vista both 64-bit and 32 bit versions and even an Amiga 1200 with USB and the slow firmware disk mode problem is consistent. None of the computers I have tested with have any problems with my h140 running rockbox or the retail OS or my nano or 80GB ipod video running there retail OS.

As such I look forward to rockbox having its own USB disk mode but its not a big problem as I can just boot into retail mode to transfer files back and forward.

It will also be interesting to compare the firmware disk mode performance of my 80GB ipod video then it becomes supported by rockbox.
Comment by Paul Louden (darkkone) - Sunday, 04 March 2007, 02:23 GMT
@Midkay: The Nano firmware-based disk mode is ridiculously slow. If I extract a Rockbox.zip and then attempt to copy it over it took over 7 minutes (back when we had fonts included) as opposed to a matter of seconds when using the Apple OS version of disk mode. On the Nano there's something about it that makes it significantly more slow than it is on the other iPods.
Comment by Zakk Roberts (midkay) - Sunday, 04 March 2007, 03:06 GMT
Paul: I see, kinda weird... this patch sounds very useful to me though. I'll try it out tonight.
Comment by Ewan Davies (drspoon) - Sunday, 04 March 2007, 17:49 GMT
Windows users beware, the windows zip utility is awful. 7-Zip appears to be much faster. Not sure why though.
Comment by Mikael Magnusson (mikaelh) - Monday, 05 March 2007, 16:51 GMT
<slightly offtopic>Updating the nano ipod firmware to the latest version helps with the slowness, first time you boot with it it'll reflash the ipod, then you can reinstall the rockbox bootloader again and everything should be fast. You can download it from here http://www.felixbruns.de/iPod/firmware/ (17.1.3) , just unzip the file and write it to the first partition, or use iTunes or something if you want to.</slightly offtopic>
Comment by Douglas Valentine (Dwyloc) - Monday, 05 March 2007, 17:06 GMT
Sadly I am already running the latest version of the nano firmware so if this version is faster I don't want to see the slow version ;)

Back on topic I don't know exactly why but the last two times I RoLo'ed the disk mode last night apples please reinstall your ipod screen in lots of languages has been
displayed for a few seconds before disk mode loads as normal.
Comment by Chris (decayed.cell) - Tuesday, 06 March 2007, 01:30 GMT
Okay, this completely screws up on my 5.5G Video - in Rockbox, when you plug in the iPod into the computer via USB Rockbox freezes and the computer says that it cannot recognise one of the USB devices attached to this computer. I believe that the kocop + RoLo problem was fixed a few revisions back?
Comment by Chris (decayed.cell) - Tuesday, 06 March 2007, 01:45 GMT
Also, when I hold Menu to plugin to the computer (thus charge), it is recognised by the computer and iTunes as an iPod, and iTunes tries to sync the iPod. Then I get a USB device not recognised error a few moments later :D
Comment by Douglas Valentine (Dwyloc) - Wednesday, 07 March 2007, 19:53 GMT
Loading diskmode no longer works with current SVN build using my iood nano since COP support was added to SVN.

When you plugin the USB cable into the IPOD the USB logo is displayed then cleared and the backlight is switched off at this point the ipod locks up and the only way out is to reset the ipod.
Comment by Dominik Riebeling (bluebrother) - Friday, 09 March 2007, 23:44 GMT
This doesn't work with current svn anymore. I tried with r12600 (last release before COP got added). Switching to disk mode works nicely, but after a short "do not connect" message it changes to "OK to disconnect". Linux doesn't seem to recognize the ipod at that stage. Holding down "Menu" while connecting the USB cable to prevent USB mode also doesn't work (but I'm not sure if that is related)

Device is Ipod Mini 2G.
Comment by Mark Reiche (Porphyr) - Wednesday, 11 April 2007, 08:11 GMT
Has anybody any idea why this does not work anymore - or more important: how this can be fixed?
Comment by JerryLange (psycho_maniac) - Sunday, 11 November 2007, 07:38 GMT
probably needs to be re synced. this would be a very nice patch to test though.
Comment by Chris Kagan (KindOfBlues71) - Thursday, 24 January 2008, 14:46 GMT
Any chance this can be re-synced? I'm using tdtooke's Underground custom build (based on r16087) and would love to request he add it to his next update.
Comment by Craig Elliott (MoSPDude) - Monday, 30 June 2008, 06:28 GMT
Updated to r17888.

If I reboot my nano, then plug in without starting playback it works. Otherwise, it shows "Use iTunes to restore" on screen.
Comment by Thomas Schott (scotty) - Friday, 29 August 2008, 10:14 GMT
Tested with r18359 on iPod Color 40GB under Linux:
- very fast switching to disk mode - great :-)
- sometimes there are USB device resets which slow down the connection
- backlight is ON all the time (with unpatched rockbox backlight is OFF in disk mode)

Good work so far!
Comment by Thomas Schott (scotty) - Sunday, 31 August 2008, 13:57 GMT
The USB device resets mentioned above are not caused by this patch, they also occur with the unpatched rockbox.
Comment by Thomas Schott (scotty) - Thursday, 04 September 2008, 10:45 GMT
Found another issue: when using rolo diskmode my ipod only connects at full speed mode, whereas I get high speed with unpatched RB.

linux syslog (with patch):
usb 6-1: new full speed USB device using uhci_hcd and address 6
usb 6-1: new full speed USB device using uhci_hcd and address 7
usb 6-1: not running at top speed; connect to a high speed hub

linux syslog (unpatched):
usb 6-1: new full speed USB device using uhci_hcd and address 8
usb 8-3: new high speed USB device using ehci_hcd and address 10
Comment by Boris Gjenero (dreamlayers) - Thursday, 08 January 2009, 18:39 GMT
With r19724, my 5G 30GB iPod connects in high speed mode. I'm attaching an updated patch because the 2nd chunk of usb.c failed.
Comment by Boris Gjenero (dreamlayers) - Saturday, 17 January 2009, 20:30 GMT
Now with r19765 and some other patches it went to ok to disconnect without any connection happening. A few times I've seen the screen telling me to restore with iTunes, though I didn't actually have to restore.
Comment by Marcus Lowe (skyfish) - Wednesday, 10 February 2010, 01:42 GMT
Could someone please be so kind to sync with svn?

Loading...