@ -24,13 +24,14 @@
Summary:
Summary:
========
========
This directory contains the source code for U-Boot, a monitor for
This directory contains the source code for U-Boot, a boot loader for
Embedded PowerPC boards, which can be installed in a boot ROM and
Embedded boards based on PowerPC and ARM processors, which can be
used to test the hardware or download and run application code.
installed in a boot ROM and used to initialize and test the hardware
or to download and run application code.
The development of U-Boot is closely related to Linux: some parts of
The development of U-Boot is closely related to Linux: some parts of
the source code originate in the Linux source tree, we still have
the source code originate in the Linux source tree, we have som e
some header files in common, and special provision has been made to
header files in common, and special provision has been made to
support booting of Linux images.
support booting of Linux images.
Some attention has been paid to make this software easily
Some attention has been paid to make this software easily
@ -51,9 +52,6 @@ Makefile have been tested to some extent and can be considered
In case of problems see the CHANGELOG and CREDITS files to find out
In case of problems see the CHANGELOG and CREDITS files to find out
who contributed the specific port.
who contributed the specific port.
Exception from this rule: the port to the Sandpoint 8240 has not been
completed yet.
Where to get help:
Where to get help:
==================
==================
@ -70,6 +68,7 @@ Where we come from:
===================
===================
- start from 8xxrom sources
- start from 8xxrom sources
- create PPCBoot project (http://sourceforge.net/projects/ppcboot)
- clean up code
- clean up code
- make it easier to add custom boards
- make it easier to add custom boards
- make it possible to add other [PowerPC] CPUs
- make it possible to add other [PowerPC] CPUs
@ -78,7 +77,31 @@ Where we come from:
* S-Record download
* S-Record download
* network boot
* network boot
* PCMCIA / CompactFLash / ATA disk / SCSI ... boot
* PCMCIA / CompactFLash / ATA disk / SCSI ... boot
- create ARMBoot project (http://sourceforge.net/projects/armboot)
- add other CPU families (starting with ARM)
- add other CPU families (starting with ARM)
- create U-Boot project (http://sourceforge.net/projects/u-boot)
Names and Spelling:
===================
The "official" name of this project is "Das U-Boot". The spelling
"U-Boot" shall be used in all written text (documentation, comments
in source files etc.). Example:
This is the README file for the U-Boot project.
File names etc. shall be based on the string "u-boot". Examples:
include/asm-ppc/u-boot.h
#include <asm/u-boot.h>
Variable names, preprocessor constants etc. shall be either based on
the string "u_boot" or on "U_BOOT". Example:
U_BOOT_VERSION u_boot_logo
IH_OS_U_BOOT u_boot_hush_start
Directory Hierarchy:
Directory Hierarchy:
@ -2013,25 +2036,52 @@ device (initial ramdisk, NFS) for your target system.
Building a Linux Image:
Building a Linux Image:
-----------------------
-----------------------
No specific requirements for U-Boot. There is no need to add a
With U-Boot, "normal" build targets like "zImage" or "bzImage" are
"ramdisk.image.gz" file when building the kernel, even when you
not used. If you use recent kernel source, a new build target
intend to run it with initial ramdisk.
"uImage" will exist which automatically builds an image usable by
U-Boot. Most older kernels also have support for a "pImage" target,
which was introduced for our predecessor project PPCBoot and uses a
100% compatible format.
Example:
Example:
make TQM850L_config
make TQM850L_config
make oldconfig
make oldconfig
make dep
make dep
make zImage
make uImage
The "uImage" build target uses a special tool (in 'tools/mkimage') to
encapsulate a compressed Linux kernel image with header information,
CRC32 checksum etc. for use with U-Boot. This is what we are doing:
* build a standard "vmlinux" kernel image (in ELF binary format):
However, we don't use the 'zImage' (= 'arch/ppc/mbxboot/zvmlinux') we
* convert the kernel into a raw binary image:
build this way. The 'zImage' includes the old boot loader code which
we don't ned any more. Instead, we use the raw (compressed) Linux
kernel image in 'arch/ppc/coffboot/vmlinux.gz'.
There is a special tool (in 'tools/mkimage') to encapsulate this
${CROSS_COMPILE}-objcopy -O binary \
image with header information, CRC32 checksum etc. for use with
-R .note -R .comment \
U-Boot:
-S vmlinux linux.bin
* compress the binary image:
gzip -9 linux.bin
* package compressed binary image for U-Boot:
mkimage -A ppc -O linux -T kernel -C gzip \
-a 0 -e 0 -n "Linux Kernel Image" \
-d linux.bin.gz uImage
The "mkimage" tool can also be used to create ramdisk images for use
with U-Boot, either separated from the Linux kernel image, or
combined into one file. "mkimage" encapsulates the images with a 64
byte header containing information about target architecture,
operating system, image type, compression method, entry points, time
stamp, CRC32 checksums, etc.
"mkimage" can be called in two ways: to verify existing images and
print the header information, or to build new images.
In the first form (with "-l" option) mkimage lists the information
In the first form (with "-l" option) mkimage lists the information
contained in the header of an existing U-Boot image; this includes
contained in the header of an existing U-Boot image; this includes
@ -2058,47 +2108,47 @@ Right now, all Linux kernels use the same load address (0x00000000),
but the entry point address depends on the kernel version:
but the entry point address depends on the kernel version:
- 2.2.x kernels have the entry point at 0x0000000C,
- 2.2.x kernels have the entry point at 0x0000000C,
- 2.3.x and 2.4.x kernels have the entry point at 0x00000000.
- 2.3.x and later kernels have the entry point at 0x00000000.
So a typical call to build a U-Boot image would read:
So a typical call to build a U-Boot image would read:
-> tools/mkimage -n '2.2.13 for initrd on TQM850L' \
-> tools/mkimage -n '2.4.4 kernel for TQM850L' \
> -A ppc -O linux -T kernel -C gzip -a 00000000 -e 0000000C \
> -A ppc -O linux -T kernel -C gzip -a 0 -e 0 \
> -d /opt/mpc8xx/src/linux-2.2.13 /arch/ppc/coffboot/vmlinux.gz \
> -d /opt/elsk/ppc_8xx/usr/src/linux-2.4.4 /arch/ppc/coffboot/vmlinux.gz \
> examples/image-2.2.13-initrd
> examples/uImage.TQM850L
Image Name: 2.2.13 for initrd on TQM850L
Image Name: 2.4.4 kernel for TQM850L
Created: Wed Jul 19 02:34:59 2000
Created: Wed Jul 19 02:34:59 2000
Image Type: PowerPC Linux Kernel Image (gzip compressed)
Image Type: PowerPC Linux Kernel Image (gzip compressed)
Data Size: 335725 Bytes = 327.86 kB = 0.32 MB
Data Size: 335725 Bytes = 327.86 kB = 0.32 MB
Load Address: 0x00000000
Load Address: 0x00000000
Entry Point: 0x0000000c
Entry Point: 0x00000000
To verify the contents of the image (or check for corruption):
To verify the contents of the image (or check for corruption):
-> tools/mkimage -l examples/image-2.2.13-initrd
-> tools/mkimage -l examples/uImage.TQM850L
Image Name: 2.2.13 for initrd on TQM850L
Image Name: 2.4.4 kernel for TQM850L
Created: Wed Jul 19 02:34:59 2000
Created: Wed Jul 19 02:34:59 2000
Image Type: PowerPC Linux Kernel Image (gzip compressed)
Image Type: PowerPC Linux Kernel Image (gzip compressed)
Data Size: 335725 Bytes = 327.86 kB = 0.32 MB
Data Size: 335725 Bytes = 327.86 kB = 0.32 MB
Load Address: 0x00000000
Load Address: 0x00000000
Entry Point: 0x0000000c
Entry Point: 0x00000000
NOTE: for embedded systems where boot time is critical you can trade
NOTE: for embedded systems where boot time is critical you can trade
speed for memory and install an UNCOMPRESSED image instead: this
speed for memory and install an UNCOMPRESSED image instead: this
needs more space in Flash, but boots much faster since it does not
needs more space in Flash, but boots much faster since it does not
need to be uncompressed:
need to be uncompressed:
-> gunzip /opt/mpc8xx/src/linux-2.2.13 /arch/ppc/coffboot/vmlinux.gz
-> gunzip /opt/elsk/ppc_8xx/usr/src/linux-2.4.4 /arch/ppc/coffboot/vmlinux.gz
-> tools/mkimage -n '2.2.13 for initrd on TQM850L' \
-> tools/mkimage -n '2.4.4 kernel for TQM850L' \
> -A ppc -O linux -T kernel -C none -a 00000000 -e 0000000C \
> -A ppc -O linux -T kernel -C none -a 0 -e 0 \
> -d /opt/mpc8xx/src/linux-2.2.13 /arch/ppc/coffboot/vmlinux \
> -d /opt/elsk/ppc_8xx/usr/src/linux-2.4.4 /arch/ppc/coffboot/vmlinux \
> examples/image-2.2.13-initrd -uncompressed
> examples/uImage.TQM850L -uncompressed
Image Name: 2.2.13 for initrd on TQM850L
Image Name: 2.4.4 kernel for TQM850L
Created: Wed Jul 19 02:34:59 2000
Created: Wed Jul 19 02:34:59 2000
Image Type: PowerPC Linux Kernel Image (uncompressed)
Image Type: PowerPC Linux Kernel Image (uncompressed)
Data Size: 792160 Bytes = 773.59 kB = 0.76 MB
Data Size: 792160 Bytes = 773.59 kB = 0.76 MB
Load Address: 0x00000000
Load Address: 0x00000000
Entry Point: 0x0000000c
Entry Point: 0x00000000
Similar you can build U-Boot images from a 'ramdisk.image.gz' file
Similar you can build U-Boot images from a 'ramdisk.image.gz' file