Das U-Boot

Das U-Boot
Developer(s) DENX Software Engineering
Initial release October 15, 1999 (1999-10-15)
Stable release
v2018.09 / September 10, 2018 (2018-09-10)[1]
Preview release
v2018.11-rc1 / October 2, 2018 (2018-10-02)[2]
Repository Edit this at Wikidata
Written in C, Assembly
Available in English
Type Boot loader
License GNU GPLv2+[3]
Website www.denx.de/wiki/U-Boot/

Das U-Boot (subtitled "the Universal Boot Loader" and often shortened to U-Boot) is an open source, primary boot loader used in embedded devices to package the instructions to boot the device's operating system kernel. It is available for a number of computer architectures, including 68k, ARM, Blackfin, MicroBlaze, MIPS, Nios, SuperH, PPC, RISC-V and x86.

Functionality

U-Boot is both a first-stage and second-stage bootloader. It is loaded by the system's ROM or BIOS from a supported boot device, such as an SD card, SATA drive, NOR flash (e.g. using SPI or I²C), or NAND flash. If there are size constraints, U-Boot may be split into stages: the platform would load a small SPL (Secondary Program Loader), which is a stripped-down version of U-Boot, and the SPL would do initial hardware configuration and load the larger, fully featured version of U-Boot.[4][5][6] Regardless of whether the SPL is used, U-Boot performs both first-stage (e.g., configuring memory controllers and SDRAM) and second-stage booting (performing multiple steps to load a modern operating system from a variety of devices that must be configured, presenting a menu for users to interact with and control the boot process, etc.).

U-Boot runs a command-line interface on a serial port. Using the console, users can load and boot a kernel, possibly changing parameters from the default. There are also commands to read device information, read and write flash memory, download files (kernels, boot images, etc.) from the serial port or network, manipulate device trees, and work with environment variables (which can be written to persistent storage, and are used to control U-Boot behavior such as the default boot command and timeout before auto-booting, as well as hardware data such as the Ethernet MAC address).

Unlike PC bootloaders which obscure or automatically choose the memory locations of the kernel and other boot data, U-Boot requires its boot commands to explicitly specify the memory addresses as destinations for copying data (kernel, ramdisk, device tree, etc.) and for jumping to the kernel and as arguments for the kernel. Because U-Boot's commands are fairly low-level, it takes several steps to boot a kernel, but this also makes U-Boot more flexible than other bootloaders, since the same commands can be used for more general tasks. It's even possible to upgrade U-Boot using U-Boot, simply by reading the new bootloader from somewhere (local storage, or from the serial port or network) into memory, and writing that data to persistent storage where the bootloader belongs.

U-Boot has support for USB, so it can use a USB keyboard to operate the console (in addition to input from the serial port), and it can access and boot from USB Mass Storage devices such as SD card readers.

Data storage and boot sources

U-Boot boots a kernel by reading the kernel and any other required data (e.g. device tree or ramdisk image) into memory, and then executing the kernel with the appropriate arguments.

U-Boot's commands are actually generalized commands which can be used to read or write any arbitrary data. Using these commands, data can be read from or written to any storage system that U-Boot supports, which include:

(Note: These are boot sources that U-Boot is capable of loading data (e.g. a kernel or ramdisk image) into memory from. U-Boot itself must be booted by the platform, and that must be done from a device that the platform's ROM or BIOS is capable of booting from, which naturally depends on the platform.)

Compatible file systems

U-Boot does not need to be able to read a filesystem in order for the kernel to use it as a root filesystem or initial ramdisk; U-Boot simply provides an appropriate parameter to the kernel, and/or copies the data to memory without understanding its contents.

However, U-Boot can also read from (and in some cases, write to) filesystems. This way, rather than requiring the data that U-Boot will load to be stored at a fixed location on the storage device, U-Boot can read the filesystem to search for and load the kernel, device tree, etc., by pathname.

U-Boot includes support for these Linux filesystems:


Device tree

Device tree is a data structure for describing hardware layout. Using Device tree, a vendor might be able to use an unmodified mainline U-Boot on otherwise special purpose hardware. As also adopted by the Linux kernel, Device tree is intended to ameliorate the situation in the embedded industry, where a vast number of product specific forks (of U-Boot and Linux) exist. The ability to run mainline software practically gives customers indemnity against lack of vendor updates.

History

U-Boot on the Openmoko Freerunner
U-Boot on the XPedite5501

The project's origin is a 8xx PowerPC bootloader called 8xxROM written by Magnus Damm.[7] In October 1999 Wolfgang Denk moved the project to SourceForge.net and renamed it to PPCBoot, because SF.net did not allow project names starting with digits.[7] Version 0.4.1 of PPCBoot was first publicly released July 19, 2000.

In 2002 a previous version of the source code was briefly forked into a product called ARMBoot, but was merged back into the PPCBoot project shortly thereafter. On October 31, 2002 PPCBoot−2.0.0 was released. This marked the last release under the PPCBoot name, as it was renamed to reflect its ability to work on other architectures besides the PPC ISA.[8][9]

PPCBoot−2.0.0 became U−Boot−0.1.0 in November 2002, expanded to work on the x86 processor architecture. Additional architecture capabilities were added in the following months: MIPS32 in March 2003, MIPS64 in April, Nios II in October, ColdFire in December, and MicroBlaze in April 2004. The May 2004 release of U-Boot-1.1.2 worked on the products of 216 board manufacturers across the various architectures.[9]

The current name Das U-Boot adds a German definite article, to create a bilingual pun on the German word for "submarine." It is free software released under the terms of the GNU General Public License. It can be built on an x86 PC for any of its intended architectures using a cross development GNU toolchain, for example crosstool, the Embedded Linux Development Kit (ELDK) or OSELAS.Toolchain.

The importance of U-Boot in embedded Linux systems is quite succinctly stated in the book Building Embedded Linux Systems, by Karim Yaghmour, whose text about U-Boot begins, "Though there are quite a few other bootloaders, 'Das U-Boot,' the universal bootloader, is arguably the richest, most flexible, and most actively developed open source bootloader available."[10]

Usages

See also

Notes

  1. This is true NFS boot (U-Boot itself uses NFS to load the kernel), as opposed to loading a kernel from the network using TFTP and specifying that the kernel should use an NFS mount as its root filesystem.

References

  1. Rini, Tom (10 September 2018). "U-Boot v2018.09 released". u-boot (Mailing list). Retrieved 11 September 2018.
  2. "Index of /pub/u-boot". Retrieved 2 October 2018.
  3. "Das U-Boot's licence". git.denx.de. 2013. Retrieved 2018-10-13.
  4. http://xillybus.com/tutorials/u-boot-image-altera-soc
  5. https://boundarydevices.com/u-boot-on-i-mx6/
  6. https://blackfin.uclinux.org/doku.php?id=bootloaders:u-boot:features
  7. 1 2 PPCBoot Homepage: Authors
  8. "[PPCBoot-users] Halloween release of PPCBoot: 2.0.0 - the Final Release.", Wolfgang Denk, 31 October 2002
  9. 1 2 "U-Bootdoc History". Retrieved September 4, 2011.
  10. Building Embedded Linux Systems by Kareem Yaghmour, Chapter 9
  11. coreboot tutorial oscon 2013, p. 6
This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.