Rockbox mail archiveSubject: Re: "Bad checksum" when booting Rockbox on U.S. Iriver H320 while fully powered down
Re: "Bad checksum" when booting Rockbox on U.S. Iriver H320 while fully powered down
From: James Teh <jamie_at_jantrid.net>
Date: Tue, 19 Jun 2007 22:36:52 +1000
I managed to get this working by hacking the bootloader. I figured that
the only commonalities between the unit booting from the charging screen
and the unit booting from USB were that:
* The unit is powered up for longer before it attempts to boot Rockbox; and
* While it is waiting, it has cpu idle mode enabled.
So, I inserted a quarter second pause with CPU idle mode enabled before
ATA initialisation and it now works! The bizarre part is that this unit
used to work without this hack. I don't understand what has changed, nor
how it could have changed. It must be a hardware fault of some sort, but
the unit seems to work fine apart from this.
Any thoughts? Could this be anything to do with the HDD dying? It seems
to work fine, but ... <shrugs>
Following is the patch to the code that makes this thing work:
--- bootloader/iriver_h300.c (revision 13673)
+++ bootloader/iriver_h300.c (working copy)
_at__at_ -332,6 +332,10 _at__at_
rc = ata_init();
I don't see much point in filing a bug or patch in the tracker for this,
as this unit has obviously morphed in some bizarre way, but I thought
I'd post my findings here anyway.
James Teh wrote:
> Hi all,
> I have a friend's U.S. Iriver H320 sitting on my desk which is
> exhibiting some rather strange behaviour. When attempting to power up
> while the unit is fully powered down (not on charge, decently charged
> battery), it spins up the drive, attempts to load Rockbox and fails a
> few seconds later with a "Bad checksum" error. Strangely, connecting it
> to USB while powered down so that it enters bootloader USB mode and then
> disconnecting allows it to start Rockbox with no problems. I have tried
> zeroing the start and end of the drive, repartitioning and reformatting,
> several versions of Rockbox and reflashing the firmware, all with no
> change. I can start the Iriver firmware with no problems with rec+play.
> The unit was running bootloader v5. Hoping that perhaps it might work
> with the new bootloader from SVN, I decided to risk building the
> bootloader from svn and flashing it on to the unit. This worked without
> problems, but alass, I still receive a "bad checksum" error when booting
> when fully powered down. Stranger still, powering down, plugging in the
> charger (entering the new bootloader charging screen) and then powering
> up allows the unit to boot Rockbox with no problems.
> To summarise, booting Rockbox when fully powered down fails with a "Bad
> checksum" error, but booting Rockbox when on the bootloader charging
> screen or after bootloader USB mode works correctly. Booting the Iriver
> firmware always works.
> Apparently, this started happening after the unit's battery was
> accidentally drained while playing audio in Rockbox, causing it to power
> down. I don't really see how this is related. The only thing that makes
> any sense is that some sort of hardware damage was caused, but this
> doesn't explain how it is able to boot Rockbox fine when in the charging
> screen or after USB bootloader mode.
> Any ideas? I am totally at a loss.
-- James Teh Email: jamie_at_jantrid.net WWW: http://www.jantrid.net/ MSN Messenger: jamie_at_jantrid.net Jabber: jteh_at_jabber.org Yahoo: jcs_tehReceived on 2007-06-19