Freescale Semiconductor
Quick Reference
LITE5200BUBPG
Rev. 0, 5/2006
Contents
© Freescale Semiconductor, Inc., 2006. All rights reserved.
1 Overview
This manual is a Quick Reference for U-Boot commands
on the Lite5200B Development Platform. Each
command overview gives a description, directions for
usage, and an execution example.
A list of U-Boot commands can be accessed while in the
U-Boot prompt. Type help for a complete listing of
available commands for the development platform.
1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
2 Attribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
3 Disclaimer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
4 List of Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
U-Boot Quick Reference
for the Lite5200B Development Platform
by: Jonathan Wang
Infotainment, Multimedia, and Telematics Division
U-Boot Quick Reference, Rev. 0
Attribution
Freescale Semiconductor2
2 Attribution
This manual is excerpted from the Denx UBOOT manual as described below. Primarily it has been made
specific to the Lite5200B board and has been reformatted. It is subject to GPL copyright restrictions as
described below and at the URL given below. You have the freedom to distribute copies of this document
in any format or to create a derivative work of it and distribute it provided that you:
• Distribute this document or the derivative work at no charge at all. It is not permitted to sell this
document or the derivative work or to include it into any package or distribution that is not freely
available to everybody.
• Send your derivative work (in the most suitable format such as sgml) to the author.
• License the derivative work with this same license or use GPL.
• Include a copyright notice and at least a pointer to the license used.
• Give due credit to previous authors and major contributors.
This document is derived from the DENX™ U-Boot User Manuals. (Copyright © 2001-2006 by Wolfgang
Denk, DENX Software Engineering.)
The manual can be found at:
http://www.denx.de/wiki/DULG/Manual
3Disclaimer
Use the information in this document at your own risk. Freescale disavows any potential liability for the
contents of this document. Use of the concepts, examples, and/or other content of this document is entirely
at your own risk. All copyrights are owned by their owners, unless specifically noted otherwise. Use of a
term in this document should not be regarded as affecting the validity of any trademark or service mark.
Naming of particular products or brands should not be seen as endorsements.
List of Commands
U-Boot Quick Reference, Rev. 0
Freescale Semiconductor 3
4 List of Commands
4.1 AUTOSCR
Run script from memory:
autoscr [addr] - run script starting at addr - A valid autoscr header must be present
The autoscr command allows “shell” scripts to run under U-Boot. To create a U-Boot script image,
commands are written to a text file. Then the mkimage tool [of a suitable compiler] is used to convert this
text file into a U-Boot image using the image type script. This image can be loaded like any other image
file. Autoscr runs the commands in this image.
For example, consider the following text file:
echo
echo Network Configuration:
echo ----------------------
echo Target:
printenv ipaddr hostname
echo
echo Server:
printenv serverip rootpath
echo
Convert the text file into a U-Boot script image using the mkimage command as follows:
bash$ mkimage -A ppc -O linux -T script -C none -a 0 -e 0 \
> -n "autoscr example script" \
> -d /tftpboot/TQM860L/example.script /tftpboot/TQM860L/example.img
Image Name: autoscr example script
Created: Mon Apr 8 01:15:02 2002
Image Type: PowerPC Linux Script (uncompressed)
Data Size: 157 Bytes = 0.15 kB = 0.00 MB
Load Address: 0x00000000
Entry Point: 0x00000000
Contents:
Image 0: 149 Bytes = 0 kB = 0 MB
Load and execute this script image in U-Boot:
=> tftp 100000 /tftpboot/TQM860L/example.img
ARP broadcast 1
TFTP from server 10.0.0.2; our IP address is 10.0.0.99
Filename '/tftpboot/TQM860L/example.img'.
Load address: 0x100000
Loading: #
done
Bytes transferred = 221 (dd hex)
=> autoscr 100000
## Executing script at 00100000
Network Configuration:
----------------------
Target:
U-Boot Quick Reference, Rev. 0
List of Commands
Freescale Semiconductor4
ipaddr=10.0.0.99
hostname=tqm
Server:
serverip=10.0.0.2
rootpath=/opt/hardhat/devkit/ppc/8xx/target
4.2 BASE
Print or set address offset:
base - print address offset for memory commands
base off - set address offset for memory commands to 'off'
Use the base command (short: ba) to print or set a "base address" used as an address offset for all memory
commands; the default value of the base address is 0, so all addresses you enter are used unmodified.
However, when you repeatedly have to access a certain memory region (like the internal memory of some
embedded PowerPC processors) it can be very convenient to set the base address to the start of this area
and then use only the offsets:
=> base
Base Address: 0x00000000
=> md 0 c
00000000: feffffff 00000000 7cbd2b78 7cdc3378 ........|.+x|.3x
00000010: 3cfb3b78 3b000000 7c0002e4 39000000 <.;x;...|...9...
00000020: 7d1043a6 3d000400 7918c3a6 3d00c000 }.C.=...y...=...
=> base 40000000
Base Address: 0x40000000
=> md 0 c
40000000: 27051956 50504342 6f6f7420 312e312e '..VPPCBoot 1.1.
40000010: 3520284d 61722032 31203230 3032202d 5 (Mar 21 2002 -
40000020: 2031393a 35353a30 34290000 00000000 19:55:04)......
=>
4.3 BDINFO
Print board info structure:
The bdinfo command (short: bdi) prints the information that U-Boot passes about the board such as
memory addresses and sizes, clock frequencies, MAC address, etc. This type of information is generally
passed to the Linux kernel.
=> bdinfo
memstart = 0x00000000
memsize = 0x04000000
flashstart = 0x40000000
flashsize = 0x00800000
flashoffset = 0x00030000
sramstart = 0x00000000
sramsize = 0x00000000
immr_base = 0xFFF00000
bootflags = 0x00000001
intfreq = 50 MHz
busfreq = 50 MHz
ethaddr = 00:D0:93:00:28:81
IP addr = 0.0.0.0
baudrate = 115200 bps
=>
List of Commands
U-Boot Quick Reference, Rev. 0
Freescale Semiconductor 5
4.4 BMP
Manipulate bmp image data:
bmp info <imageAddr> - display image info
bmp display <imageAddr> [x y] - display image at x,y
4.5 BOOTD
Boot default, i.e., run 'bootcmd'.
The bootd (short: boot) executes the default boot command, i.e. what happens when you don't interrupt
the initial countdown. This is a synonym for the run bootcmd command.
4.6 BOOTM
Boot application image from memory:
bootm [addr [arg ...]] - boot application image stored in memory passing arguments 'arg
...'; when booting a Linux kernel,‘arg' can be the address of an initrd image
The bootm command is used to start operating system images. From the image header it gets information
about the type of the operating system, the file compression method used (if any), the load and entry point
addresses, etc. The command will then load the image to the required memory address, uncompressing it
on the fly if necessary. Depending on the OS it will pass the required boot arguments and start the OS at
it's entry point. The first argument to bootm is the memory address (in RAM, ROM or flash memory)
where the image is stored, followed by optional arguments that depend on the OS.
For Linux, exactly one optional argument can be passed. If it is present, it is interpreted as the start address
of a initrd ramdisk image (in RAM, ROM or flash memory). In this case the bootm command consists of
three steps: first the Linux kernel image is uncompressed and copied into RAM, then the ramdisk image
is loaded to RAM, and finally control is passed to the Linux kernel, passing information about the location
and size of the ramdisk image.
To boot a Linux kernel image without a initrd ramdisk image, the following command can be used:
=> bootm $(kernel_addr)
If a ramdisk image is used, type:
=> bootm $(kernel_addr) $(ramdisk_addr)
Both examples imply that the variables used are set to correct addresses for a kernel and a initrd ramdisk
image.
When booting images that have been loaded to RAM (for instance using TFTP download) you have to be
careful that the locations where the (compressed) images were stored do not overlap with the memory
needed to load the uncompressed kernel. For instance, if you load a ramdisk image at a location in low
memory, it may be overwritten when the Linux kernel gets loaded. This will cause undefined system
crashes.