Difference between U-Boot and BIOS


What is difference between U-Boot and BIOS ?
Are both these devices present on a particular CPU or once a single device can be present at a time?
It would be nice if someone provides examples.

Best Answer

What is difference between U-Boot and BIOS ? Are both these devices present on a particular CPU or once a single device can be present at a time?

There are numerous difference between U-Boot and a BIOS.
BTW these are both software, not "devices".

  • BIOS is essentially a PC concept, having appeared in CP/M personal computers and the original IBM PC.
    U-Boot tries to live up to its name ("Universal Boot"), and has been ported to many architectures/platforms.

  • BIOS functions include basic system initialization after a reset or powerup, performing Power On Self Tests (aka POST), provide an interactive hardware configuration interface (aka BIOS setup) and bootstraping the PC. The use of the integrated device drivers of the original IBM PC's BIOS has been abandoned in favor of OS device drivers.
    U-Boot functions include basic system initialization and bootstraping the system. The booting sequence can optionally be aborted to enter an interactive command-line session. Since U-Boot is extensible, any number of features can be configured in or added, such as POST and other diagnostics, filesystem maintenance utilities, network capabilities such as retrieving time-of-day (SNTP) or an IP address (DHCP client), and reading/writing/modifying memory locations. The actual features and capabilities of U-Boot will vary on system/installation to system.

  • BIOS handles the initial startup of the PC as first-stage bootloader. It typically executes in place (XIP) in the Flash memory that it resides in.
    U-Boot is typically a second (or even third) stage bootloader. It could be the 1st-stage bootloader like a BIOS, since it can XIP, but I'm not aware if any platform has actually done that. Typically U-Boot is loaded from Flash memory and executed in main memory, e.g. SDRAM.

  • As a first-stage bootloader the BIOS is rather limited as it what it loads and executes, such as the Master Boot Record (MBR) from a hard disk. The BIOS does not typically load the actual OS image.
    U-Boot, when it is provided the uImage file format, is aware of the OS it is loading, and can properly prepare memory buffers and parameters for proper OS initialization.

  • BIOS, since it is PC based, typically uses the video adapter and keyboard as operator I/O devices.
    U-Boot typically uses a RS232 serial port as the operator I/O device.

  • The original IBM PC BIOS was published in the IBM PC technical documents as an x86 assembly language listing. Modern versions sold by AMI, Award and Phoenix are proprietary.
    U-Boot is released under the GNU GPL.

Linux on PCs typically use Grub as the post-BIOS bootstrap program. I suppose U-Boot could be used in place of Grub, but I don't know the reasons for or against such an implementation.