MarvellDoveKarmicInstall

This page covers installation of Ubuntu "Karmic" 9.10 on Marvell Dove Yx boards. Dove Z0 boards are not supported anymore.

Known issues

Please consult the known issues with Ubuntu 9.10 ARM platforms before installing.

NAND based bootloaders

Please note that the previous method of using a NAND based bootloader is deprecated. If you're upgrading from such a setup, please change your DIP Switch to go back to SPI boot.

Preparation and image writing

Prep Work

u-boot requires a TFTP server to download files from. Several are available in universe, including attpd and tftpd-hpa. Install the server on a machine the Dove can access and take note of its IP address.

Update the BootROM

All Marvell boards have a BootROM written both in physical ROM, and a small section of SPI that can be used for upgrades. Newest versions of Marvell's kernel requires a newer BootROM, with the newest being 2.04. BootROMs are identical between Y0 and Y1 boards.

Take that file, and place it in the TFTP folder. In addition, please make sure your board is setup for SPI booting (detailed below). At the u-boot propmpt, type the following commands:

Marvell>> setenv serverip *ip address of TFTP server*
Marvell>> setenv ipaddr *board IP address*
Marvell>> tftp 2000000 dove_bootrom_2_04_spi_0x1.img
Marvell>> protect off f87f0000 f8800000
Marvell>> erase f87f0000 f8800000
Marvell>> cp.b 2000000 f87f0000 10000
Marvell>> protect on f87f0000 f8800000
Marvell>> reset

If successful, the board will boot back into u-boot. Depending on the version of u-boot in SPI, it may or may not print a message about the new BootROM in SPI. These messages look like the following:

BootROM version (on chip)= 1.07
BootROM version (upgrade on SPI)= 2.04
BootROM Status:
Number of retries = 0

Update u-boot

The stock u-boot on the Marvell Dove Y0 board lacks USB support, and must be upgraded to a newer version. In addition, there are modifications made by Canonical to make u-boot automatically start USB and SATA devices. Canonical-modified versions have a Canonical>> prompt instead of Marvel>>.

Canonical versions have a version string similar this

U-Boot 1.3.4 (Oct 15 2009 - 12:11:45) Marvell version: 4.3.0 NQ - SPI BOOT. Canonical Development Version.

The current recommend version of u-boot for dove is Marvell-4.3.1

If your u-boot is older, you'll have to update it to a newer version. u-boot binaries for Y0 and Y1 are located here: http://people.canonical.com/~mcasadevall/dove/. The date of the binary is at the end of each filename in MMDDYYYY format. Official binaries from Marvell end in Marvell-VERSION. The filename also includes where the u-boot is supposed to be installed to, and the amount of RAM the board should have; MAKE SURE THESE VALUES ARE CORRECT; flashing a bootloader which doesn't match the hardware revision or amount of RAM may prevent the board from powering up and requiring UART recovery.

Warning /!\ DANGER - If you are at all unsure, please confirm what you are doing is correct with NCommander; a bad u-boot flash WILL brick your board without a JTAG adapter

Lastest Y0 Image for 512M boards: http://people.canonical.com/~mcasadevall/dove/y0/uboot-SPI-Y0-512M_Marvell-4.3.1.bin
Lastest Y1 Image for 1GiB boards: http://people.canonical.com/~mcasadevall/dove/y1/uboot-SPI-Y1-1GB_Marvell-4.3.1.bin

Make sure that the serverip and ipaddr variables are properly set in u-boot (use printenv *name* to check, setenv *name* *value* to change, and save to commit). If you can currently TFTP images to your board, these values are correct.

The bubt command is used for upgrading u-boot on the same medium (i.e., flashing a new u-boot to SPI while booted from SPI). It can't be used to go from one boot medium to another (i.e., SPI to NAND).

Marvell>> setenv serverip ''TFTP Server''
Marvell>> setenv ipaddr ''board IP address''
Marvell>> bubt ''filename of uboot''

Answer yes when asked if you wipe the environmental variables. Type reset when done to boot into the new u-boot

Writing the Image

First of all you need to download the Image to a large enough USB stick (1GB will suffice) that u-boot will be able to use; SanDisk were reported as supported.

For writing the image either use the usb-imagewriter tool which you can install from the Jaunty universe archive (packages for Hardy (8.04) and Intrepid (8.10) can be found at the usb-imagewriter PPA) or follow the commandline method below.

sudo dd bs=4M if=./karmic-desktop-armel+dove.img of=/dev/sdb

(assuming your USB stick is called /dev/sdb)

You'll also need a SATA disk or large USB harddrive as the target installation device.

Warning /!\ USB booting is supported, but the Dove bootloader is extremely picky on what devices it will boot from. Using SATA is recommended and perferred

Starting the live system manually

Warning /!\ These instructions are currently for reference if you need to manually start from the boot prompt. Current u-boot versions will autostart from a properly written USB stick

Attach the USB pendrive you made in the previous step to the Dove, and then reset the board with the drive attached.

IMPORTANT - Don't type usb start more than once in any given u-boot session since it will cause u-boot to loose track of all devices it currently sees.

You can test if the drive was detected like this:

Marvell>> usb start
(Re)start USB...
USB:   scanning bus for devices... 2 USB Device(s) found
       scanning bus for storage devices... 1 Storage Device(s) found
Marvell>> fatls usb 0:1
            casper/
            dists/
            pics/
            .disk/
            install/
            preseed/
            pool/
     3143   md5sum.txt
      368   boot.scr
      228   readme.diskdefines

3 file(s), 7 dir(s)

If you get file output, your in business. The live image can be started with the following if you have the hush shell available.

Marvell>> usb start
(Re)start USB...
USB:   scanning bus for devices... 2 USB Device(s) found
       scanning bus for storage devices... 1 Storage Device(s) found
Marvell>> fatload usb 0:1 0x1000 boot.scr
reading boot.scr

368 bytes read
Marvell>> autoscr 1000
## Executing script at 00001000
Loading Ubuntu LiveCD...
reading /casper/uImage
........................................................................................................................................................................................................................................................................
Wrong Ramdisk Image Format

Starting kernel ...

Uncompressing Linux............................................................
.............................................................................................................. done, booting the kernel.
Linux version 2.6.31-201-dove (buildd@jaboticaba) (gcc version 4.4.1 (Ubuntu 4.4.1-3ubuntu1) ) #5-Ubuntu Mon Aug 24 23:06:43 UTC 2009 (Ubuntu 2.6.31-201.5-dove)

If your using a non-hush enabled u-boot, you will have to load the uImage and uInitrd by hand to start the live environment

Marvell>> usb start
(Re)start USB...
USB:   scanning bus for devices... 2 USB Device(s) found
       scanning bus for storage devices... 1 Storage Device(s) found
Marvell>> fatload usb 0:1 0x20000 /casper/uImage
Marvell>> fatload usb 0:1 0x110000 /casper/uInitrd
Marvell>> setenv bootcmd mem=512M file=/cdrom/preseed/ubuntu.seed -- boot=casper
Marvell>> bootm 0x20000 0x110000

Boot DIP reference

SW7 1-5 on the Dove Y0 board controls where the BootROM does its initial program load from. By default this is set to 0x01, or SPI booting, which as of October 16th, is now the only supported method. The correct settings for SPI booting are:

Boot Mode

1

2

3

4

5

SPI

Down

Up

Up

Up

Up

ARM/MarvellDoveKarmicInstall (last edited 2009-10-28 16:05:17 by cpe-66-66-76-118)