ARM Technical Support Knowledge Articles

How do I install the pre-built Linux images on my ARM development board?

Applies to: Development Boards

Answer

Note: These instructions use a clean PB926EJ-S system as an example. Memory address values may differ on other boards or if there are additional images stored in the flash.

These instructions are provided in order to assist customers who are using our development boards and wish to run one of the Linux kernel images posted on http://www.arm.com/linux/linux_download.html.

This FAQ describes the process of installing existing images onto a development board - for instructions regarding how to rebuild these images see "How do I rebuild the Linux kernel for my ARM RealView development board".

1. Ensure that there is a working, Flash-resident Boot Monitor image in your board

The development board needs to have a working Boot Monitor in Flash in order for these instructions to work. To verify this:

  • Connect the serial console cable supplied with your board to your computer and Uart0 on the development board.
  • Configure a terminal emulator (such as HyperTerminal or TeraTerm) to connect to the serial port you connected the cable to on your computer. The settings should be: baud rate 38400, 8 data bits, no parity, 1 stop bit and no flow control.

When you turn on the power to your board, you should see a startup message similar to the following in your terminal emulator:

ARM Versatile/PB926EJ-S Boot Monitor
Version:    V2.0.2
Build Date: Apr 12 2005
Endian:     Little
>

If your boot monitor does not work, follow the instructions in your development board user guide ("getting started" section) to program a Boot Monitor into your board. This includes the DIP switch settings to make Boot Monitor run.

2. Program the Linux and Boot Loader images into Flash on your board

First download the pre-built U-Boot, Linux kernel and Cramfs images from http://www.arm.com/linux/linux_download.html. There are different U-Boot and Linux kernel images for the EB and xB926EJ-S boards, but the Cramfs image will work on any of the boards.

To avoid typing long pathnames into the Boot Monitor console, and any command length restrictions, put the images in some location with a short path - e.g. c: emp. You can also rename the image files if required.

In order to write the U-Boot and Linux kernel images to the flash,  you first need to start the boot monitor in semihosted mode under RVD. This can be done in one of two ways:

  • Connect to the board, load the boot_monitor.axf for your board and select "Run" from the Debug menu (will work on all boards).
  • Connect to the board, select "Reset Target Processor" and then "Run" from the Debug menu (will not work on EB MPCore).

You should now see the Boot Monitor startup message and command prompt, similar to the one you saw when verifying that you had a working Boot Monitor above.

Switch to the "Flash" submenu of the Boot Monitor:

> flash

Write the U-Boot, Linux kernel and Cramfs images to flash (depending on your version of Boot Monitor, there may be a progress indicator for each command):

Flash> write image c:\temp\u-boot_versatilepb.axf
Flash> write binary c:\temp\uImage-2.6.17-arm1-versatile
Flash> write binary c:\temp\base.cramfs

List the images in flash - you will need these addresses later on:

Flash> list images
Flash Area Base 0x34000000
Address     Name
-------     ----
0x34000000  Boot_Monitor_202
0x34040000  u-boot_versatilepb
0x34080000  uImage-2.6
0x341C0000  base

3. Modify U-Boot parameters

Close down RVD and reset the development board using the Reset button. When again presented with the Boot Monitor command prompt on the serial console, enter the command (obviously adapted to the actual image name):

> flash run u-boot_versatilepb

You should now be presented with an output similar to:

U-Boot 1.1.4 (Jul 25 2006 - 07:27:29)

DRAM:   0 kB
Flash: 64 MB
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Hit any key to stop autoboot:  2

Press a key to abort the boot process, as we have not yet finished configuring the system. You will again be presented with a command prompt - this time one with the name of your development board, for example:

VersatilePB #

Now enter the commands:

VersatilePB # setenv bootargs root=/dev/mtdblock0 mtdparts=armflash.0:<cramfs size>@<cramfs offset>(cramfs) ip=dhcp mem=128M console=ttyAMA0
VersatilePB # setenv bootcmd cp <kernel address> 0x7fc0 0x100000\; bootm
VersatilePB # saveenv

Where:

  • <cramfs size> is the size of the base.cramfs image in kilobytes, with a 'k' appended - in this case 7888k.
  • <cramfs offset> is the offset of the cramfs image from the start of flash - in this case 0x341C0000 - 0x34000000 = 0x1C0000.
  • <kernel address> is the address of the kernel image in flash - in this case 0x34080000.

4. Running your Linux system

After U-Boot has finished saving its settings and returns the prompt, press the reset button again. Run U-Boot from the Boot Monitor prompt again as above, and hopefully your Linux system should now boot up completely.

You should be able to interact with the system either by using a VGA monitor, keyboard and mouse or through the serial console. Log in as "root" with no password.

 To automate system startup in the future, it is possible to set up a 'boot script' within Boot Monitor to invoke U-Boot automatically at reset. Please refer to your development board user guide for instructions and DIP switch settings.

Article last edited on: 2012-10-17 10:36:57

Rate this article

[Bad]
|
|
[Good]
Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential