Commit Graph

6647 Commits

Author SHA1 Message Date
Allen_Chang
c0639e9bd3
pixart-rf: Add support for new devices 2021-12-29 09:50:21 +00:00
jyu99
278ccd1714
pixart_rf: Expand buffer size for new hardware support 2021-12-29 09:47:14 +00:00
Dylan Van Assche
e0f7087bfb modem-manager: log when modem is added
Modem removals are logged, but nothing is logged when a modem is added.
2021-12-26 11:10:13 -06:00
Richard Hughes
8e6a3f6bbb Allow devices to opt-in to metadata-provided vendor strings 2021-12-22 15:34:36 +00:00
Richard Hughes
72af1b42b4 uf2: Fix fuzzer timeout when parsing an invalid UF2 file
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=42789
2021-12-22 11:46:03 +00:00
Richard Hughes
3fec2d8ffb trivial: Add an HSI resolution hint about kernel params 2021-12-21 10:07:05 +00:00
Richard Hughes
e5198e543d trivial: Make the HSI docs reflect reality
Fixes https://github.com/fwupd/fwupd/issues/4111
2021-12-21 10:07:05 +00:00
Richard Hughes
60d266cbc6 Add support for UF2 devices
A UF2 device exposes a VFAT block device (sometimes called a Mass
Storage Device) which has a virtual file called `INFO_UF2.TXT` where
metadata can be read. It may also have a the current firmware exported
as a file called `CURRENT.UF2` which is in a 512 byte-block UF2 format.

Writing any file to the MSD will cause the firmware to be written.
Sometimes the device will restart and the volume will be unmounted
and then mounted again. In some cases the volume may not “come back”
until the user manually puts the device back in programming mode.

Match the block devices using the VID*PID, UUID or label, and then
create a UF2 device which can be used to flash firmware.

Note: We only read metadata from allow-listed IDs to avoid causing
regressions on non-UF2 volumes. To get the UUID and label you can
use commands like:

    udisksctl info -b /dev/sda1
2021-12-21 10:06:18 +00:00
Richard Hughes
6591871192 trivial: Fix compiling with -Dbuild=library 2021-12-21 10:04:48 +00:00
Richard Hughes
56f6f99633 usi-dock: Add support for various TBT4 docks for Lenovo and HP
With much help from Victor Cheng <victor_cheng@usiglobal.com>
2021-12-21 10:04:12 +00:00
Dylan Van Assche
f6833f96c3 modem-manager: add context for fu_mm_device_udev_new
After upgrading a modem, the FuContext was missing when the modem comes back
2021-12-20 10:02:36 +00:00
Philipp Wendler
935e92d079 uefi-capsule: clarify UDisks requirement for ESP autodetection
The ESP is autodetected only if UDisks is available,
but this was not explicitly documented so far.

Fixes #4103
2021-12-17 14:35:08 -06:00
Mario Limonciello
22057f76cc redfish: Use secure helper to set file permissions when setting password
Instead of installing the conf file as locked down, set permissions when
using it.

This fixes a problem on snap first run:
```
cp: cannot open '/snap/fwupd/x1/etc/fwupd/redfish.conf' for reading: Permission denied
```
2021-12-17 11:05:05 -06:00
Mario Limonciello
17db067d13 libfwupdplugin: add a helper to set a config file to secure 2021-12-17 11:05:05 -06:00
Mario Limonciello
1b9bdb1659 trivial: snap: don't try to copy /var if it's not in the snap 2021-12-17 11:05:05 -06:00
Mario Limonciello
ec90ebc20c snap: use newer json-glib (Fixes: #4099) 2021-12-17 11:05:05 -06:00
Richard Hughes
3356d8a844 trivial: Add fwupd_device_get_root() for GUI use 2021-12-17 16:44:57 +00:00
Sean Rhodes
19c7ee2423 plugins/flashrom: Change StarLabs devices from number to plain
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
2021-12-17 16:44:16 +00:00
Richard Hughes
cb110b55f8 trivial: Fix regression from 9f94dc9 on Ubuntu Focal 2021-12-17 12:19:39 +00:00
Mario Limonciello
2f3b2d7a86 trivial: snap: stop installing introspection data
Fixes: 5d0960048
2021-12-17 10:12:52 +00:00
Richard Hughes
9f94dc97c4 trivial: Handle old JSON-Glib more gracefully
Fixes https://github.com/fwupd/fwupd/issues/4099
2021-12-16 19:29:49 +00:00
Mario Limonciello
db94a995bd trivial: contrib/setup: if markdown isn't installed don't show an error
```
Install developer-friendly **unsafe** PolicyKit rules into /etc/polkit-1/rules.d? (y/N) n
Traceback (most recent call last):
  File "/home/supermario/fwupd/./contrib/ci/fwupd_setup_helpers.py", line 154, in <module>
    test_markdown()
  File "/home/supermario/fwupd/./contrib/ci/fwupd_setup_helpers.py", line 34, in test_markdown
    import markdown
ModuleNotFoundError: No module named 'markdown'
Collecting markdown
  Downloading Markdown-3.3.6-py3-none-any.whl (97 kB)
     |████████████████████████████████| 97 kB 1.1 MB/s
Collecting importlib-metadata>=4.4
  Downloading importlib_metadata-4.8.2-py3-none-any.whl (17 kB)
Collecting zipp>=0.5
  Downloading zipp-3.6.0-py3-none-any.whl (5.3 kB)
Installing collected packages: zipp, importlib-metadata, markdown
Successfully installed importlib-metadata-4.8.2 markdown-3.3.6 zipp-3.6.0
```
2021-12-16 07:07:33 -06:00
Eric Lin
55553a7a5b add new device Belkin docking station : VID050D/PID003F 2021-12-16 11:57:19 +00:00
JackZhang-Primax
73effcbc11 Update pixart-rf.quirk
Add device support for HP 320 BTKB
2021-12-16 00:33:28 -06:00
Dylan Van Assche
df3b139a0e modem-manager: require AC power
Updating modems is less risky when AC power is present.
2021-12-15 22:07:23 +00:00
Dylan Van Assche
833547823e plugins/fastboot: increase operation delay for Quectel EG25-G
When flashing bigger firmware packages we would still get an timeout
after 10 minutes. Increasing the delay between read/write operations
from 100ms to 250ms solves that.
2021-12-15 22:07:23 +00:00
Richard Hughes
4bf2469b88 nordic-hid: Fix a few small memory leaks 2021-12-15 17:49:56 +00:00
Gaël PORTAY
53ed50e1c9 Add block erase command to FuCfiDevice 2021-12-15 17:49:32 +00:00
Gaël PORTAY
428f3d5b99 Add block size properties to FuCfiDevice 2021-12-15 17:49:32 +00:00
Richard Hughes
bcf000d7cc Add fu_common_get_contents_stream() for future usage 2021-12-15 14:24:30 +00:00
Richard Hughes
52fd89f9ab Add fu_memmem_safe() with fallback code for win32 2021-12-15 12:57:49 +00:00
Mario Limonciello
b92fe4a760 trivial: allow wildcard so same build script works on older fedora 2021-12-15 06:46:27 -06:00
Mario Limonciello
9e02ee590f trivial: win32: bump to fedora 35 2021-12-15 06:46:27 -06:00
Mario Limonciello
27ac4f1fc2 trivial: libfwupd: correct building URI path
when run on Windows the following is emitted:

```
changing metadata URI from https://cdn.fwupd.org/downloads/firmware.xml.gz to
https://cdn.fwupd.org/downloads\firmware-02681-stable.xml.gz
```
2021-12-15 06:46:27 -06:00
Mario Limonciello
e332a3683e trivial: win32: don't reference synaptics-mst plugin
This plugin won't work on win32, it's a pointless error message
2021-12-15 06:46:27 -06:00
Mario Limonciello
0b56a58b65 trivial: win32: fix subprocess call
```
19:22:39:0430 FuCommon             running 'curl.exe https://cdn.fwupd.org/downloads/firmware.xml.gz.jcat --output C:\Users\mlimonci\AppData\Local\Microsoft\Windows\INetCache\fwupd\firmware.xml.gz.jcat --cacert C:\Program Files (x86)\fwupd\bin\..\bin\ca-bundle.crt'
19:22:39:0515 GLib-GObject         invalid cast from 'GWin32InputStream' to 'GPollableInputStream'
19:22:39:0515 GLib-GIO             g_pollable_input_stream_create_source: assertion 'G_IS_POLLABLE_INPUT_STREAM (stream)' failed
19:22:39:0516 GLib                 g_source_attach: assertion 'source != NULL' failed
19:22:39:0516 GLib                 g_source_set_callback: assertion 'source != NULL' failed
```
2021-12-15 06:46:27 -06:00
Mario Limonciello
bba3cd79de trivial: win32: include and enable curl support
This is needed for LVFS refreshes to work.

* Install curl binary
* Install ca-certs bundle
* Install gspawn helpers
* Reference ca-certs bundle on Win32
2021-12-15 06:46:27 -06:00
Mario Limonciello
12bdc7d3ad trivial: win32: discover the running directory
This should allow launching fwupdtool.exe from anywhere outside
of PATH
2021-12-15 06:46:27 -06:00
Mario Limonciello
4960ae34ba trivial: win32: discover user's profile directory
For anything that is normally in /var on Linux, write it
here so that users don't need admin rights.
2021-12-15 06:46:27 -06:00
Mario Limonciello
dabfac661e trivial: win32: disable motd writing by default 2021-12-15 06:46:27 -06:00
Mario Limonciello
54b61c2027 trivial: win32: install the lvfs remote 2021-12-15 06:46:27 -06:00
Mario Limonciello
7188e5b335 Add support to show curl/wget output from fwupdmgr/fwupdtool 2021-12-15 06:46:27 -06:00
Dylan Van Assche
90baeaabbc modem-manager: add Quectel EG25-G no response quirk 2021-12-14 22:46:04 +00:00
Dylan Van Assche
a489191c38 modem-manager: add support for AT fastboot detach commands without response
Normally each AT command is ended with either OK or ERROR,
but that's not the case for the Quectel EG25-G's AT command to enter fastboot.
As soon as AT+QFASTBOOT is sent, the modem switches to fastboot mode without replying OK.
2021-12-14 22:46:04 +00:00
Dylan Van Assche
3eead7aa60 modem-manager: add quirk for Quectel EG25-G
Allow fwupd to detect the switch between modem-manager and fastboot plugins
 as it appears under a different vendor and device ID.
2021-12-14 22:46:04 +00:00
Dylan Van Assche
12282ca6bc fastboot: add operation delay quirk for Quectel EG25-G 2021-12-14 22:46:04 +00:00
Dylan Van Assche
e6121ae3c7 fastboot: add quirk to delay operations
Some devices such as the Quectel EG25-G modem need some breathing room
between fastboot commands. This quirk allows to specify for such devices
a delay which is used after each read or write command.
Without this, the Quectel EG25-G modem's fastboot bootloader
cannot handle this and crashes.
2021-12-14 22:46:04 +00:00
Dylan Van Assche
c0ec63091d fastboot: add quirk for Quectel EG25-G
The Quectel EG25-G modem must use a blocksize of 16384 bytes in fastboot mode.
Using a different blocksize makes the fastboot bootloader crash,
resulting in a failed update.
2021-12-14 22:46:04 +00:00
Richard Hughes
b2048820aa Copy private flags from donor devices 2021-12-13 15:21:51 -06:00
Richard Hughes
e21fb7630a modem-manager: Set the context when the device is constructed 2021-12-13 15:21:43 -06:00