Beruflich Dokumente
Kultur Dokumente
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) Program that loads the first program (the kernel) Persistent code that is already loaded on power-up Program that lets you choose the first program to load
Bootloader / Bootstrap
Boot PROM
Boot Manager
Whats a Loader?
A program that moves bits from flash or disk to memory and then transfers control to the newly loaded bits (executable).
Reset
0x1000
SDRAM Memory
Kernel Root File-System
CPU
ROM
Bootloader uboot
Bootloader uboot
Optional compressed
Das U-Boot
The "Universal Bootloader" ("Das U-Boot") is a monitor/MicroOS program. Started in October of 1999 by Dan Malek, supported by Wolfgang Denk (Denx Engineering) as of July 2000 Free Software: full source code under GPL Hosted on SourceForge: http://sourceforge.net/projects/u-boot Production quality: Used as default boot loader by several board vendors Portable and easy to port and to debug Many supported architectures: PPC, ARM, MIPS, x86, m68k, NIOS, Microblaze, and Blackfin More than 216 boards supported by public source tree
uses a simple command line interface (CLI), usually over a serial console port. Two different command interpreters are available:
Simple
parameters and commands / command sequences (scripts !) can be stored in "environment variables" which can be saved to non-volatile storage (flash, EEPROM, NVRAM, etc.)
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 Flash Memory Commands Execution Control Commands
Network Commands
Information Commands
Boot Image
Image:
Header
Actions:
+ Payload
test
Header:
Creation
Timestamp Data Load Address Entry Point Address Data CRC Checksum Operating System CPU architecture Image Type Compression Type Image Name
10
CPU architecture and OS test checksum (optional) if compressed, uncompress copy to load address prepare boot arguments start at entry point
Image Types
Standalone OS
Programs
files
11
Configuring U-Boot
Configuration
depends on the combination of board and CPU type; all such information is kept in a configuration file "include/configs/<board_name>.h".
Example:
For
all supported boards there are ready-to-use default configurations available; just type "make <board_name>_config".
Example:
configuration details, check the U-Boot README and the Wiki docs.blackfin.uclinux.org
12
U-Boot has been tested in x86 cross environments (running RedHat 6.x and 7.x Linux, SuSE 9.0 and 9.1 Linux on x86). is assumed that you have the GNU cross compiling tools available in your path and named with a prefix of bfin-elf". If this is not the case, you must change the definition of CROSS_COMPILE in Makefile.
It
13
is intended to be simple to build. After installing the sources you must configure U-Boot for one specific board type. This is done by typing: cd u-boot make clean; make mrproper make stamp_config make all should get some working U-Boot images ready for download to / installation on your system:
"u-boot.bin"
You
is a raw binary image "u-boot" is an image in ELF binary format "u-boot.srec" is in Motorola S-Record format
14
http://sourceforge.net/projects/u-boot
Unofficial
http://blackfin.uclinux.org/projects/uboot533
U-Boot
uses a 3 level version number containing a version, a sub-version, and a patchlevel "U-Boot-2.34.5" means:
version
The patchlevel is used to indicate certain stages of development between released versions, i. e. officially released versions of U-Boot will always have a patchlevel of "0".
15
U-Boot project is hosted at Sourceforge: http://sourceforge.net/projects/u-boot is a pretty active u-boot-users mailing list.
There The
Mailing list archive can be viewed at sourceforge.net http://lists.sourceforge.net/lists/listinfo/u-boot-users/ DENX U-Boot and Linux Guide is a Wiki based documentation documenting U-Boot and its interaction with Linux. It can be viewed (and improved) at www.denx.de. The whole DULG web packed into a single HTML page or a PDF file is also available (PowerPC is the example) current README file can be viewed through viewcvs at sourceforge.net
The
The
16
Backup slides
17
Das U-Boot
Introduction Porting
Material
in this presentation is taken from the project README file, and from http://www.denx.de/twiki/bin/view/UBootdoc/Presentation and http://www.denx.de/twiki/bin/view/DULG/Manual
18
Supported Platforms
Architecture PPC Processor 5xx 5xxx 8xx 824x 826x 85xx 7xx/74xx 4xx ARM StrongARM ARM720T ARM92xT Number of Boards 2 6 71 15 26 3 11 38 5 3 11 MIPS64 NIOS32 Microblaze Blackfin BF533/BF535 x86 m68k MIPS32 Architecture ARM (cont) Processor S3C44B0 AT91RM9200 XScale SC520 Coldfire 4Kc Au1x00 5Kc Number of Boards 1 1 8 2 2 2 3 1 3 1 3
19
to port to new architectures, new processors, and new boards Easy to debug: serial console output as soon as possible Features and commands configurable As small as possible As reliable as possible
20
Image Support
Although
U-Boot can support any OS or standalone application, the main focus has always been on Linux during the design of U-Boot. includes many features that so far have been part of some special "boot loader" code within the Linux kernel. Also, any "initrd" images to be used are no longer part of one big Linux image; instead, kernel and "initrd" are separate images.
U-Boot
21
Memory Commands
base - print or set address offset crc32 - checksum calculation cmp - memory compare cp - memory copy md - memory display 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
23
Special Commands
i2c - I2C sub-system doc - Disk-On-Chip sub-system dtt - Digital Thermometer and Themostat eeprom - EEPROM sub-system fpga - FPGA sub-system ide - IDE sub-system kgdb - enter gdb remote debug mode diskboot- boot from IDE device icache - enable or disable instruction cache dcache - enable or disable data cache diag - perform board diagnostics (POST code) log - manipulate logbuffer pci - list and access PCI Configuraton Space regdump - register dump commands usb - USB sub-system sspi - SPI utility commands
24
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