Return of the Shiva II

(this is just a fancy reminder for myself for the next time I trash my sheeva)

Upgrading the u-boot of the sheevaplug is super easy.

In the unlikely event that something goes wrong and you trashed the u-boot, so that the sheeva doesn't respond to anything anymore, don't panic! It's not to hard to flash u-boot again without a working instance on the device itself.

First of all, install openocd on whatever you have left working (e.g. your laptop), ensure that the usb cable is still well-connected and open three shells, one root (#) and two users ($).

$ screen /dev/ttyUSB0 115200

# openocd -f /usr/share/openocd/scripts/board/sheevaplug.cfg

$ telnet localhost 4444
Connected to localhost.
Escape character is '^]'.
Open On-Chip Debugger
> sheevaplug_init
target state: halted
target halted in ARM state due to debug-request, current mode: Supervisor
cpsr: 0x000000d3 pc: 0xffff0000
MMU: disabled, D-Cache: disabled, I-Cache: disabled
> nand probe 0
NAND flash device 'NAND 512MiB 3.3V 8-bit (Hynix)' found
> nand erase 0 0x0 0xa0000
erased blocks 0 to 5 on NAND flash device #0 'NAND 512MiB 3.3V 8-bit'
> nand write 0 /tmp/u-boot.kwb 0 oob_softecc_kw
> resume

(especially the 'nand write' needs a bit of time and produces no output, so calm down, that's okay)

In the first shell with the tty connection we should see now our lovely u-boot again!

Watch out, for me on this try, u-boot claimed that my configuration was broken and used its default. Not a problem for me, i just redid what is described on the install page above: (I would have needed to anyway, as 'mmcinit' changed to 'mmc init')

>> setenv bootargs_console console=ttyS0,115200
>> setenv bootcmd_mmc 'mmc init; ext2load mmc 0:1 0x00800000 /uImage; ext2load mmc 0:1 0x01100000 /uInitrd'
>> setenv bootcmd 'setenv bootargs $(bootargs_console); run bootcmd_mmc; bootm 0x00800000 0x01100000; reset'
>> saveenv

'reset' is added by me to restart the sheeva in case the bootcmd failed. 'mmcinit' used to fail sometimes with the old u-boot, now it seems to be better, but you can never be sure…

So, relatively easy: Welcome back sheeva!

Let's see then I am able to trash it again…

Disclaimer: Yes, the upgrade description linked above is completely correct and should work flawless for everyone. Seems like I overlooked a 'FAT entry invalid' message or something like that so I flashed nothing to the place u-boot belongs to…

P.S.: New posts related to APT changes? Mhhh. Not too soon, but i will try…

This blog has no centralized comment section. Feel free to comment on it in your own blog, some other page or channel you are on to discuss stuff and/or contact me by mail. I am happy to add pointers and updates as needed.