u-boot
u-boot
The Uboot
bootloader
Michael Opdenacker
Thomas Petazzoni
Free Electrons
1
Free Electrons. Kernel, drivers and embedded Linux development, consulting, training and support. http//freeelectrons.com
Rights to copy
© Copyright 20042009, Free Electrons
feedback@freeelectrons.com
Document sources, updates and translations:
http://freeelectrons.com/docs/uboot
Corrections, suggestions, contributions and
translations are welcome!
Attribution – ShareAlike 3.0 Latest update: Feb 3, 2009
You are free
to copy, distribute, display, and perform the work
to make derivative works
to make commercial use of the work
Under the following conditions
Attribution. You must give the original author credit.
Share Alike. If you alter, transform, or build upon this work, you
may distribute the resulting work only under a license identical to
this one.
For any reuse or distribution, you must make clear to others the license
terms of this work.
Any of these conditions can be waived if you get permission from the
copyright holder.
Your fair use and other rights are in no way affected by the above.
License text: http://creativecommons.org/licenses/bysa/3.0/legalcode
2
Free Electrons. Kernel, drivers and embedded Linux development, consulting, training and support. http//freeelectrons.com
Das Uboot
http://www.denx.de/wiki/UBoot/WebHome
Das UBoot: Universal Bootloader from Denx Software
The most used on arm.
Supports: arm, ppc, mips, x86, m68k, nios...
See our Uboot presentation for details:
http://freeelectrons.com/docs/uboot
Easy to port to new boards.
See our BSP presentation for porting details:
http://freeelectrons.com/docs/bsp
3
Free Electrons. Kernel, drivers and embedded Linux development, consulting, training and support. http//freeelectrons.com
Postprocessing kernel image for Uboot
4
Free Electrons. Kernel, drivers and embedded Linux development, consulting, training and support. http//freeelectrons.com
Postprocessing initrd image for Uboot
mkimage
n initrd \ Name
A arm \ Architecture
O linux \ Operating System
T ramdisk \ Type
C gzip \ Compression
d rdext2.gz \ Input file
uInitrd Output file
Note: this applies to initramfs images in the same way.
Bootloaders don't see the difference between initrds and
initramfs.
5
Free Electrons. Kernel, drivers and embedded Linux development, consulting, training and support. http//freeelectrons.com
Compiling Das Uboot
6
Free Electrons. Kernel, drivers and embedded Linux development, consulting, training and support. http//freeelectrons.com
Compiling Uboot mkimage
7
Free Electrons. Kernel, drivers and embedded Linux development, consulting, training and support. http//freeelectrons.com
Configuring tftp (1)
8
Free Electrons. Kernel, drivers and embedded Linux development, consulting, training and support. http//freeelectrons.com
Configuring tftp (2)
9
Free Electrons. Kernel, drivers and embedded Linux development, consulting, training and support. http//freeelectrons.com
Uboot prompt
10
Free Electrons. Kernel, drivers and embedded Linux development, consulting, training and support. http//freeelectrons.com
Board information
uboot # bdinfo
DRAM bank = 0x00000000
> start = 0x00000000
> size = 0x00800000
ethaddr = 00:40:95:36:35:33
ip_addr = 10.0.0.11
baudrate = 19200 bps
11
Free Electrons. Kernel, drivers and embedded Linux development, consulting, training and support. http//freeelectrons.com
Environment variables (1)
uboot # printenv
baudrate=19200
ethaddr=00:40:95:36:35:33 Network settings
netmask=255.255.255.0 for TFTP
ipaddr=10.0.0.11 and NFS
serverip=10.0.0.1
stdin=serial
stdout=serial
stderr=serial
uboot # setenv serverip 10.0.0.2
uboot # printenv serverip
serverip=10.0.0.2
12
Free Electrons. Kernel, drivers and embedded Linux development, consulting, training and support. http//freeelectrons.com
Environment variables (2)
13
Free Electrons. Kernel, drivers and embedded Linux development, consulting, training and support. http//freeelectrons.com
Network commands
14
Free Electrons. Kernel, drivers and embedded Linux development, consulting, training and support. http//freeelectrons.com
Flash commands (1)
uboot # flinfo
Bank # 1: AMD Am29LV160DB 16KB,2x8KB,32KB,31x64KB
Size: 2048 KB in 35 Sectors
Sector Start Addresses:
S00 @ 0x01000000 ! S01 @ 0x01004000 !
S02 @ 0x01006000 ! S03 @ 0x01008000 !
S04 @ 0x01010000 ! S05 @ 0x01020000 !
S06 @ 0x01030000 S07 @ 0x01040000
... Protected sectors
S32 @ 0x011D0000 S33 @ 0x011E0000
S34 @ 0x011F0000
15
Free Electrons. Kernel, drivers and embedded Linux development, consulting, training and support. http//freeelectrons.com
Flash commands (2)
16
Free Electrons. Kernel, drivers and embedded Linux development, consulting, training and support. http//freeelectrons.com
Flash commands (3)
17
Free Electrons. Kernel, drivers and embedded Linux development, consulting, training and support. http//freeelectrons.com
boot commands
18
Free Electrons. Kernel, drivers and embedded Linux development, consulting, training and support. http//freeelectrons.com
Useful links
19
Free Electrons. Kernel, drivers and embedded Linux development, consulting, training and support. http//freeelectrons.com
Related documents
All the technical presentations and training materials created and used by Free
Electrons, available under a free documentation license (more than 1500 pages!).
20
Free Electrons. Kernel, drivers and embedded Linux development, consulting, training and support. http//freeelectrons.com
How to help
21
Free Electrons. Kernel, drivers and embedded Linux development, consulting, training and support. http//freeelectrons.com
Embedded Linux Training Free Electrons services
Unix and GNU/Linux basics
Linux kernel and drivers development
Realtime Linux
uClinux Custom Development
Development and profiling tools System integration
Lightweight tools for embedded systems Embedded Linux demos and prototypes
Root filesystem creation System optimization
Audio and multimedia Linux kernel drivers
System optimization Application and interface development
http://freeelectrons.com