@spinifex
Attached are two u-boot files for dreamplug, one is used for testing/load, the other is bootable version.
The code is still in development, so little bit of debug information but it does very little impact on performance.
The kernel can be used by this u-boot need to have guruplug machine type or else you will get the silent treatment.
The kernel also must not probe NAND or else you will get stuck at "loop: module loaded" line.
Now how to setup the u-boot. There are three major step/phase.
1. save existing environment by boot to normal u-boot prompt and use the "printenv" command the select/cut/paste the result to a file.
2. load the first u-boot.bin to have a runtime version. NOTE, this u-boot.bin is not bootable, do not flash this one. commands,
2.1 open serial windows, i.e. putty /dev/ttyUSB0 (not the right command, just to illustrate the idea.)
2.2 At you unix host, using openocd to connect then on second windows do telnet localhost 4444 to get openocd prompt. as follow,
openocd -f plug_openocd.script
, second windows,
telnet localhost 4444
your will see this
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Open On-Chip Debugger
>
, do following,
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Open On-Chip Debugger
> init
> kirkwood_init
> load_image /path/to/u-boot-base0x800000.bin bin 0x800000 bin
> resume 0x800000
Now at your serial tty window, interupt the auto boot sequence. you should be at "Marvell>> " prompt. At this point you can play around, nothing have damaged your existing environment, a reset command will bring you back to factory shipped u-boot. (Note, you may lost the u-boot env, this is to be expected, because I use a different address offset on the NOR)
3. flash the bootable u-boot.
3.1 copy the "u-boot.kwb" to a media that can later plugin to dreamplug. (FAT or EXT2)
3.2 At serial tty windows, do (use media SD card as example)
Marvell>> usb reset
Marvell>> ext2load usb 1 0x6400000 /u-boot.kwb
Marvell>> sf probe 0
Marvell>> sf erase 0x0 0x100000
Marvell>> sf write 0x6400000 0x0 0x100000
# Now retype your u-boot env ... (example)
Marvell>> setenv ethaddr 00:11:22:33:44:55
Marvell>> setenv eth1addr 00:11:22:33:44:56
Marvell>> setenv bootargs console=ttyS0,152000 rdinit=/bin/sh
Marvell>> setenv ...
Marvell>> saveenv
Marvell>> reset
All done. new u-boot looks like this
U-Boot 2011.03-00012-g1a93b51-dirty-pingtoo-v1.2 (Jun 15 2011 - 22:44:57)
Marvell-DreamPlug
SoC: Kirkwood 88F6281_A1
DRAM: 512 MiB
SF: Got idcodes
00000000: c2 20 15 c2 20 . ..
SF: Detected MX25L1605D with page size 256, total 2 MiB
In: serial
Out: serial
Err: serial
Net: egiga0, egiga1
88E1121 Initialized on egiga0
88E1121 Initialized on egiga1
Hit any key to stop autoboot: 0
Marvell>>