Richard Hughes [Mon, 30 Jan 2023 11:54:05 +0000 (11:54 +0000)]
Remove unused API for setting backend tags
It turns out we do not want to know the current phase of the device, and we can
achieve the same thing tagging the GUsbDevice manually and clearing the events
at exactly the correct time.
fwupd-efi 1.4 enforces that NX bit is set by default.
This won't affect most users, it should only affect those that compile
by hand and don't have fwupd-efi installed already.
Jason Gerecke [Tue, 17 Jan 2023 22:24:14 +0000 (14:24 -0800)]
wacom-usb: Retry set_report on failure
Sometimes the flash process will randomly hang and time-out when sending
data to the device. We currently do not use any retry logic, so if this
happens the flash attempt is treated as a failure. This can be a source
of worry or frustration, especially if subsequent manual retries fail
in a similar way.
Adding FU_HID_DEVICE_FLAG_RETRY_FAILURE to the list of flags used when
calling fu_hid_device_set_report allows fwupd to try sending a block
multiple times if such a time-out (or other error) occurs. This makes
the flash process less prone to failure.
Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
Richard Hughes [Mon, 23 Jan 2023 15:43:37 +0000 (15:43 +0000)]
Save all the FwupdDeviceFlags in the pending database
Force the compiler to treat them as uint64_t so that bitwise operations work.
At the moment flags greater than 1<<32 are just being silently ignored...
Richard Hughes [Sat, 21 Jan 2023 09:54:28 +0000 (09:54 +0000)]
Speed up startup by a huge amount when using directory remotes
By using libxmlb correctly we can avoid rebuilding the metadata if the directory
is unchanged. This means the initial 'generation' is unchanged in speed, but
subsequent loads are almost instant as the archives are not decompressed.
Richard Hughes [Sat, 21 Jan 2023 10:59:22 +0000 (10:59 +0000)]
Fallback to the <checksum> if the <artifact> is invalid
In 62a62f8f0f707d815e65ca9d0634459edb6eed97 we started ignoring the artifact
when the type was 'binary' -- however, we need to fall back to the older tag
schema if the data was not set, rather than only if the <artifact> tag was not
found.
Michal Suchanek [Wed, 18 Jan 2023 15:07:05 +0000 (16:07 +0100)]
uefi-capsule: Do not call grub2-probe without arguments
commit 684bc0381 ("trivial: fix various shellcheck warnings") adds call
to ${grub_probe} without any argument which causes grub2-probe to return
an error, and generating grub configuration fails.
Add --version argument to avoid the error, and redierct the output to
/dev/null so that it's not included in the grub configuration file.
The commit also adds superfluous single quotes causing another error:
/usr/sbin/grub2-probe: error: cannot find a GRUB drive for `${grub_probe} --target=device \${ESP}` | sed -e "s/^/\t/". Check your device.map.
Fix the quoting to work at least for single device.
Fixes: #5424 Fixes: 684bc0381 ("trivial: fix various shellcheck warnings") Signed-off-by: Michal Suchanek <msuchanek@suse.de>
Richard Hughes [Fri, 13 Jan 2023 10:06:07 +0000 (10:06 +0000)]
Improve FDT parsing compatibility
Newer versions of dtc agressively pack the string table, using *any* matching
suffix rather than whole strings. This is specification compliant, but breaks
if you use the offset as a hash key as a [premature] optimization.
Just use the string table as a flat block of memory rather than pre-parsing it.
This fixes reading the system FDT on new OpenBMC builds.
Richard Hughes [Mon, 16 Jan 2023 15:42:55 +0000 (15:42 +0000)]
Refactor the hwids functionality
This refactors the code as it was getting very confusing; before FuSmbios was
reading both SMBIOS and the kernel-provided DT -- and various things were
injecting overrides in three different place. To properly support FDT remove
one layer of indirection.
This also lets us use the compatible strings to enable plugins specifying the
flag _REQUIRE_HWID -- which means we only load the plugin if it's got a chance
of working. e.g.
Richard Hughes [Wed, 11 Jan 2023 15:04:08 +0000 (15:04 +0000)]
Add fu_context_get_fdt() to get the Flat Device Tree
This is needed because multiple plugins will soon be consuming the system FDT,
and we don't want to either parse this multiple times, or duplicate the loading
logic.
Richard Hughes [Tue, 10 Jan 2023 20:28:31 +0000 (20:28 +0000)]
trivial: Reduce runtime RSS requirement for each device subclass
Remove the FuDeviceClass padding, as this library now loaded using an rpath
rather than a shared library with a static API. This matches what we did for
the FuFirmwareClass objects a while ago.
Richard Hughes [Mon, 9 Jan 2023 08:05:48 +0000 (08:05 +0000)]
emmc: Add back a legacy GUID to fix a regression
I had no idea anyone was using this, so apologies. The instance ID is completely
wrong, but it is effectively D-Bus ABI and we need to support old firmware in
the field.
Richard Hughes [Wed, 4 Jan 2023 09:46:11 +0000 (09:46 +0000)]
Do not allow LZX compressed cabinet archives
The GCab decompression code is *scary* low level C that has not had any security
auditing other than by the fuzzer (which found plenty of memory-safety bugs).
Supporting LZX is useless at best, and could be a security exploit at worst.