Mario Limonciello
9ef5f741bc
plugins: Set platform IDs for non-USB/non-UDEV plugins
2018-09-02 14:45:39 -05:00
Richard Hughes
22367e7948
trivial: Refactor out functionality from a mega-method
2018-08-30 16:53:19 +01:00
Richard Hughes
73bf2337c1
trivial: Add fu_common_strtoull() as a shared function
2018-08-28 09:41:10 +01:00
Richard Hughes
95227a919d
trivial: Move gudev to the core plugin deps
2018-08-26 19:38:58 +01:00
Richard Hughes
29129ed4f4
uefi: Allow upgrades using a self-signed fwupd.efi binary
...
This doesn't require shim, so for this uncommon case add a configure option.
Fixes https://github.com/hughsie/fwupd/issues/669
2018-08-23 14:30:04 +01:00
Mario Limonciello
df60f69814
uefi: Add special handling for /efi ( Closes #680 )
...
This is a similar problem to #627 (which was fixed by 9bdbbc5ca
).
Add special handling to allow writing to /efi/EFI
2018-08-22 16:43:20 -05:00
Mario Limonciello
25b49b6a6f
uefi: Add 'autofs' to supported filesystems ( Closes : #660 )
...
systemd-automount will unmount the ESP when not in use for some
people. This causes automatic ESP detection to fail.
In this case the ESP will need to be added to the conf file and
then this commit will let it keep working.
2018-08-20 07:44:17 -05:00
Richard Hughes
4721112601
uefi: Don't assert when run as non-root
2018-08-13 11:29:37 +01:00
Mario Limonciello
9bdbbc5ca8
uefi: Handle /boot properly ( Closes : #627 )
...
/boot is a special cased directory when using ProtectSystem=full
Due to this, it's marked read only even if it's listed in ReadWritePaths.
Allow folks to use this for their ESP, but they need to create /boot/EFI
in advance of starting fwupd.
2018-08-09 09:28:50 -05:00
Richard Hughes
e5e441908f
uefi: Fix reporting errors when getting info about efivars
...
Found using Coverity.
2018-08-09 15:27:36 +01:00
Richard Hughes
84960d9ba2
uefi: Fix up some trivial NULL/FALSE confusion
2018-08-09 14:21:23 +01:00
Richard Hughes
d2808801a6
trivial: Ensure all source files include config.h
2018-08-09 14:21:23 +01:00
Richard Hughes
02c90d8a03
Remove the unused Emacs indenting headers from all source files
...
Fixes https://github.com/hughsie/fwupd/issues/636
2018-08-09 12:48:04 +01:00
Mario Limonciello
4ab6116ea0
uefi: Fix encoding the GUID into the capsule EFI variable
...
Before:
$ /usr/lib/fwupd/fwupdate --info
Information for the update status entry 0:
Information Version: 7
Firmware GUID: {00000000-0000-0000-0000-000000000000}
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Capsule Flags: 0x00131072x
Hardware Instance: 0
Update Status: attempt-update
Capsule File Path: /EFI/ubuntu/fw/fwupd-7ceaf7a8-0611-4480-9e30-64d8de420c7c.cap
After:
$ /usr/lib/fwupd/fwupdate --info
Information for the update status entry 0:
Information Version: 7
Firmware GUID: {7ceaf7a8-0611-4480-9e30-64d8de420c7c}
Capsule Flags: 0x00131072x
Hardware Instance: 0
Update Status: attempt-update
Capsule File Path: /EFI/ubuntu/fw/fwupd-7ceaf7a8-0611-4480-9e30-64d8de420c7c.cap
2018-08-09 08:14:04 +01:00
Mario Limonciello
fd99902ba8
uefi: Test for read only efivarfs ( Closes : #625 )
2018-08-09 08:11:40 +01:00
Richard Hughes
03aead9fe7
uefi: Check the filesystem type when checking the ESP
2018-08-08 20:35:04 +01:00
Richard Hughes
99b0b1be04
uefi: Check the user-supplied ESP path
...
Additionally, if the user specified something invalid, do not autodetect the
ESP but return with a journal error. It seems wrong to ignore what the user
explicitly set and perhaps do something dangerous.
Alternative to https://github.com/hughsie/fwupd/pull/599
2018-08-08 20:35:04 +01:00
Richard Hughes
34ea74fb2c
uefi: Don't override _FORTIFY_SOURCE when building the EFI binary
...
Fixes https://github.com/hughsie/fwupd/issues/631
2018-08-08 20:16:53 +01:00
Mario Limonciello
d1775bc026
uefi: Populate UpdateError with reasons that the plugin won't run
...
Previously if missing secure boot binaries, or invalid ESP was created the
plugin would just not load.
Now instead populate UpdateError and remove the updateble flag, but still show
the device in fwupdmgr and fwupdtool.
2018-07-17 14:30:27 +01:00
Mario Limonciello
e6e2bf9d97
trivial: Allow EFI application path to come from a different root
2018-07-10 14:10:16 -05:00
Mario Limonciello
fd65ddda8a
uefi: Rename all intermediary files and UEFI variables to prefix fwupd
...
fwupdate prefix is used by fwupdate and this will prevent clashes in case
its used instead.
2018-07-10 10:45:39 -05:00
Mario Limonciello
14fad85164
UEFI: Rename UEFI boot entry
...
1) Drop the path at the end of the title (\fwupdx64.efi)
2) Linux-Firmware-Updater to Linux Firmware Updater
The behavior that required the hacky name has been fixed since shim 10
which is in all the relevant distros now.
3322257e61
2018-07-10 10:45:39 -05:00
Mario Limonciello
44305bbde4
Rename EFI application from fwup<arch>.efi to fwupd<arch>.efi
...
This will prevent potentially clashing with fwupdate's EFI application
and allow them to remain co-installable.
2018-07-10 10:45:39 -05:00
Richard Hughes
7ecf0164de
uefi: Show the stored capsule filename in fwupdate
2018-06-28 15:51:11 +01:00
Richard Hughes
57df956d7b
uefi: Add a libexec tool to mimic the original fwupdate CLI interface
2018-06-28 15:51:11 +01:00
Richard Hughes
04f8f267c5
trivial: Move the guessing of the ESP to common code
2018-06-28 15:51:11 +01:00
Richard Hughes
1ccf35a9e4
dell: Register devices with the uefi plugin rather than using libfwup directly
...
The device registration allows us to create a 'virtual' device that can accept
capsule updates that is not found in the ESRT.
2018-06-28 15:51:11 +01:00
Richard Hughes
dd23871698
uefi: Do not link against libfwup
2018-06-28 15:51:11 +01:00
Richard Hughes
a80f79cb4d
uefi: Upload the firmware capsule without using libfwup
2018-06-28 15:51:11 +01:00
Richard Hughes
11d62030a3
uefi: Upload the historical result without using libfwup
2018-06-28 15:51:11 +01:00
Richard Hughes
b157d6eff9
uefi: Unlock the ESRT without using libfwup
...
This will be handled by a Dell-specific plugin instead.
2018-06-28 15:51:11 +01:00
Richard Hughes
cff980cfda
uefi: Do not get the custom ESP location from libfwup
2018-06-28 15:51:11 +01:00
Richard Hughes
fb0e94857f
uefi: Upload the UX bitmap without using libfwup
2018-06-28 15:51:11 +01:00
Richard Hughes
f3f4ca0320
uefi: Clear the device status without using libfwup
2018-06-28 15:51:11 +01:00
Richard Hughes
5585b00892
uefi: Access /sys/firmware/efi/efivars directly rather than using efivars
...
This allows us to redirect the functions for our self tests.
2018-06-28 15:51:11 +01:00
Mario Limonciello
cfc22a8b90
uefi: Detect the EFI system partition location at runtime
...
Check across a list of common EFI system partition locations for a mounted
location before starting fwupd.
This also will cause the plugin to not initialize if the EFI system partition
is not mounted.
2018-06-28 15:51:11 +01:00
Richard Hughes
ca5b4a7c97
uefi: Do not use libfwupdate to get the list of resources
2018-06-28 15:51:11 +01:00
Richard Hughes
ae47a347e0
uefi: Do not enable the plugin if efivars are not available
...
If the user is using some super-old kernel or broken system we want to return
early with an error rather than try to catch each way this can fail at runtime.
2018-06-28 15:51:11 +01:00
Richard Hughes
af5ec20004
uefi: Get the framebuffer without calling into libfwupdate
2018-06-28 15:51:11 +01:00
Richard Hughes
d7cdf9fb67
uefi: Use FuUefiBgrt from the plugin code
2018-06-28 15:51:11 +01:00
Richard Hughes
b1e0ab98d1
uefi: Import the fwupd.efi sources from the fwupdate project
2018-06-28 15:51:11 +01:00
Richard Hughes
62ba9a6f2f
uefi: Check the flashes left before installing firmware
2018-06-28 15:51:11 +01:00
Richard Hughes
83390f6556
uefi: Add functionality to parse the EFI framebuffer size
2018-06-28 15:51:11 +01:00
Richard Hughes
f758e7b73a
uefi: Add functionality to parse the BGRT table supported
2018-06-28 15:51:11 +01:00
Richard Hughes
a593447695
uefi: Add functionality to get a bitmap size
2018-06-28 15:51:11 +01:00
Richard Hughes
6b8235660b
trivial: Move getting the secure boot status to the common file
2018-06-28 15:51:11 +01:00
Richard Hughes
2b1fcfd662
trivial: Use FuUefiDeviceStatus in preference to the defines from fwupdate
2018-06-28 15:51:11 +01:00
Richard Hughes
25509c01ce
trivial: Use FuUefiDeviceKind in preference to the defines from fwupdate
2018-06-28 15:51:11 +01:00
Richard Hughes
0766857407
uefi: Read the ESRT entries from a directory in sysfs
2018-06-28 15:51:11 +01:00
Richard Hughes
bd80edd6be
uefi: Add a device superclass to model each ESRT entry
2018-06-28 15:51:11 +01:00