Commit Graph

5517 Commits

Author SHA1 Message Date
Đoàn Trần Công Danh
e9adb950b7 esp-list: allow external ESP again
In fwupd 1.5.1 and before, we allowed ESP on external device.
From 56d816a5, (Fall back to FAT32 internal partitions for detecting
ESP, 2020-11-11), we started to only consider internal devices only.

While it would be desirable to only consider internal devices for
fallback esp partition, there're some setup that put ESP on external
device, e.g. full disk encryption with /boot on a USB.

Let's allow external ESP again.
2021-01-24 07:58:15 +00:00
Jeremy Soller
fb3b349f16 system76-launch: Add a plugin for the System76 Launch Configurable Keyboard
This plugin supports reading the keyboard firmware version at runtime and
rebooting the keyboard to USB DFU mode. Tested with firmware uploaded to
embargo-system76.
2021-01-23 20:28:16 +00:00
Mario Limonciello
b543446fda Add a CI test to make sure we can always link to fwupdplugin
Based on a patch from Simon McVittie on
https://salsa.debian.org/efi-team/fwupd/-/merge_requests/4

Suggested-by: Simon McVittie <smcv@debian.org>
2021-01-22 14:01:25 -06:00
Mario Limonciello
e95c1b3bd5 trivial: fwupdplugin: install deprecated header as well 2021-01-22 14:01:25 -06:00
Mario Limonciello
75835b4a0b Use FWUPD_COMPILATION define to indicate an in tree build
When this is done, include:
* Including the hash
* Including anything that is not ABI stable in plugins yet

Suggested-by: Simon McVittie <smcv@debian.org>
2021-01-22 14:01:25 -06:00
Mario Limonciello
1313f23307 trivial: correct includes for fu-plugin.h
Needed for working "out of tree" compilation.
2021-01-22 14:01:25 -06:00
Mario Limonciello
93e53fe6fe trivial: add python3-gi-cairo to lgtm depends 2021-01-22 10:05:05 -06:00
Simon McVittie
4289c1665c trivial: debian: Add trivial compile/link/run test for libfwupd-dev
Tests like these are a surprisingly effective way to detect packaging
mistakes.

Reproduces: #980691, #980684
2021-01-21 09:57:25 -06:00
Simon McVittie
fe36968d5e trivial: debian: d/control.in: Add missing -dev dependencies
Each -dev package needs to depend on all dependencies' -dev packages
that are required when linking against the included library with
pkg-config.

Closes: #980691, #980684
2021-01-21 09:57:14 -06:00
Richard Hughes
8ca69364af dfu: Allow quirking the target transfer size 2021-01-21 09:18:38 +00:00
Richard Hughes
89ee9edc0a Allow going back to the 'default' branch
We only want to translate a NULL branch into 'default' for display, and not
actually store it in the GPtrArray.
2021-01-20 20:19:02 +00:00
Richard Hughes
814a5ee874 trivial: Only offer to switch-branch updatable devices 2021-01-20 20:19:02 +00:00
Mario Limonciello
5791b3df94 trivial: debian: remove ata.conf on upgrade (Closes: #980570) 2021-01-20 14:16:47 -06:00
Richard Hughes
9c1bdf68be trivial: Split off a subpackage for the UX capsule data
This makes the CoreOS image over 1Mb smaller, which is over 30% of the size of
the base fwupd package.
2021-01-20 11:03:20 +00:00
Richard Hughes
11603b3e06 Install the UX data into a single .tar.xz file
This allows much better compression (-60%) than gziping them individually and
also allows us to build the capsule UX images as part of the build stage.

Also add more popular screen resolutions for laptops you can buy in 2021.
2021-01-20 11:03:20 +00:00
Mario Limonciello
ac5d2c5370 trivial: debian: fwupd.postinst: Adjust to read /etc/os-release instead
`/etc/lsb-release` isn't in modern debian installations
2021-01-19 15:47:50 -06:00
Richard Hughes
6101067f03 coreboot: Remove plugin and instead add metadata to flashrom devices
The coreboot plugin never actually gained the ability to write. As it stands a
coreboot system now adds *two* system-firmware devices (from both flashrom and
coreboot) which isn't ideal.

Just allow flashrom to enumerate quirked devices and add coreboot-specific
metadata as required. If we require some kind of cbfs parsing then we can do
that in FuFlashromDevice->prepare_firmware().
2021-01-19 21:32:59 +00:00
Mario Limonciello
5c04b4f4bd trivial: debian: read /etc/lsb-release instead of dpkg-dev (Closes: #977860, #977861, #970783) 2021-01-19 12:47:46 -06:00
Richard Hughes
0155ad6f9b Add the PCR0 to the report metadata
Although we could reconstruct the PCR0 value on the LVFS from the (already
included) event log, it's much more scalable if the client just provides the
data that we want to filter by.
2021-01-19 14:57:48 +00:00
Richard Hughes
a512d91d43 Report the lockdown status from UEFI and SuperIO plugins
I was asked the other day how many machines would support a /dev/mem mmap'd
update mechanism, and I had to say that I didn't know. We use direct port IO in
the SuperIO plugin too, and it would be good to know how quickly we need to
port this to something else.
2021-01-19 14:57:10 +00:00
Richard Hughes
8bafffa5f3 Read the kernel lockdown status at startup 2021-01-19 14:57:10 +00:00
Richard Hughes
9a81d63add pci-bcr: Only mark the device non-updatable if WPD unset and BLE set
It's unusual, but if BIOS lock enable is enabled (so we cannot *change* the
value of BIOSWE) but the BIOS is already WE then we can write to the hardware
just fine.
2021-01-19 14:44:51 +00:00
Richard Hughes
4a19138026 trivial: Use argparse for make-images.py 2021-01-19 11:56:55 +00:00
Richard Hughes
51f7bde2b7 trivial: Move the make-images script to the consumer 2021-01-19 11:56:55 +00:00
Richard Hughes
8491c75e51 trivial: Do not fight with meson for console output 2021-01-19 11:56:55 +00:00
Richard Hughes
fe0c83e120 trivial: Actually write the BMP UX images
We need to seek back to the head to read the data back...
2021-01-19 11:56:55 +00:00
Richard Hughes
4d9b2d1233 Always return a valid semver from fu_common_version_ensure_semver()
Return NULL if not valid, and handle tilde and dash where required.
2021-01-19 11:56:32 +00:00
Richard Hughes
70ded56f8a synaptics-rmi: Add some support for PS2 devices
With much help from David Chiu <david.chiu@tw.synaptics.com>, many thanks.
2021-01-18 21:18:02 +00:00
Richard Hughes
a5deffb184 synaptics-rmi: Allow the device to enter a firmware mode that allows programming 2021-01-18 21:18:02 +00:00
Richard Hughes
1974adaa04 synaptics-rmi: Query the build ID and ProjectID to work around a HW bug
The build ID is set and the product ID is parsed in a different way for a PS/2 device.
2021-01-18 21:18:02 +00:00
Richard Hughes
8b1ca08332 synaptics-rmi: Write bus select zero when detaching
This has no effect for HID devices.
2021-01-18 21:18:02 +00:00
Richard Hughes
ff82d005d7 synaptics-rmi: Use the correct delay when erasing v5 firmware 2021-01-18 21:18:02 +00:00
Richard Hughes
a0dd0e2be2 synaptics-rmi: Split out the HID specific parts to FuSynapticsRmiDevice 2021-01-18 21:18:02 +00:00
Richard Hughes
edc0c08065 synaptics-rmi: Support parsing and writing signed firmware
Validate the firmware signature if provided
2021-01-18 21:18:02 +00:00
Richard Hughes
643d7b16b1 synaptics-rmi: Do not assign the class vfuncs during setup
We fixed this problem in logitech-hidpp and this plugin will suffer the same bug.
2021-01-18 21:18:02 +00:00
Richard Hughes
a2798213ee synaptics-rmi: Do not set the page to the existing value 2021-01-18 21:18:02 +00:00
Richard Hughes
2773476884 synaptics-rmi: Do not match all HIDRAW\VEN_06CB devices
Apparently, some devices will not respond well to probing.
2021-01-18 21:18:02 +00:00
Richard Hughes
0d634fe81e Allow more than one plugin to use GnuTLS directly 2021-01-18 21:18:02 +00:00
Richard Hughes
d6d4da5d29 trivial: Remove unused deprecated function
See https://docs.python.org/3.8/whatsnew/3.8.html#deprecated
2021-01-18 21:17:37 +00:00
Richard Hughes
4c98099393 trivial: Only regenerate the .bmp.gz files if they do not exist
This reduces the time for 'ninja install' from 3s to 0.7s.
2021-01-18 21:17:37 +00:00
Richard Hughes
1207b626b7 Speed up writing BMP images during 'ninja install'
Do less I/O when writing the .BMP UX capsule images. This reduces the time for
installing from 6s to 3s, which speeds up development quite a bit.
2021-01-18 21:17:37 +00:00
Richard Hughes
f6751cd783 Allow using custom data to generate CHIDs
This is really useful when working out HwId quirk values for remote systems.

    fwupdtool export-hwids target.hwids
    vim target.hwids
    fwupdtool hwids target.hwids
2021-01-18 07:56:34 +00:00
Richard Hughes
a676a5ec70 Do not allow Lenovo hardware to install multiple capsules
Once a device has been scheduled for update mark the others from the same plugin
as updatable-hidden rather than updatable so that fwupdmgr or gnome-software
does not try to offer updates for them.
This is preferable to quitting with an error in FuDevice->prepare as we don't
want to waste bandwidth downloading the next update and then show the user an
error they can't possibly understand.

Exclude the currently scheduled device to allow the user to change the scheduled
release and so the pending device does not disappear from UI tools.
2021-01-15 21:43:45 +00:00
Richard Hughes
425ed311aa flashrom: Do not allow flashing if BLE is enabled
If BLE is set flashrom isn't going to work and the user would get a super scary
warning.
2021-01-15 15:24:19 +00:00
Richard Hughes
71f713ee50 trivial: Show the device branch in fwupdmgr 2021-01-15 15:21:19 +00:00
Richard Hughes
667a7b41e3 Add GUIDs straight away if ->setup() has already been called
We only convert the instance IDs to GUID after setup() has been called, which
means if we add even more instance IDs to the device in functions like
fu_plugin_device_registered() they never actually get converted to the GUID
form too.
2021-01-15 15:00:22 +00:00
Richard Hughes
ae72b9b9f6 flashrom: Mark the device as requiring a reboot 2021-01-15 10:01:00 +00:00
Richard Hughes
568bb79ba0 flashrom: Spin the progress progressbar while flashrom is writing 2021-01-15 10:01:00 +00:00
Richard Hughes
e48fdff1c8 flashrom: Process the output of flashrom_flash_probe() correctly 2021-01-15 10:01:00 +00:00
Richard Hughes
5a53d0aeb0 flashrom: Do not show unhelpful debug output 2021-01-15 10:01:00 +00:00