Mario Limonciello
6b0e66354b
Convert libfwupdprivate to a shared library libfwupdplugin
2019-11-27 11:32:43 +00:00
Mario Limonciello
5bd649ef31
uefi: detect unmounted ESP partitions ( Fixes : #1405 )
...
Mount these while writing out updates.
Leave them mounted when done (you gotta reboot anyway).
2019-09-26 10:39:45 -05:00
Jonas Witschel
1b5f1da202
uefi: use tpm2-tss library to read PCR values
...
Using the library instead of the command line tools provides a more
stable interface. This implementation only fetches PCR 0 for all
available hash algorithms since this is the only PCR that is actually
used in fwupd.
2019-08-27 06:23:42 -05:00
Richard Hughes
26d3da4074
uefi: Fix a libasan failure when reading a UEFI variable
...
It seems some older versions of libefi var incorrectly build the 'length' value
in the DP returned from efi_generate_file_device_path(). This means we copy past
the end of the allocated buffer when parsing the efi_update_info_t structure.
This bug seems fixed in efivar git master, and this fix is only going to help
people with older efivar versions. It's probably a good thing to be a bit more
paranoid about EFI variable data anyway.
DEBUG: UpdateInfo:
? 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f
????????????????????????????????????????????????????????????????????????????????????????????????????????
0x0000 ? 07 00 00 00 20 d9 7b 69 cf 12 a9 4d 83 85 99 69 09 bc 65 59 00 00 05 00 00 00 00 00 00 00 00 00
0x0020 ? 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 04 01 2a 00 01 00 00 00 00 08 00 00
0x0040 ? 00 00 00 00 00 40 06 00 00 00 00 00 5a aa 97 5a 10 d5 7e 49 99 0b ca 8d 35 4d c8 6d 02 02 04 04
0x0060 ? 86 00 5c 00 45 00 46 00 49 00 5c 00 66 00 65 00 64 00 6f 00 72 00 61 00 5c 00 66 00 77 00 5c 00
0x0080 ? 66 00 77 00 75 00 70 00 64 00 2d 00 36 00 39 00 37 00 62 00 64 00 39 00 32 00 30 00 2d 00 31 00
0x00a0 ? 32 00 63 00 66 00 2d 00 34 00 64 00 61 00 39 00 2d 00 38 00 33 00 38 00 35 00 2d 00 39 00 39 00
0x00c0 ? 36 00 39 00 30 00 39 00 62 00 63 00 36 00 35 00 35 00 39 00 2e 00 63 00 61 00 70 00 00 00 7f ff
0x00e0 ? 04 00
DEBUG: DP type:0x04 subtype:0x01 size:0x002a
DEBUG: DP type:0x04 subtype:0x04 size:0x0086
DEBUG: found END_ENTIRE at 0x00aa
DEBUG: DP length invalid! Truncating from 0x0086 to 0x0080
DEBUG: DP type:0x7f subtype:0xff size:0x0004
2019-05-02 17:25:34 +01:00
Mario Limonciello
a50b02faf2
uefi: Don't leak the application build path into the binary
...
This can be set at runtime if needed using environment variables.
2019-04-17 16:39:29 +08:00
Gary Lin
5d9984e5ad
uefi: add a new option to specify the os name
...
fu_uefi_get_esp_path_for_os() generates the path to the OS directory
based on "ID" in /etc/os-release, and it may not work for some distros.
Take openSUSE as an example, the "ID" for openSUSE Leap is
"opensuse-leap" and that for openSUSE Tumbleweed is "opensuse-tumbleweed".
However, both of them use the same OS directory in the ESP, i.e.
"/EFI/opensuse".
This commit adds a new build option, efi_os_dir, to allow the packager to
specify the name of OS directory at build time instead of the runtime
detection.
Signed-off-by: Gary Lin <glin@suse.com>
2019-03-29 04:29:42 -04:00
Richard Hughes
96e6783982
trivial: Fix potential compile failures for high -j values
2019-02-01 16:52:16 +00:00
Richard Hughes
f425d29a28
Show a console warning if loading an out-of-tree plugin
...
Fixes https://github.com/hughsie/fwupd/issues/950
2019-01-19 07:26:20 +00:00
Richard Hughes
0e17e6d030
Fix building with -Wl,-z,defs
...
This allows us to find undefined references at compile time, not runtime.
2018-12-25 16:10:54 -06:00
Richard Hughes
b56015ed3f
uefi: Add the PCR0 value as the device checksum for system firmware
...
We can't actually access the UEFI ROM from userspace, but the PCR0 is a hash
built from the ROM itself. We could use this value to ensure the firmware has
been written correctly, and that the PCR0 matches the expected value specified
in the metadata.
2018-12-14 19:23:04 +00:00
Richard Hughes
74fe343213
Add version format quirks for several Lenovo machines
2018-10-18 19:31:04 +01:00
Richard Hughes
481aa2a923
Port from libappstream-glib to libxmlb
...
The libxmlb library is much faster to query, and does not require the daemon
to parse the XML metadata at startup. It's a zero-copy mmap design that is more
modern and less clunky.
RSS has reduced from 3Mb (peak 3.61Mb) to 1Mb (peak 1.07Mb) and the startup
time has gone from 280ms to 250ms.
2018-10-17 14:41:13 +01:00
Richard Hughes
2aa3360d46
trivial: Include appstream-glib.h in the main plugin header
2018-09-04 08:22:39 -05:00
Richard Hughes
95227a919d
trivial: Move gudev to the core plugin deps
2018-08-26 19:38:58 +01: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
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
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
b1e0ab98d1
uefi: Import the fwupd.efi sources from the fwupdate project
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
6b8235660b
trivial: Move getting the secure boot status to the common file
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
Richard Hughes
1a1d135b13
trivial: Add UTF8 to UCS2 helpers from the fwupdate project
2018-06-28 15:51:11 +01:00
Mario Limonciello
01b4f05072
uefi: Match the bootdir argument to fill in uefi.conf by default
...
This will make it more obvious which path it's defaulting to
2018-04-26 15:56:38 +01:00
Mario Limonciello
963dc4245c
uefi: Allow overriding ESP mount point via conf file ( Fixes : #421 ) ( #422 )
...
* uefi: Allow overriding ESP mount point via conf file (Fixes : #421 )
2018-02-27 14:26:58 -06:00
Richard Hughes
57746cb839
Add the Meson build system as an alternate to autotools
...
Automake and autoconf are impossible to fully understand and Meson now provides
everything we need for a much smaller, faster, and more understandable build.
See http://mesonbuild.com/ for more information.
2017-04-12 16:35:18 +01:00