How I bricked my SL4 with blupdater

"geron" <[email protected]> Wed, 2 Feb 2005 11:55:27 +0100
Newsgroups gmane.comp.handhelds.simpad.linux
Message-ID <00a201c50915$eca8b610$6600a8c0@holger>
The short strory:
I forgot to erase the flash before serloading blupdater.

The long story:
Everything went fine during flashing and running blupdater. Countdown was
running, pad was identified correctly, old loader was backed up, new loader
was flashed, no error messages.

So, I confidently pressed reset. But instead of rebooting, the pad
immediately powered off. Pressing the power button made the backlight
flicker shortly. Holding it down kept the backlight on while holding. If
holding a longer time, the screen became white slowly.

Time for JTAG. I always wanted to get familiar whith it, now I had the
right motivation. ;-) I soldered the jumpers, made a cable and compiled the
software. Thanks to Walter for his excellent JTAG-HowTo!

To find out what happened, I read out the flash form 0x00000 to 0x80000
using JTAG.
  0x00000 to 0x3FFFF was completely 0x00
  at 0x40000 was the bootldr-params.jffs2 starting whith 0x85 0x19 0x01 0xE0
  the rest was 0xFF

Obviously, the padding bytes and the bootldr-params got flashed, but why
didn't the bootldr? I decided to recreate the starting situation and having
a look into blupdater.

I JTAG'ed my old backup of /dev/mtd/0 which I did a year ago. This way, I
got back the PBL and bootloader 2.5.3 in one single step w/o altering other
parts of the flash. Guess, I never was that happy to see the tartan pattern
on the screen. ;-) Then I serloaded blupdater again and during the countdown
I pressed reset. After reboot, the flash procedure was skipped and I got the
serial console. Chris, this works very well, nice idea!

While booting, the kernel threw some warnigs:

Inode #310 was a directory with children - removing those too...
Inode #311 was a directory with children - removing those too...
Cannot remove child "Tag", ino #0, because it doesn't exist
Cannot remove child "Root", ino #0, because it doesn't exist
Cannot remove child "Repository", ino #0, because it doesn't exist
Cannot remove child "Entries", ino #0, because it doesn't exist
Inode #390 was a directory with children - removing those too...

Now I got the suspicion...
And yes, this is what my root directory looked like:

/ # ls -l
drwxr-xr-x    1 1000     100             0 Jan  1 00:00 bin
drwxr-xr-x    1 1000     100             0 Jan  1 00:00 boot
-rw-r--r--    1 1000     100         97438 Jan  1 00:00
bootldr-SIMpadCL-2.21.13.bin.gz
drwxr-xr-x    1 0        0               0 Jan 29  2005
bootldr-SIMpadCL-2.21.13.bin.md5
drwxr-xr-x    1 0        0               0 Jan  1 00:00
bootldr-SIMpadSL-2.21.13.bin.gz
drwxr-xr-x    1 0        0               0 Dec  2  2003
bootldr-SIMpadSL-2.21.13.bin.md5
-rw-r--r--    1 1000     100           318 Jan  1 00:00
bootldr-params.jffs2.gz
drwxr-xr-x    1 0        0               0 Feb 26  2004
bootldr-params.jffs2.md5
drwxr-xr-x    1 0        0               0 Jan  1 00:00 dev
drwxr-xr-x    1 0        0               0 Jan 29  2005 etc
drwxr-xr-x    1 1000     100             0 Dec 17  2003 lib
-rwx------    1 1000     100          5023 Jan  1 00:00 linuxrc
drwxr-xr-x    1 0        0               0 Sep  4  2004 mnt
dr-xr-xr-x   24 0        0               0 Jan  1 00:00 proc
drwxr-xr-x    1 1000     100             0 Jan  1 00:00 sbin
drwxr-xr-x    1 1000     100             0 Jan  1 00:00 sys
drwxrwxrwt    2 0        0              40 Jan  1 00:00 tmp
drwxr-xr-x    1 1000     100             0 Jan  1 00:00 usr
drwxr-xr-x    1 1000     100             0 Jan  1 00:00 var

Note that bootldr-SIMpadSL-2.21.13.bin.gz and
bootldr-SIMpadSL-2.21.13.bin.md5 are flagged as directory with a size of 0!
This situation Chris's linuxrc wasn't able to handle, of course. Without
digging deeply into linuxrc, I guess since both files were affected, the MD5
check didn't trigger. And since there was actually no bootldr file or the
size was 0, only padding bytes got flashed. Really bad luck.

Anyway, I erased the flash did all again, and now I've got a running 0.9.0.
Very impressive, especially the speed improvement! Really good work, guys!

Now, what do we get out of it?
Chris, the 1st step in your blupdater HowTo should be "Erase The Flash". But
what with the 16MB devices? Do we need a padded blupdater image?

geron




-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl