Setting up again, October 2017.

Update u-boot

Get the latest u-boot u-boot.kwb from this Debian location.

Put it on a FAT formatted USB stick.

Marvell>> usb start
(Re)start USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... found
Marvell>> fatload usb 2:1 0x0800000 u-boot.kwb
Marvell>> sf probe 0
SF: Detected MX25L1605D with page size 256 Bytes, erase size 64 KiB, total 2 MiB
Marvell>> sf erase 0x0 0x80000
SF: 524288 bytes @ 0x0 Erased: OK
Marvell>> sf write 0x0800000 0x0 0x80000
SF: 524288 bytes @ 0x0 Written: OK
Marvell>> reset
resetting ...
SF: Detected MX25L1605D with page size 256 Bytes, erase size 64 KiB, total 2 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0, egiga1
88E1116 Initialized on egiga0
88E1116 Initialized on egiga1
IDE: 4 5 USB Device(s) found
       scanning usb for storage devices...
CACHE: Misaligned operation at range [1ffbb8b8, 1ffbc0c0]
CACHE: Misaligned operation
=>

(The above CACHE errors seem to have been benign.)

Power off and on again. Then:

=> version
U-Boot 2016.11+dfsg1-4 (Mar 27 2017 - 18:39:51 +0000)
Marvell-DreamPlug
gcc (Debian 6.3.0-10) 6.3.0 20170321
GNU ld (GNU Binutils for Debian) 2.28
=>

Debian installation onto SD card

Here we are installing onto an SD card.

The installer consists of the uImage and uInitrd from this Debian location.

Put them on a FAT formatted USB stick.

Check if necessary which device with fatls usb 0.

Then:

=> fatload usb 0:1 0x00800000 /uImage
reading /uImage
2060071 bytes read in 124 ms (15.8 MiB/s)
=> fatload usb 0:1 0x01100000 /uInitrd
reading /uInitrd
11715480 bytes read in 1028 ms (10.9 MiB/s)
=> setenv bootargs console=ttyS0,115200n8 base-installer/initramfs-tools/driver-policy=most
=> bootm 0x00800000 0x01100000

The installer boots, and eventually finishes. Remove USB stick.

On a dreamplug, the SD card is also seen as USB.

=> usb start
=> ext2ls usb 1:0

can be used to confirm which device it is:

=> ext2ls usb 1:1
<DIR>       1024 .
<DIR>       1024 ..
<DIR>      12288 lost+found
          157820 config-4.9.0-4-marvell
         2049720 vmlinuz-4.9.0-4-marvell
<SYM>         26 initrd.img.old
<SYM>         23 vmlinuz.old
<DIR>       1024 dtbs
         1762914 System.map-4.9.0-4-marvell
<SYM>         26 initrd.img
<SYM>         23 vmlinuz
<SYM>         43 dtb-4.9.0-4-marvell
<SYM>         43 dtb
        12276198 initrd.img-4.9.0-4-marvell

Then:

=> setenv bootargs_console console=ttyS0,115200
=> setenv bootcmd_usb 'usb start; ext2load usb 0:1 0x00800000 /uImage; ext2load usb 0:1 0x01100000 /uInitrd'
=> setenv bootcmd 'setenv bootargs ${bootargs_console}; run bootcmd_usb; bootm 0x00800000 0x01100000'
=> saveenv
=> boot

The uImage and uInitrd created during the installation have been placed on the first partition of the internal storage (in the installed system this is seen as /dev/sda1).

Hence ext2load usb 0:1 above.

In the installed system we see that the files dtb, uInitrd and uImage have been created there:

root@dreamplug:~# mount /dev/sda1 /mnt
root@dreamplug:~# ls -lt /mnt | head -n 4
total 47964
-rw-r--r-- 1 root root    10287 Oct 21 12:32 dtb
-rw-r--r-- 1 root root 12276262 Oct 21 12:32 uInitrd
-rw-r--r-- 1 root root  2060071 Oct 21 12:32 uImage

Following the Debian installation notes for dreamplug, we can create the file /etc/fw_env.config with the contents:

# DreamPlug with debian U-boot
# Configuration file for fw_(printenv/saveenv) utility.
# Up to two entries are valid, in this case the redundant
# environment sector is assumed present.
# MTD device name       Device offset   Env. size       Flash sector size
/dev/mtd1                   0x0000          0x1000         0x1000

Now we can use fw_printenv and fw_setenv to modify the u-boot environment from within the Linux system.

After removing old variables (which incidentally were not erased when updating u-boot) we now have:

root@dreamplug:~# fw_printenv
arcNumber=3550
baudrate=115200
bootargs=console=ttyS0,115200n8 root=/dev/sdb2 rootwait
bootargs_console=console=ttyS0,115200
bootcmd=setenv bootargs ${bootargs_console}; run bootcmd_usb; bootm 0x00800000 0x01100000
bootcmd_usb=usb start; ext2load usb 0:1 0x00800000 /uImage; ext2load usb 0:1 0x01100000 /uInitrd
bootdelay=10
eth1addr=f0:ad:4e:00:82:05
ethact=egiga0
ethaddr=f0:ad:4e:00:82:04
filesize=298d65
machid=0x00000DDE
stderr=serial
stdin=serial
stdout=serial