Flashing the Neo FreeRunner

From Openmoko

(Difference between revisions)
Jump to: navigation, search
(Overview)
(Overview)
Line 8: Line 8:
 
== Overview ==
 
== Overview ==
  
We need an overview of what we are doing right here.
+
All the components of the software in the FreeRunner are bundled together into binary images.
  
Download the DFU utility
+
The '''bootloader''' is a small program that runs first when the FreeRunner is powered on or reset.
 +
The '''kernel''' is the central component in the Linux operating system.
 +
The '''root filesystem''' contains all the files that make up the commands and applications that you can run.
  
Download the images
+
On a desktop computer when you want to replace the operating system, you would boot it from a CD-ROM drive, then copy files from the CD to the internal hard drive.
  
Flash the bootloader, kernel, and root filesystems.
+
The FreeRunner does not have a CD-ROM drive but it does have two kinds of internal program storage: NOR flash and NAND flash. The NOR flash is small and stores only a special boot program used when you need to re-write the contents of the NAND flash.
  
== Download the DFU-util ==
+
The steps are
  
=== GNU/Linux host ===
+
# First collect everything you need together on your desktop computer.
 +
This includes the dfu-util program and the images you will load into the FreeRunner and a USB cable.
 +
# Boot the FreeRunner from NOR Flash.
 +
# Connect the FreeRunner to the desktop computer via the USB cable.
 +
# Use the dfu-util program to copy the images from the desktop into the FreeRunner.
 +
# Boot the FreeRunner from NAND Flash to use the new image(s).
  
 +
== Collect the things you need ==
 +
 +
=== Download the DFU-util program ===
 +
 +
There are versions of dfu-util for both Linux and Windows. It works the same way on both platforms.
 +
 +
=== Download the image files that you will need ===
 +
 +
== Boot the FreeRunner from NOR Flash ==
 +
 +
[[Image:menu15.jpg|thumb|Booting from NOR Flash]]
 +
 +
The Neo FreeRunner needs to be at the NOR uBoot menu for flashing. For more information on booting, see [[Booting the Neo FreeRunner| booting the Neo Freerunner]] (in short: press and hold aux down and then press power button).
 +
 +
Log into the NOR uBoot menu and just stay there, do not select or enter any item in menu. Now you will be able to flash, make backups of your Freerunner or query the Freerunner with dfu-util.
 +
 +
'''Then''', connect your Neo to the GNU/Linux or Windows host via USB cable.
 +
 +
'''Linux'''
 
You can download the flashing tool for a GNU/Linux host from:  
 
You can download the flashing tool for a GNU/Linux host from:  
 
http://downloads.openmoko.org/releases/Freerunner/dfu-util
 
http://downloads.openmoko.org/releases/Freerunner/dfu-util
  
On the GNU/Linux host you can use the following command to download the dfu-util:
+
Make sure it is executable by setting the permissions:  
wget http://downloads.openmoko.org/releases/Freerunner/dfu-util
+
  
Afterwards you have to change the rights on the file:
 
 
  chmod a+x dfu-util
 
  chmod a+x dfu-util
  
=== Windows hosts ===
+
'''Windows'''
 +
You can download the flashing tool for a Windows host from:
 +
[http://projects.openmoko.org/frs/?group_id=166&release_id=162 http://projects.openmoko.org/frs/?group_id=166&release_id=162]
  
You can download the flashing tool for a Windows host from: [http://projects.openmoko.org/frs/?group_id=166&release_id=162 http://projects.openmoko.org/frs/?group_id=166&release_id=162] (see installation instructions at [[Dfu-util-windows]])
+
See additional installation instructions for Windows at [[Dfu-util-windows]]
  
 
== Using dfu-util ==
 
== Using dfu-util ==
 +
 +
On Linux, you run dfu-util from a command shell prompt. If you have not put it somewhere on your command path you probably need to prefix it with a "./" like this ./dfu-util.
 +
 +
On Windows, you need to open a command window and run from a command line.
  
 
Dfu-util will be used like this, to write an image file to a (predefined) "partition name" (referred to as ''Altsetting'' in dfu-util help/manual) :
 
Dfu-util will be used like this, to write an image file to a (predefined) "partition name" (referred to as ''Altsetting'' in dfu-util help/manual) :
Line 46: Line 76:
  
 
== Flashing the Kernel ==
 
== Flashing the Kernel ==
 
{| class="wikitable" cellspacing="2" cellpadding="2" style="padding: 0%; margin:0em 0em 1em 0em; border:0px solid #ffffff; background:#ffffff; width:100%;floating="center";font-weight: normal; "
 
! style="background:#ffffff;border-left:1px solid #ffffff;border-right:1px ; border-top:2px solid #ffffff; border:1px solid #ffffff; width:75%;font-weight: normal; " | 
 
<div align="left">
 
[[Image:menu15.jpg|thumb|Log into U-Boot in NOR Flash, connect your Neo with Linux Host via USB cable]]
 
 
The Neo FreeRunner needs to be at the NOR uBoot menu for flashing. For more information on booting, see [[Booting the Neo FreeRunner| booting the Neo Freerunner]] (in short: press and hold aux then power). Log into the NOR uBoot menu and just stay there, do not select or enter any item in menu. Now you will be able to flash, make backups of your Freerunner or query the Freerunner with dfu-util.
 
 
'''Then''', connect your Neo to the GNU/Linux or Windows host via USB cable.
 
  
 
You can download the kernel from  
 
You can download the kernel from  

Revision as of 07:59, 31 July 2008

As Openmoko development continues, Openmoko regularly releases updated versions of the Openmoko root filesystem, the kernel, and the U-Boot. These may be programmed into the Flash memory of Neo FreeRunner. You can use the USB cable and Openmoko provided tool to flash Neo FreeRunner.

NOTE: The Openmoko software team builds images daily. If you want to use the latest images, you can download the image from the daily build, but we recommend you download the most stable image from http://downloads.openmoko.org/releases/Freerunner/. Images here have been tested by the test team.

See Latest Images for more information about the different images available.


NOTE: If you have a working image that you're happy with but want to try something different, you should probably do a Pre-Flash Backup, although it looks like the method on that page may not entirely work.


Contents

Overview

All the components of the software in the FreeRunner are bundled together into binary images.

The bootloader is a small program that runs first when the FreeRunner is powered on or reset. The kernel is the central component in the Linux operating system. The root filesystem contains all the files that make up the commands and applications that you can run.

On a desktop computer when you want to replace the operating system, you would boot it from a CD-ROM drive, then copy files from the CD to the internal hard drive.

The FreeRunner does not have a CD-ROM drive but it does have two kinds of internal program storage: NOR flash and NAND flash. The NOR flash is small and stores only a special boot program used when you need to re-write the contents of the NAND flash.

The steps are

  1. First collect everything you need together on your desktop computer.

This includes the dfu-util program and the images you will load into the FreeRunner and a USB cable.

  1. Boot the FreeRunner from NOR Flash.
  2. Connect the FreeRunner to the desktop computer via the USB cable.
  3. Use the dfu-util program to copy the images from the desktop into the FreeRunner.
  4. Boot the FreeRunner from NAND Flash to use the new image(s).

Collect the things you need

Download the DFU-util program

There are versions of dfu-util for both Linux and Windows. It works the same way on both platforms.

Download the image files that you will need

Boot the FreeRunner from NOR Flash

Booting from NOR Flash

The Neo FreeRunner needs to be at the NOR uBoot menu for flashing. For more information on booting, see booting the Neo Freerunner (in short: press and hold aux down and then press power button).

Log into the NOR uBoot menu and just stay there, do not select or enter any item in menu. Now you will be able to flash, make backups of your Freerunner or query the Freerunner with dfu-util.

Then, connect your Neo to the GNU/Linux or Windows host via USB cable.

Linux You can download the flashing tool for a GNU/Linux host from: http://downloads.openmoko.org/releases/Freerunner/dfu-util

Make sure it is executable by setting the permissions:

chmod a+x dfu-util

Windows You can download the flashing tool for a Windows host from: http://projects.openmoko.org/frs/?group_id=166&release_id=162

See additional installation instructions for Windows at Dfu-util-windows

Using dfu-util

On Linux, you run dfu-util from a command shell prompt. If you have not put it somewhere on your command path you probably need to prefix it with a "./" like this ./dfu-util.

On Windows, you need to open a command window and run from a command line.

Dfu-util will be used like this, to write an image file to a (predefined) "partition name" (referred to as Altsetting in dfu-util help/manual) :

./dfu-util -a (partion name) -R -D (download image file name)
NOTE: The meaning of the parameters you specified:

-a --alt alt : Specify the Altsetting of the DFU interface by name or by number
-R --reset : Issue USB Reset signalling once we're finished
-D --download file : Write firmware from<file> into device


Flashing the Kernel

You can download the kernel from http://downloads.openmoko.org/releases/Freerunner/

GNU/Linux hosts

Type in the following command in the terminal on a GNU/Linux host. On some systems you need to be root before this will work and on Ubuntu you must preface the command with "sudo" or you will get the following error: "Cannot claim interface: could not claim interface 2: Operation not permitted"

sudo ./dfu-util -a kernel -R -D uImage-2.6.24+git20080424-om-gta02.bin

Windows hosts

Type in the following command in the console on a Windows host:

dfu-util -a kernel -R -D uImage-2.6.24+git20080424-om-gta02.bin

Press Enter to execute the command.

When flashing succeeds the following will be shown:

status(0) = No error condition is present
Done!

</div> |}

Flashing the Root Filesystem

You can download the root filesystem from: http://downloads.openmoko.org/releases/Freerunner/


from GNU/Linux

Type the following command in the terminal of a GNU/Linux host. On some systems you will need to be root.

./dfu-util -a rootfs -R -D openmoko-devel-image-fic-gta02.jffs2

from Windows

Type the following command in the console of a Windows host.

dfu-util -a rootfs -R -D openmoko-devel-image-fic-gta02.jffs2

When flashing succeeds the following will be shown:

status(0) = No error condition is present
Done!

Flashing u-boot

dfu-util -a u-boot -R -D uboot-gta02v5-latest.bin
Personal tools

As Openmoko development continues, Openmoko regularly releases updated versions of the Openmoko root filesystem, the kernel, and the U-Boot. These may be programmed into the Flash memory of Neo FreeRunner. You can use the USB cable and Openmoko provided tool to flash Neo FreeRunner.

NOTE: The Openmoko software team builds images daily. If you want to use the latest images, you can download the image from the daily build, but we recommend you download the most stable image from http://downloads.openmoko.org/releases/Freerunner/. Images here have been tested by the test team.

See Latest Images for more information about the different images available.


NOTE: If you have a working image that you're happy with but want to try something different, you should probably do a Pre-Flash Backup, although it looks like the method on that page may not entirely work.


Overview

We need an overview of what we are doing right here.

Download the DFU utility

Download the images

Flash the bootloader, kernel, and root filesystems.

Download the DFU-util

GNU/Linux host

You can download the flashing tool for a GNU/Linux host from: http://downloads.openmoko.org/releases/Freerunner/dfu-util

On the GNU/Linux host you can use the following command to download the dfu-util:

wget http://downloads.openmoko.org/releases/Freerunner/dfu-util

Afterwards you have to change the rights on the file:

chmod a+x dfu-util

Windows hosts

You can download the flashing tool for a Windows host from: http://projects.openmoko.org/frs/?group_id=166&release_id=162 (see installation instructions at Dfu-util-windows)

Using dfu-util

Dfu-util will be used like this, to write an image file to a (predefined) "partition name" (referred to as Altsetting in dfu-util help/manual) :

./dfu-util -a (partion name) -R -D (download image file name)
NOTE: The meaning of the parameters you specified:

-a --alt alt : Specify the Altsetting of the DFU interface by name or by number
-R --reset : Issue USB Reset signalling once we're finished
-D --download file : Write firmware from<file> into device


Flashing the Kernel

Log into U-Boot in NOR Flash, connect your Neo with Linux Host via USB cable

The Neo FreeRunner needs to be at the NOR uBoot menu for flashing. For more information on booting, see booting the Neo Freerunner (in short: press and hold aux then power). Log into the NOR uBoot menu and just stay there, do not select or enter any item in menu. Now you will be able to flash, make backups of your Freerunner or query the Freerunner with dfu-util.

Then, connect your Neo to the GNU/Linux or Windows host via USB cable.

You can download the kernel from http://downloads.openmoko.org/releases/Freerunner/

GNU/Linux hosts

Type in the following command in the terminal on a GNU/Linux host. On some systems you need to be root before this will work and on Ubuntu you must preface the command with "sudo" or you will get the following error: "Cannot claim interface: could not claim interface 2: Operation not permitted"

sudo ./dfu-util -a kernel -R -D uImage-2.6.24+git20080424-om-gta02.bin

Windows hosts

Type in the following command in the console on a Windows host:

dfu-util -a kernel -R -D uImage-2.6.24+git20080424-om-gta02.bin

Press Enter to execute the command.

When flashing succeeds the following will be shown:

status(0) = No error condition is present
Done!

Flashing the Root Filesystem

You can download the root filesystem from: http://downloads.openmoko.org/releases/Freerunner/


from GNU/Linux

Type the following command in the terminal of a GNU/Linux host. On some systems you will need to be root.

./dfu-util -a rootfs -R -D openmoko-devel-image-fic-gta02.jffs2

from Windows

Type the following command in the console of a Windows host.

dfu-util -a rootfs -R -D openmoko-devel-image-fic-gta02.jffs2

When flashing succeeds the following will be shown:

status(0) = No error condition is present
Done!

Flashing u-boot

dfu-util -a u-boot -R -D uboot-gta02v5-latest.bin