Installation instructions for Dreamplug

This forum is for Marvell Kirkwood devices such as the GoFlex Home/Net, PogoPlug v1/v2, SheevaPlug, and ZyXEL devices.

Installation instructions for Dreamplug

Postby ineiti » Thu Jul 24, 2014 3:23 pm

Micro SD Card Creation
1. Insert a micro SD card into your computer and record which device identifier it is (dmesg | tail)
2. Make sure it's not mounted (umount /dev/sdX* or umount /dev/mmcblk*)
3. Start fdisk to partition the SD card:
$this->bbcode_second_pass_code('', 'fdisk /dev/sdX')
4. At the fdisk prompt, create the new partitions:
Type n, then p for primary, 1 for the first partition on the drive, and press ENTER twice to accept default values.
Exit by typing w.
5. Create and mount the ext4 filesystem:
$this->bbcode_second_pass_code('', 'mkfs.ext4 /dev/sdX1
mkdir root
mount /dev/sdX1 root')
6. Download and extract the root filesystem:
$this->bbcode_second_pass_code('', 'wget http://archlinuxarm.org/os/ArchLinuxARM-kirkwood-latest.tar.gz
tar -xf ArchLinuxARM-kirkwood-latest.tar.gz -C root')
7. Unmount the partition:
$this->bbcode_second_pass_code('', 'umount root')
8. Remove the micro SD card from your computer and insert it into the Dreamplug

Connecting with the UART
1. Connect the JTAG box to the UART connector on the Dreamplug, and the USB cable to your computer.
2. Open up a terminal to the serial device created by your system (typically something like /dev/ttyUSB0) with the settings 115200n8. An easy way to do this is using screen:
$this->bbcode_second_pass_code('', 'screen -h 10000 /dev/tty.usbserial-FTWKUDSOB 115200 # for Mac
screen -h 10000 /dev/ttyUSB0 115200 # for Linux')
3. Power on the Dreamplug, and once you see text press any key to stop auto booting. You should be at a console that looks like:
$this->bbcode_second_pass_code('', 'Marvell>>')

Update U-Boot
1. Download the new u-boot from http://profeda.org/Files/u-boot.kwb
2. Copy it to a FAT-formatted usb-key and connect it to your Dreamplug
3. Connect with the UART
4. On the u-boot prompt, initialize USB, load the file and check its CRC to be "59ec1b9d":
$this->bbcode_second_pass_code('', 'usb start; usb start
fatload usb 2:1 0x800000 /u-boot.kwb
crc32 0x800000 0x393D0')
5. Now prepare the flash-memory and write the new u-boot
$this->bbcode_second_pass_code('', 'sf probe 0
sf erase 0x0 0x80000
sf write 0x800000 0x0 ')
6. It is a good idea to check that the CRC is still correct:
$this->bbcode_second_pass_code('', 'sf read 0x800000 0x0 0x393D0
crc32 0x800000 0x393D0')
7. Now you can reboot:
$this->bbcode_second_pass_code('', 'reset')

U-boot configuration
1. Connect with the UART
2. Run the following commands to configure booting:
$this->bbcode_second_pass_code('', '
setenv bootcmd 'usb start; run boot_usb; run boot_microsd'
setenv boot_usb 'setenv bootdev 2:1; run boot_kernels'
setenv boot_microsd 'setenv bootdev 0:1; setenv bootargs $(bootargs_microsd); run boot_kernels'
setenv boot_kernels 'run bootcmd_uimage; run bootcmd_dt'
setenv bootargs 'console=ttyS0,115200 loglevel=7 rw root=/dev/sda1 rootwait'
setenv bootargs_microsd 'console=ttyS0,115200 loglevel=7 rw root=/dev/sda1 rootwait'
setenv bootcmd_uimage 'ext2load usb $(bootdev) 0x00800000 /boot/uImage; bootm 0x00800000'
setenv bootcmd_dt 'ext2load usb $(bootdev) 0x00408000 /boot/zImage; ext2load usb $(bootdev) 0x00900000 /boot/dtbs/kirkwood-dreamplug.dtb; bootz 0x00408000 - 0x00900000'
')
The root-password is "root"

This configuration will first try to boot from an external USB-drive, first uImage, then -dt kernel. If that fails, it will try the internal microSD, first uImage, then -dt kernel.

PARTUUID
It is a good idea to change the $this->bbcode_second_pass_code('', 'bootargs_microsd') to include the PARTUUID of your internal microSD-card. Once you boot from it, use the $this->bbcode_second_pass_code('', 'blkid') command to find out what it is. Take care not to use UUID, but PARTUUID. Also capitalize the number, else it won't work!
$this->bbcode_second_pass_code('', 'setenv bootargs_microsd 'console=ttyS0,115200 loglevel=7 rw root=PARTUUID=SSSSSSSS-PP rootwait'
')
This helps if you plug in a USB-modem that has a CD-ROM emulation, which would receive /dev/sda1 and replace your root-filesystem...

WLAN
I never managed to have a reliable WLAN with Archlinuxarm. Buy a USB-key for 10$...
ineiti
 
Posts: 39
Joined: Fri Aug 23, 2013 9:03 pm

Return to Marvell Kirkwood

Who is online

Users browsing this forum: No registered users and 7 guests