UEFI Capsule Update support
Ubuntu should support updating firmware for systems and components (but not peripherals) via EFI UpdateCapsule (see EFI Capsule specification, in Related Links), so that users do not require Windows or DOS to apply BIOS/component firmware updates, and as such updates are easily available to all Ubuntu users.
Peripheral firmware updates are not technically supported by the UEFI Capsule specification, and so are out of the scope of this blueprint.
Blueprint information
- Status:
- Not started
- Approver:
- Steve Langasek
- Priority:
- High
- Drafter:
- Mathieu Trudel-Lapierre
- Direction:
- Approved
- Assignee:
- Mathieu Trudel-Lapierre
- Definition:
- New
- Series goal:
- Accepted for wily
- Implementation:
- Unknown
- Milestone target:
- None
- Started by
- Completed by
Related branches
Related bugs
Sprints
Whiteboard
Requirements:
Kernel 4.2 (or appropriate patching earlier kernels) for ESRT support (may require pstore, ESRT. ESRT looks smallish as a patch)
fwupdate (EFI Application for applying Capsule updates)
fwupdate/libfwup (Linux application and library to interface with fwupdate EFI app / EFI structures)
Patch libfwup to properly handle shim (paths appear RedHat specific)
Due to the finite size of ESP, provide a way for users to clean up old (applied) firmware updates.
Optional Requirements:
fwupd (daemon from rh to interface with fwupdate app as a user)
Process:
Option 1: A user installs a .deb file from the Ubuntu archive, which ships just the necessary capsule, in a suitable path (/opt/$vendor ?), and calls the fwupdate command in postinst.
Option 2: A user downloads a capsule update from a vendor (may be a fully-formed capsule or partial, as per specs), and runs the fwupdate command directly or uses an application shipped by Ubuntu to pick the right firmware update file for a supported device, as retrieved from the list of supported updates from libfwup.
$option would speak to fwupdate to check that Capsule updates are supported and that particular update is supported, and if so, select the update to be applied. If an update is to be applied, signify to the user they should reboot (/usr/share/
fwupdate/libfwup uses the structures in EFI to verify the signature of the proposed update and to write a properly-named fwupdate-XYZ.cap file which will be read by the fwupdate EFI app on reboot. It then toggles a flag for fwupdate to know to attempt firmware updates when it is started. It finally sets up BootNext to start in fwupdate on the next boot only.
On boot in fwupdate, the fwupdate EFI app reads the ESRT to know what updates need to be applied; reads the files from disk and applies them (the actual UpdateCapsule calls, which may or may not trigger further signature verification of the Firmware Volume files contained in the Capsule itself (see EFI Capsule Specification, signature verification in DXE appears to be optional)). Once done, it calls ResetSystem for the system to boot back into usual BootOrder.
Implementation plan:
This should probably be done in three phases:
Phase 1: Manual use of fwupdate with capsules from vendor
Phase 2: Integration in Debian/Ubuntu packages
Phase 3: (Optional) Integrate with Device Drivers
Related links:
Windows UEFI Firmware Update Platform: http://
EFI Capsule specification: http://
EFI Driver Execution Environment Core Interface Specification (DXE CIS) http://
Ubuntu kernel 4.1 with ESRT patches: http://
LKML: [PATCH 0/5] EFI capsule pstore support https:/
LKML: [GIT PULL] EFI changes for v4.2 https:/
Fwupdate: https:/
fwupd (daemon to allow session software communicate): https:/
Work Items
Work items:
Patch fwupdate (CLI) to handle shim correctly: DONE
Package/ship fwupdate command and EFI executable: DONE
Package/ship signed fwupdate EFI binary: DONE
MIR fwupdate: DONE
Work items for later:
Teach fwupdate (CLI) to do signature checking at the package/capsule level: TODO
Provide a method for clearing up applied firmware updates safely from fwupdate: TODO
Testing linux<->EFI integration: TODO
Testing cleanup: TODO
Hook up to .deb files postinst: TODO
Overload modaliases to understand GUIDs for firmware updates: TODO
Make use of modaliases to identify target devices for selecting firmware updates: TODO
Extend Device Drivers if necessary to do the right thing: TODO
Dependency tree
* Blueprints in grey have been implemented.