Rockbox

  • Status Closed
  • Percent Complete
    100%
  • Task Type Bugs
  • Category Bootloader
  • Assigned To No-one
  • Operating System Coldfire-based
  • Severity Critical
  • Priority Very Low
  • Reported Version Daily build (which?)
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by Alexander Spyridakis - 2007-08-04
Last edited by Steve Bavin - 2007-10-02

FS#7533 - SVN bootloader fails to boot rockbox (H100 & H300)

I just tried to flash my H115 with an SVN bootloader (r14180M-070726). It compiled cleanly and produced a valid hex file, which flashed okay on the device.

Fortunately all the crucial parts of the bootloader work. USB bootloader mode and OF loader work just fine. It is just that when you try to start rockbox bootloader will hang in the process of it.

After some debugging (putting printfs all over the place) I discovered that the bootloader hangs in ata.c, function ata_hard_reset(void) just after the call to the ata_reset() function. It seems that it hangs on the SET_REG call.

I can’t debug more on it because obviously I don’t know what I am doing and flashing again and again the unit is very tiring and risky.

Edit: Today I tested to flash an SVN bootloader on my H300 and I get exactly the same behaviour as the H115. It seems that something is wrong, and it is not target dependant.

Closed by  Steve Bavin
2007-10-02 07:55
Reason for closing:  Fixed
Additional comments about closing:  

I committed LinusN's patch.

Alexander Spyridakis commented on 2007-08-26 20:33

As the edited first post says, the same behavior applies to H300 too.

Peter D'Hoye commented on 2007-09-22 11:09

this looks like the same thing that happens to my h380 (h340 with new disk)… some IDE stuff not ok?

Alexander Spyridakis commented on 2007-09-22 22:45

By the way the last known working revision is r12547.

Admin
Linus Nielsen Feltzing commented on 2007-09-24 07:42

That sounds really odd. This is the change from r12547 to r12548:

Index: bootloader/main.c

— bootloader/main.c (revision 12547)
+++ bootloader/main.c (revision 12548)
@@ -41,8 +41,7 @@
#include “file.h” #include “uda1380.h” #include “eeprom_settings.h” -
-#include “pcf50606.h” +#include “rbunicode.h” #include “common.h”

#include <stdarg.h>

Steve Bavin commented on 2007-09-28 11:21

r12548 is ok here, must be a later mod… I’ll keep looking!

Steve Bavin commented on 2007-09-28 13:19

OK, after a lot of flashing I conclude that this was broken in r14015 (but worked in r14014).

Steve Bavin commented on 2007-09-28 13:33

Reverting http://svn.rockbox.org/viewvc.cgi/trunk/firmware/export/config.h?r1=14014&r2=14015 (thus re-enabling CPU frequency switching) fixes the H300 bootloader for me with current SVN. So, there’s some code in ata_init() that’s failing without CPU frequency switching…

Admin
Linus Nielsen Feltzing commented on 2007-10-01 08:53

Funny, why wouldn’t bootloaders use frequency switching?

Well, the issue here is that the ATA timing parameters are set by cpu_set_frequency() on the Coldfire targets.

Line 188 in bootloader/iriver_h300.c:

  /* Set up waitstates for the peripherals */
  set_cpu_frequency(0); /* PLL off */

The change in config.h removes the call to set_cpu_frequency() and the ATA (and other peripherals, like I2C and timers) are not set up correctly.

Admin
Linus Nielsen Feltzing commented on 2007-10-01 10:14

Here is a patch that solves the problem in much the same way as on the PortalPlayer targets. I have tested it on iriver H140 and iAudio X5, and it works fine. I’d like someone to test it on H300 before committing.

Steve Bavin commented on 2007-10-01 10:36

Hi Linus, works fine here on H300. Commit away!

Alexander Spyridakis commented on 2007-10-01 15:10

Quote:
“That sounds really odd. This is the change from r12547 to r12548”

I should have clarified that this revision was the last I tested with success, sorry for the confusion.
Thanks Linus for looking into this. I will try to flash it right away.

Alexander Spyridakis commented on 2007-10-02 03:19

Success! It works like a charm now.
I just flashed revision 14811 with Linus’ patch provided.
Like Steve said. “Commit away!”

I was scared to hell though, at the first boot I got an exception error! (Can’t replicate anymore)

Jonathan Gordon commented on 2007-10-02 04:10

just tested this patch with a clean svn and it works fine.
commit and release…

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing