Just in case people are curious:
I spent a couple hours figuring out how we can reflash the ROM with a suitable bootloader image once we have ironed out all the bugs in spin's method of running code on the phatbox.
Ideas I considered and rejected:
* Using the linux MTD driver: The phatbox kernel is compiled without loadable module support. Damn.
* hermit
http://cvs.sourceforge.net/viewcvs.py/ceivalinux/loader/hermit-1.3-cc5: While this is made for our processor, there's only code here to reflash Intel chips -- ours is an ST Microelectronics chip.
The winner:
* flash_and_burn
http://cvs.sourceforge.net/viewcvs.py/freebios/freebios2/util/flash_and_burn/ This utility comes from the freebios project, which aims to create replacement BIOS code for x86 motherboards. Well, that's the wrong architecture, and I can't find any evidence that people have run it on ARM, but it DOES have support for programming an ST Micro chip, the M29F400BT (ID 0x20 0xD5). If we add our chip, the M28W200B (ID 0x20 0x57), it should be able to program it -- our CPU may be different, but the programming algorithm is the same.
For those of you who HAVEN'T ever looked into how you program a flash chip, it turns out to not be
that hard. You write a sequence of magic numbers to magic addresses within the chip's address space, and then just start writing to it as if it were ram.
I know you were all
dying to hear this, but there ya go. I'm still looking into finding a suitable replacement bootloader, if that turns out to be an easier solution than patching the existing one.
Ben