Professional Documents
Culture Documents
Das U-Boot
Boot Terminology
Loader
Program that moves bits from
non volatile memory to memory and then
transfers CPU control to the newly
“loaded” bits (executable)
Bootloader / Bootstrap
Program that loads the
“first program” (the kernel)
Boot PROM
Persistent code that is “already loaded”
on power-up
Boot Manager
Program that lets you choose
the “first program” to load
2
What’s a Loader?
A program that moves bits from flash or disk to memory and then
transfers control to the newly loaded bits (executable).
memory
loader
bits
flash
cpu
bits
3
Loading through Das U-boot
SDRAM
SDRAM
Memory
Memory
Reset 0x1000
CPU
CPU
Kernel
Root
File-System
BMODE 00
ByPass PROM
0x20000000 ROM
ROM
Bootloader
uboot
Bootloader
uboot
Kernel
Image Optional
Root File compressed
System
4
Das U-Boot
The "Universal Bootloader" ("Das U-Boot") is a monitor/MicroOS program.
Production quality:
Used as default boot loader by several board vendors ·
Many supported architectures: PPC, ARM, MIPS, x86, m68k, NIOS, Microblaze,
and Blackfin
More than 216 boards supported by public source tree
5
Blackfin U-boot features
6
Where to get U-boot sources
7
User Interface (1)
8
User Interface (2)
U-Boot supports many different ways to load
and boot an image.
Serial Port: "loads" (S-Record), "loadb"
(Kermit binary protocol)
Ethernet: "tftp", "bootp", "dhcp", "nfs“
Harddisk, CDROM: "ide read"
CompactFlash card etc.: "ide read"
USB Mass Storage Device: "usb read"
SCSI Disk and CDROM: "scsi read"
NAND flash with JFFS2 filesystem: "nboot"
Disk on Chip: "doc read"
PCI Bus: copy
Commands
Memory Commands Network Commands Environment Variables Information Commands
Flash Memory Bootp Commands bdinfo
Commands Cdp Printenv coninfo
Execution Control
dhcp saveenv
loadb
flinfo
Commands Askenv
oads iminfo
Nfs setenv imls
ping run help
rarpboot Bootd
tftpboot
9
Boot Image
Image: Actions:
Header + Payload test CPU architecture and OS
test checksum (optional)
if compressed, uncompress
Header:
copy to load address
Creation Timestamp prepare boot arguments
Data Load Address
start at entry point
Entry Point Address
Data CRC Checksum
Operating System
CPU architecture
Image Type
Compression Type
Image Name
10
Image Types
Standalone Programs
OS Kernel Images
RAMDisk Images
Multi-File Images
Firmware Images
Script files
11
Configuring U-Boot
12
Building U-Boot (1/2)
13
Building U-Boot (2/2)
14
U-Boot Source Code
15
More U-Boot information
17
Das U-Boot
Introduction
Porting Guide
Directory Structure
Number of Number of
Architecture Processor Architecture Processor
Boards Boards
PPC 5xx 2 ARM (cont) S3C44B0 1
5xxx 6 AT91RM9200 1
8xx 71 XScale 8
824x 15 x86 SC520 2
826x 26 m68k Coldfire 2
85xx 3 MIPS32 4Kc 2
7xx/74xx 11 Au1x00 3
4xx 38 MIPS64 5Kc 1
ARM StrongARM 5 NIOS32 3
ARM720T 3 Microblaze 1
ARM92xT 11 Blackfin BF533/BF535 3
19
Das U-boot Design Principles
20
Image Support
21
U-Boot Basic Command Set (1/4)
Information Commands Flash Memory Commands
bdinfo - print Board Info structure ¨ cp - memory copy (program flash)
coninfo - print console devices and flinfo - print FLASH memory information
informations erase - erase FLASH memory
flinfo - print FLASH memory information protect - enable or disable FLASH write
iminfo - print header information for protection
application image
imls - list all images found in flash
help - print online help
Execution Control Commands
autoscr - run script from memory
Memory Commands bootm - boot application image from
base - print or set address offset memory
crc32 - checksum calculation bootelf - Boot from an ELF image in
cmp - memory compare memory
cp - memory copy bootvx - Boot vxWorks from an ELF image
md - memory display go - start application at address 'addr'
mm - memory modify (auto-incrementing)
mtest - simple RAM test
mw - memory write (fill)
nm - memory modify (constant address)
loop - infinite loop on address range
22
U-Boot Basic Command Set (2/4)
Network Commands Environment Variables Commands
bootp - boot image via network using printenv- print environment variables
BOOTP/TFTP protocol saveenv - save environment variables to
cdp - Perform Cisco Discovery Protocol persistent storage
network configuration askenv - get environment variables from
dhcp - invoke DHCP client to obtain stdin
IP/boot params setenv - set environment variables
loadb - load binary file over serial line run - run commands in an environment
(kermit mode) variable
loads - load S-Record file over serial line bootd - boot default, i.e., run 'bootcmd'
nfs - boot image via network using NFS
protocol
ping - send ICMP ECHO_REQUEST to
network host
rarpboot- boot image via network using
RARP/TFTP protocol
tftpboot- boot image via network using
TFTP protocol
23
U-Boot Basic Command Set (3/4)
Filesystem Support (FAT, cramfs, JFFS2, Special Commands
Reiser) i2c - I2C sub-system
chpart - change active partition doc - Disk-On-Chip sub-system
fsinfo - print information about dtt - Digital Thermometer and Themostat
filesystems eeprom - EEPROM sub-system
fsload - load binary file from a filesystem fpga - FPGA sub-system
image
ide - IDE sub-system
ls - list files in a directory (default /)
kgdb - enter gdb remote debug mode
fatinfo - print information about filesystem
diskboot- boot from IDE device
fatls - list files in a directory (default /)
icache - enable or disable instruction cache
fatload - load binary file from a dos
filesystem
dcache - enable or disable data cache
nand - NAND flash sub-system
diag - perform board diagnostics (POST
code)
reiserls- list files in a directory (default /)
log - manipulate logbuffer
reiserload- load binary file from a Reiser
filesystem
pci - list and access PCI Configuraton
Space
regdump - register dump commands
usb - USB sub-system
sspi - SPI utility commands
24
U-Boot Basic Command Set (4/4)
Miscellaneous Commands
bmp - manipulate BMP image data ¨
date - get/set/reset date & time ¨
echo - echo args to console ¨
exit - exit script ¨
kbd - read keyboard status ¨
in - read data from an IO port ¨
out - write datum to IO port ¨
reset - Perform RESET of the CPU ¨
sleep - delay execution for some time ¨
test - minimal test like /bin/sh ¨
version - print monitor version ¨
wd - check and set watchdog ¨
? - alias for 'help' ¨
25