EFIBootLoaders
EFI/UEFI Boot Loaders
UEFI defines a new method of interfacing between PC operating systems and firmware. The UEFI interface is composed of data tables containng platform-related information, plus boot and runtime functions that are available to the operating system and the boot loader. These provide a standard environment for booting and running pre-boot applications.
The table following lists known features found in current EFI/UEFI capable boot loaders.
Key: Y - feature known to exist, ? - cannot determine, blank - feature does not exist
UEFI/EFI Bootloader Features |
BIOS Bootloader |
||||
|
ELILO |
Grub 2 |
rEFIt |
Grub 0.97 |
|
Features |
LILO like EFI boot loader, originally developed for IA-64 by HP, now with IA-32 support |
Grub 2 with EFI support |
EFI graphical boot loader - originally for Apple Macs |
BIOS Only |
|
Graphical boot manager |
|
Y |
Y |
Background |
|
JPG images |
|
Y |
Y |
|
|
BMP images |
|
|
Y |
|
|
PNG images |
|
Y |
Y |
|
|
XPM images |
|
? |
|
Y |
|
Text boot manager |
Y |
Y |
Y |
Y |
|
Mouse support |
|
|
Y |
|
|
Config file |
Y |
Y |
Y |
Y |
|
specify kernel image |
Y |
Y |
? |
Y |
|
interactive mode |
Y |
Y |
|
Y |
|
load initrd |
Y |
Y |
? |
Y |
|
kernel selector menu |
Y |
Y |
? |
Y |
|
kernel boot params |
Y |
Y |
? |
Y |
|
Boot once and then revert to previous kernel |
Y |
|
|
|
|
Variables to parameterize boot e.g. root=/dev/nfs ip=%I:%z:%G:%N |
Y |
|
|
|
|
Enable legacy BIOS |
|
? |
Y |
BIOS ONLY |
|
Chain loading |
|
Y |
|
Y |
|
Gzip compression support |
|
Y |
|
Y |
|
Load ELF binaries |
|
Y |
|
Y |
|
IA-64 |
Y |
? |
|
|
|
x86-32 |
Y |
Y |
? |
Y |
|
x86-64 |
Y |
Y |
Y |
Y |
|
Apple fat image |
|
|
Y |
|
|
Boot unmodified linux kernel |
Y |
Y |
Y |
Y |
|
Relocate Kernel |
IA-64 modified kernel |
|
|
|
|
Load FPSWA driver (Floating Point Software Assist) |
Y (IA-64 only) |
|
|
N/A |
|
Font Support |
Y |
Y |
? |
? |
|
File System Support: |
|
|
|
|
|
AFFS |
|
Y |
|
|
|
AFS |
|
Y |
|
|
|
CPIO |
|
Y |
|
|
|
FAT |
Y |
Y |
Y |
Y |
|
EXT2 |
|
Y |
Y |
Y |
|
EXT3 |
|
Y |
? |
Y |
|
EXT4 |
|
Y |
? |
Y (Jaunty+) |
|
FFS |
|
|
|
Y |
|
HFS |
|
Y |
|
|
|
HFSPLUS |
|
Y |
|
|
|
ISO9660 |
|
Y |
Y |
Y |
|
JFS |
|
Y |
|
Y |
|
MINIX |
|
Y |
|
Y |
|
NTFS |
|
Y |
|
|
|
NTFSCOMP |
|
Y |
|
|
|
REISERFS |
|
Y |
Y |
Y |
|
SFS (Amiga) |
|
Y |
|
|
|
UDF |
|
Y |
|
|
|
UFS |
|
Y |
|
Y |
|
XFS |
|
Y |
|
Y |
|
NOTE: |
ELILO loads kernel + initrd from EFI System Partition hence only supports VFAT |
|
|
|
|
Disk Volume/Partition Support: |
|
|
|
|
|
RAID |
|
Y |
|
Y |
|
LVM |
|
Y |
|
Y |
|
ADFS (Acorn) partition maps |
|
Y |
|
|
|
Amiga Patition Tables |
|
Y |
|
|
|
Macintosh Partition Tables |
|
Y |
|
|
|
PC Partition Tables |
|
Y |
|
Y |
|
Sun Partition Tables |
|
Y |
|
|
|
GPT (GUID Partition Tables) (UEFI) |
|
Y |
N/A |
||
Disk Loopback |
|
Y |
|
|
|
Find filesystems by UUID or label |
|
Y |
|
Y (Intrepid+) |
|
Commands |
|
Y |
|
|
|
background |
|
|
|
Y |
|
beep sound PC speaker |
|
Y |
|
|
|
print file block list |
|
Y |
|
Y |
|
set border colour |
|
|
|
Y |
|
cat files |
|
Y |
|
Y |
|
clear screen |
|
|
|
Y |
|
compare files |
|
Y |
|
Y |
|
cpu ID |
|
Y |
|
|
|
debug mode |
Y |
|
|
Y |
|
display APM BIOS info |
N/A |
N/A |
N/A |
Y |
|
display memory info |
|
|
|
Y |
|
dump file (copy) |
|
|
|
Y |
|
echo / print |
|
Y |
|
Y |
|
fallback to known kernel |
|
|
|
Y |
|
find a file on partitions |
|
|
|
Y |
|
file system test mode |
|
|
|
Y |
|
help |
|
Y |
|
Y |
|
print geometry of disk |
|
|
|
Y |
|
manually load config file |
|
Y |
|
||
halt machine |
|
Y |
|
Y |
|
hide a partition |
|
|
|
Y |
|
hexdump a file |
|
Y |
|
|
|
intel multiprocessor probe |
|
|
|
Y |
|
i/o port probe a drive |
|
|
|
Y |
|
load/save environment variables |
|
Y |
|
|
|
ls files |
|
Y |
Y |
|
|
lspci |
|
Y |
|
|
|
make a drive bootable |
|
|
|
Y |
|
map one drive to another |
|
|
|
Y |
|
screen pager |
|
|
|
Y |
|
partition manipulation |
|
|
|
Y |
|
pause/sleep |
|
Y |
|
Y |
|
read variables from user input |
|
Y |
|
|
|
read memory address |
|
|
|
Y |
|
reboot computer |
|
Y |
|
|
|
select terminal |
|
Y |
|
|
|
serial console support |
|
|
|
Y |
|
set keyboard mappings |
|
|
|
Y |
|
expression handling |
|
Y |
|
|
|
video testing |
|
Y |
|
|
|
list vbe modes |
|
Y |
|
Y |
|
vbe test |
|
Y |
|
|
|
load font files |
|
Y |
|
|
|
block users from using EFI shell |
|
|
Y |
|
|
disable booting from optical drive |
|
|
Y |
|
|
disable booting from internal drives |
|
|
Y |
|
|
block apple HW testing |
|
|
Y |
|
|
Toolchain Contraints |
|
|
|
|
|
IA-64: gcc version |
3.1, 3.2 |
? |
? |
? |
|
IA-64: binutils |
2.13.90 |
? |
? |
? |
|
x86-32: gcc-version |
3.2 |
? |
? |
? |
|
x86-32: binutils |
2.13.90.0.2 |
? |
? |
? |
|
x86-64: gcc-version |
4.1.1+ |
? |
? |
? |
|
x86-64: bintil |
2.17.50.0.14+ |
? |
? |
? |
|
Netboot |
|
|
|
|
|
PXE |
Y |
|
|
|
|
DCHP |
Y |
|
|
Y |
|
TFTP |
Y |
|
|
Y |
|
BOOTP |
|
|
|
Y |
|
IFCONFIG |
? |
|
|
Y |
|
RARP |
|
|
|
Y |
|
Booting from EFI
All EFI compliant systems have a FAT "system partition" containing EFI firmware modules and boot images - note that there can be one or more system partions. The system partiton is effectively the boot partition, and contains the necessary images to boot a system. This boot partition should probably be mounted on a Linux system as /boot/efi for the updating of new kernels and initrd images.
Each vendor MUST use a dedicated directory in \EFI\vendor for the .efi bootloader code. We should register \EFI\Ubuntu with http://www.uefi.org/specs/esp_registry ASAP.
nshell is the EFI shell. It will execute the boot script called startup.nsh found in an EFI partition. startup.nsh is used to load and execute the preferred boot loader.
All EFI executable images contain a PE/COFF header defining the format of the executable code. The code may be one of:
- IA-32
- Itaninum
- Processor agnostic generic EFI byte code
ELILO, Grub 2 (with EFI support) and rEFIt are all IA-32 executable code.
KERNEL configuration
Build the kernel with the following configuration.
CONFIG_FB_EFI=y
CONFIG_FRAMEBUFFER_CONSOLE=yIf EFI runtime services are expected, the following configuration should be selected.
CONFIG_EFI=y
CONFIG_EFI_VARS=y or m # optional
References
UEFI specification: http://www.uefi.org
Intel EFI resources http://www.intel.com/technology/efi/
EFI scripting language http://software.intel.com/en-us/articles/efi-shells-and-scripting/
DDJ EFI background http://www.ddj.com/embedded/18440624 and http://www.ddj.com/embedded/199500688
EFI background in OSX book http://osxbook.com/book/bonus/chapter4/firmware/