
For a while now, U-Boot’s EFI application (efi_app
) has been a handy tool, but with one noticeable difference between architectures: x86 could show things on the screen, while ARM was stuck in the dark. If you wanted a splash screen or a graphical boot menu in your ARM EFI app, you were out of luck.
Well, not anymore! A new patch series in Concept closes this gap, bringing full video output capabilities to the ARM EFI application. Let’s dive into how it works.
The Challenge: Drawing Pixels on ARM
The main hurdle for ARM video support within an EFI environment, especially in virtualized setups, is how graphics are handled. Many ARM systems, like QEMU configured with virtio-gpu
, don’t provide a simple, direct-access framebuffer to which you can just write the pixel data.
Instead, they rely on the EFI Graphics Output Protocol (GOP) and specifically its Bit Block Transfer function, more commonly known as blt
. The blt
function is a versatile tool that can copy rectangular blocks of pixels around—from memory to the screen, from the screen to memory, or even from one part of the screen to another.
Thes series uses the blt
function to enable video support. U-Boot now draws the display into an in-memory buffer and then uses a blt
call to “push” that entire buffer to the visible screen.
A Quick Tour of the Changes
This feature was delivered in a series of seven patches, each building on the last.
- Store the GOP (Patch 1/7): The first step was foundational. The existing driver could find the GOP, but it didn’t save the pointer for later use. This patch introduces a private struct (
efi_video_priv
) to store the GOP handle, making it accessible after the initial probe. - Implement the Blit Method (Patches 2/7 & 3/7): This is the core of the new feature.
- A new pixel format
EFI_GOT_BITBLT
is recognized. When detected, the driver knows it must useblt
operations instead of writing to a direct framebuffer.Avideo_sync
operation is added, which calls the GOP’sblt
function to update the display from U-Boot’s internal framebuffer. An enum,efi_gop_blt_op
, was also added to make the code clearer.
- A new pixel format
- Enable a Full Boot Experience (Patches 5/7 & 7/7): What good is a screen if you can’t boot an OS? This series also enables the necessary configs to make the ARM EFI app a fully functional bootloader.
CONFIG_BOOTSTD_FULL
is now enabled, allowing the app to automatically find and boot an operating system.CONFIG_BOARD_EARLY_INIT_R
is turned on to ensure block devices are available.- The VBE-OS boot method is also enabled, providing another way to locate and boot an OS.
- Supporting Cast (Patches 4/7 & 6/7): A couple of smaller patches provide essential plumbing. The QEMU build scripts were adjusted to prevent conflicts when using multiple disk images, and a fix was added to
oftree_dispose()
to allow builds whereCONFIG_OF_LIVE
is disabled.
What This Means for Developers and Users
With these changes, the U-Boot EFI application on ARM is now on par with its x86 counterpart. You can now:
- Display splash screens for a professional boot experience.
- Utilize a full graphical console.
- Use
bootstd
to automatically scan for and boot an OS from connected block devices.
This makes the ARM efi_app
far more useful, particularly in virtualized environments where virtio-gpu
is the standard. It provides a complete, visually-enabled pre-boot environment straight out of the box. Go ahead and give it a try with the efi-arm_app64_defconfig
! 🚀