MarvellDoveKarmicInstall

Differences between revisions 14 and 15
Revision 14 as of 2009-10-14 05:02:36
Size: 8532
Editor: cpe-66-66-76-118
Comment:
Revision 15 as of 2009-10-16 17:45:40
Size: 7960
Editor: cpe-66-66-76-118
Comment:
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:
This page describes how to install a Karmic (9.10) image to an Marvell Dove board. This page describes how to install a Karmic (9.10) image to an Marvell Dove board. As a note, please note that the previous method of using a NAND based bootloader is depreicated. If your upgrading from such a setup, please change your DIP Switch to go back to SPI boot.
out the n
== Preparation and image writing ==
Line 4: Line 6:
== Preparation and image writing == ==== Prep Work ====
u-boot requires a TFTP server to download files from. Several are available in universe, including attpd and hda-tftpd. 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 vsmall section of SPI that can be used for upgrades. Newest versions of Marvell's kernel requires a newer BootROM, with the newest being 2.0.1. BootROMs are identical between Y0 and Y1 boards.

 * BootROM 2.01: http://people.canonical.com/~mcasadevall/dove/dove_bootrom_2_01_spi_0x1.img

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_01_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.
Line 11: Line 33:
U-Boot 1.3.4-dirty (Sep 16 2009 - 20:05:29) Marvell version: 4.2.3 NQ.  Canonical Development Version. U-Boot 1.3.4 (Oct 15 2009 - 12:11:45) Marvell version: 4.3.0 NQ - SPI BOOT. Canonical Development Version.
Line 14: Line 36:
If your u-boot is older, you'll have to update it to a newer version. u-boot binaries are located here: http://people.canonical.com/~mcasadevall/dove/. THe date of the binary is at the end of each filename in MMDDYYYY format. 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. 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.
Line 21: Line 43:
==== Going from stock Marvell to NAND ====
/!\ This process is used if you currently are using the stock Marvell used in flash vs. a Canonical based u-boot in NAND. Do not use this process if your u-boot prompt is Canonical>>

You'll get a u-boot-db88f6781y0bp_hX00_nand_1CS_fast_bank_en-09162009.bin that needs to be placed in your tftpboot folder. Power your board to u-boot as normal, and then execute the following commands to write u-boot to NAND flash
The bubt command is used for upgrading u-boot on the same medium. Its used for all upgrades on NAND except the first since it also can reset the environmental variables without wiping the NAND chip.
Line 26: Line 45:
Marvell>> tftp 2000000 u-boot-db88f6781y0bp_hX00_nand_1CS_fast_bank_en-09162009.bin
Marvell>> nand erase 0 C0000
Marvell>> nand write 2000000 0 C0000
Marvell>> setenv serverip ''TFTP Server''
Marvell>> setenv ipaddr ''board IP address''
Marvell>> bubt ''filename of uboot''
Line 31: Line 50:
u-boot will automatically download and flash the new binary. Press 'y' when it asks if you want to wipe the environment, and then reset once it finishes to (hopefully) boot into the new u-boot. Now you need to change the DIP switches so the Dove boots from NAND flash instead of SPI-NOR.

===== Changing the DIPs =====

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. The correct NAND booting mode for U-Boot is 0x17. To change the mode, set the SW7 dips as follows. For reference, "down" is towards the reset switch, up is towards the power supply connector

|| Boot Mode || 1 || 2 || 3 || 4 || 5 ||
|| NAND || Down || Down || Down || Up || Down ||
|| SPI || Down || Up || Up || Up || Up ||

If successful, when the board is powered back on, you should get the u-boot prompt, and it should automatically start scanning for devices.

==== Upgrading from a Canonical u-boot ====
/!\ '''DO NOT USE THIS PROCESS IF YOUR USING A SPI-NOR BASED BOOTLOADER UNLESS YOU WANT TO BRICK YOUR BOARD'''<<BR>><<BR>>
/!\ '''Only do this if you can see a Canonical>> prompt, and the dip switches are properly set for NAND booting'''
/!\ '''The bubt command is currently broken on 4.3.0 based u-boots, and will flash a bad image. See below for a work around. It is NOT recommended you use a 4.3.0 based u-boot at this time!'''

The bubt command is used for upgrading u-boot on the same medium. Its used for all upgrades on NAND except the first since it also can reset the environmental variables without wiping the NAND chip.
{{{
Canonical>> setenv serverip ''TFTP Server''
Canonical>> setenv ipaddr ''board IP address''
Canonical>> nbubt ''filename of uboot''
}}}

Answer yes when asked if you wipe the environmental variables. You should see messages about writing to NAND, and then returned to the Canonical>> prompt.

/!\ '''If you see messages about protecting/unprotecting memory, you've written to SPI-NOR by accident.''' Immediately grab Dove zip file from http://people.canonical.com/~mcasadevall/dove/ and repeat the bubt command with the DB-88F6781-BP-A/spi/DRAM-512MB/32\ bit/u-boot-db88f6781y0bp_hX00_spi_1CS_fast_bank_en.bin file, and hope for the best.

===== 4.3.0 bubt workaround =====
Due to a regression in the updater mechanism in u-boot 4.3.0, you need to manually flash and forgo the (n)bubt command.
{{{
Canonical>> tftp 2000000 u-boot-db88f6781y0bp_hX00_nand_1CS_fast_bank_en-09162009.bin
Canonical>> nand erase 0
Canonical>> nand write 2000000 0 C0000
}}}
Answer yes when asked if you wipe the environmental variables. Type reset when done to boot into the new u-boot
Line 145: Line 130:

===== 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 ||

This page describes how to install a Karmic (9.10) image to an Marvell Dove board. As a note, please note that the previous method of using a NAND based bootloader is depreicated. If your upgrading from such a setup, please change your DIP Switch to go back to SPI boot. out the n

Preparation and image writing

Prep Work

u-boot requires a TFTP server to download files from. Several are available in universe, including attpd and hda-tftpd. 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 vsmall section of SPI that can be used for upgrades. Newest versions of Marvell's kernel requires a newer BootROM, with the newest being 2.0.1. 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_01_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.

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.

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. 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

Warning /!\ DANGER - DO NOT USE THE bubt COMMAND when going from SPI-NOR to NAND. It will result in a bricked board since bubt will end up writing a NAND u-boot to SPI-Nor

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. Its used for all upgrades on NAND except the first since it also can reset the environmental variables without wiping the NAND chip.

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)