Boot Loader: Difference between revisions

From Linux/Xtensa
Jump to navigation Jump to search
(→‎RedBoot: Add link to page showing how to boot the kernel using RedBoot.)
(Add basic build instructions and point to relevant READMEs.)
Line 16: Line 16:


''('''Note:'''  This path is subject to change.)''
''('''Note:'''  This path is subject to change.)''
To build U-Boot, first clone the tree as above, change to the top level of the tree, then configure it for your board and xtensa core variant as follows:
make <variant>_<board>_config
This should only take a few seconds. For example, to build U-boot for the 'xtav60' board and 'dc232b' core variant:
make dc232b_xtav60_config
Only boards and core variants currently supported in the tree can be built out of the box. Headers for supported variants can be found in the tree under <tt>include/asm-<variant></tt>. The variant specific headers are described in the <tt>doc/README.xtensa</tt> file. To support a new variant, these headers must be copied from the overlay in the same way as for the linux kernel.
After the configuration step, to actually build U-Boot, simply:
make all
This will take a few minutes.
Further details on U-Boot in general are in the generic <tt>README</tt> at the top of the U-Boot tree. Details specific to the xtensa architecture are in <tt>doc/README.xtensa</tt>. Details specific to a board are in <tt>board[/<family>]/<board>/README</tt> (for example <tt>board/avnet/xtav60/README</tt>).


== Host-Side Loading via OCD ==
== Host-Side Loading via OCD ==

Revision as of 22:53, 28 July 2008

BootLoader

The bootstrap loader or boot loader is a small program running on a computer or device after power-on to load the operating system. Most boot loaders today provide additional features that allow to upgrade the firmware and access the system for troubleshooting.

RedBoot

Tensilica has done a port of RedBoot for the Xtensa architecture. A RedBoot binary targeting the XTAV60 (LX60) or XTAV200 (LX200) emulation board is usually provided after generating an FPGA bitstream for one of these boards. See the relevant board documentation from Tensilica for more details such as usage and supported features. For more information and to request sources, please contact Tensilica directly. For an example of how to boot the Linux kernel using RedBoot on the LX60 or LX200 boards, see RedBoot Example.

A source tarball for RedBoot with support for the Xtensa architecture is available here. For more details, see the tarball's README.txt file.

U-Boot

U-Boot is another popular boot loader. A preliminary port to the Xtensa architecture is now available. See U-Boot Sources (GIT Summary). Or, to access this tree using git directly, use something like:

git clone git://git.linux-xtensa.org/git/u-boot/u-boot-xtensa.git u-boot

(Note: This path is subject to change.)

To build U-Boot, first clone the tree as above, change to the top level of the tree, then configure it for your board and xtensa core variant as follows:

make <variant>_<board>_config

This should only take a few seconds. For example, to build U-boot for the 'xtav60' board and 'dc232b' core variant:

make dc232b_xtav60_config

Only boards and core variants currently supported in the tree can be built out of the box. Headers for supported variants can be found in the tree under include/asm-<variant>. The variant specific headers are described in the doc/README.xtensa file. To support a new variant, these headers must be copied from the overlay in the same way as for the linux kernel.

After the configuration step, to actually build U-Boot, simply:

make all

This will take a few minutes.

Further details on U-Boot in general are in the generic README at the top of the U-Boot tree. Details specific to the xtensa architecture are in doc/README.xtensa. Details specific to a board are in board[/<family>]/<board>/README (for example board/avnet/xtav60/README).

Host-Side Loading via OCD

An alternative to boot loaders is an external (e.g. "host-side") loading mechanism.

One common way to load a Linux kernel is to use debugging interfaces such as On-Chip Debug (OCD). For example, Tensilica Tools GDB (xt-gdb) can connect to a target Xtensa processor using OCD via the Xtensa OCD Daemon. It can then load and execute a Linux RAM image (Image.elf or vmlinux) onto the target using standard GDB commands. See Download and Run the Kernel for an example.

Linux Kernel Self-Boot Image

It is possible to adapt the kernel build scripts for the Xtensa architecture to create a self-booting image. That is, a Linux kernel image that includes a Reset handler and can be either burned in ROM or Flash or downloaded to the target using another mechanism such as OCD. Note: This has not yet been implemented.