UEFI: Difference between revisions

22 bytes removed ,  28 days ago
m
Fix lint errors
[unchecked revision][unchecked revision]
m (Fix lint errors)
m (Fix lint errors)
 
(2 intermediate revisions by the same user not shown)
Line 123:
 
==Developing with POSIX-UEFI==
:''{{Main article: [[|POSIX-UEFI]]}}
 
One option to compile UEFI applications on POSIX like systems is POSIX-UEFI. It provies a [[libc]]-like API for your EFI application, and ships with a Makefile that can detect and set up the toolchain for you. It can use GCC or LLVM, and defaults to using the host compiler, but a cross compiler is still recommended.
Line 146:
 
==Developing with GNU-EFI==
:''{{Main article: [[|GNU-EFI]]}}
 
GNU-EFI can be used to develop both 32-bit and 64-bit UEFI applications. This section will address 64-bit UEFI applications only, and assumes that the development environment itself is running on an x86_64 system, so that no cross-compiler is needed. For a more thorough walk-through of a proper (non-gnu-efi) development environment, see [[UEFI App Bare Bones]].
Line 241:
 
===Creating disk images===
:{{mainMain|Bootable Disk}}
 
To launch a UEFI application you will need to create a disk image and present it to QEMU. UEFI firmware expects UEFI applications to be stored in a FAT12, FAT16, or FAT32 file system on a [[GPT]] or [[MBR]]-partitioned disk. Many firmwares only support FAT32, so that's what you'll want to use. Depending on your platform, there are several different ways to create a disk image containing your UEFI application, but they all start by creating a zeroed disk image file. The minimum FAT32 partition size is 33,548,800 bytes, plus you will need space for the primary and secondary GPT tables, plus some slack space so the partition can be aligned correctly. Throughout these examples we will be creating a 48,000,000 byte (93750 512-byte sectors, or 48 MB) disk image.