Commit Graph

8234 Commits

Author SHA1 Message Date
Richard Hughes
fd08eaefee trivial: Fix bitwise operators in last commit 2023-01-22 08:29:20 +00:00
Richard Hughes
5d6cb83d1c Add fu_context_remove_flag() for future use 2023-01-22 07:35:48 +00:00
Richard Hughes
0554d4db32 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.
2023-01-21 13:33:09 +00:00
Richard Hughes
433d138a26 Show some debugging when we ignore a release due to missing checksums 2023-01-21 13:32:53 +00:00
Richard Hughes
60783fa0da Fallback to the <checksum> if the <artifact> is invalid
In 62a62f8f0f 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.
2023-01-21 13:32:53 +00:00
Aaron Skomra
189686368a wacom-usb: prefix errors that occur when writing to the device
Make it easier to locate errors that occur when writing to the device.
2023-01-18 19:36:45 -06:00
Richard Hughes
c647d0d0f6 Parse the DT chassis-type when parsing the FDT 2023-01-18 18:20:35 +00:00
Michal Suchanek
5688191a7b 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>
2023-01-18 10:56:26 -06:00
Mario Limonciello
52d6c3cb78 Update documentation to indicate that loading "OS Optimized Defaults"
may enable security processor rollback protection on Lenovo systems.

fixes: #5394
2023-01-18 08:08:16 +00:00
Richard Hughes
eb30233b35 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.
2023-01-18 07:59:45 +00:00
Richard Hughes
2b0f92506b 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.

    [aspeed,ast2500]
2023-01-18 07:04:44 +00:00
Richard Hughes
72f5c1e01e trivial: Make the installed-tests redfish.conf secure to avoid a warning
Also, don't attempt to change the permissions if the correct one is already
set.
2023-01-17 19:29:39 +00:00
Mario Limonciello
450c3be909 trivial: update supported cpu documentation to add more info for AMD
This should hopefully help disambiguate when information isn't available
what to do.

Fixes: #5415
2023-01-17 13:28:51 -06:00
Vincent Huang
a01b57b17d
synaptics-rmi: add feature to verify signature (#5406) 2023-01-17 09:33:49 +00:00
Richard Hughes
4057edb24b trivial: Add FU_PATH_KIND_SYSFSDIR_DMI for future use 2023-01-16 20:23:28 +00:00
Richard Hughes
0efc1bebce trivial: Add fu_context_get_hwids() for future use 2023-01-16 17:49:57 +00:00
Richard Hughes
2737b05cf8 trivial: Add fu_context_get_smbios() for future use 2023-01-16 17:49:57 +00:00
Richard Hughes
0e381a8666 trivial: Store the chassis kind in the context 2023-01-16 17:49:57 +00:00
Richard Hughes
8af1943142 trivial: Add FuContextHwidFlags for future usage 2023-01-16 17:49:57 +00:00
Richard Hughes
c95355b498 trivial: Add a GError parameter to fu_context_get_smbios_string()
This matches the behaviour of fu_smbios_get_string() and was probably accidental.
2023-01-16 14:05:48 +00:00
Richard Hughes
17156f13d5 trivial: Fix the progress steps when dumping firmware
In most cases the firmware dump is going to take a *lot* longer than the
engine startup.
2023-01-13 15:43:39 +00:00
Richard Hughes
84217074b0 Allow dumping CFI devices using fwupdtool
This regressed with 7dc34ff02e.
2023-01-13 15:43:39 +00:00
Richard Hughes
c10ffb119d trivial: Show a better error when reading am empty CFI flash ID 2023-01-13 15:43:39 +00:00
Richard Hughes
bfeea6e543 trivial: Add CFI data for W25Q256 2023-01-13 15:43:39 +00:00
Jeremy Soller
17f35e206b Add System76 launch_heavy_1 2023-01-12 09:09:12 +00:00
Mario Limonciello
5a24472fb4 Respect user requested paths for ESP even if they aren't volumes
These paths may be used for bind mounts, which we can't accurately
discover. Leave a message in the logs accordingly, but allow these
paths.

fixes: #5185
2023-01-11 16:26:07 +00:00
Richard Hughes
cf4f34572b 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.
2023-01-11 16:25:26 +00:00
Richard Hughes
37a0124b62 trivial: Create the parent directories when using fu_firmware_write_file() 2023-01-11 16:25:26 +00:00
Mario Limonciello
c2a494e871 trivial: install dmi data into installed-tests
fixes: #5402
2023-01-11 07:45:58 -06:00
Richard Hughes
bd306179f2 Fix installing with -Doffline=false 2023-01-10 22:26:52 +00:00
Richard Hughes
91bf84f7a0 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.
2023-01-10 20:43:31 +00:00
Richard Hughes
7cc725b918 vbe: Remove the stored VBE dir
This can be easily retrieved using LOCALSTATEDIR_PKG by the subclass.
2023-01-10 20:40:57 +00:00
Richard Hughes
61c6a11ec3 Do not show a warning when coldplugging an unsupported backend
This also fixes a critical warning about the child progress not being completed.
2023-01-10 20:36:48 +00:00
Richard Hughes
9f3a54488e trivial: Set the backend ID when added
This matches what the plugin does and means there's no critical warning when
adding to the hash table.
2023-01-10 20:34:52 +00:00
Mario Limonciello
e5e6067e22 trivial: fail setup script if dependencies are missing
This makes CI failures more predictable and obvious.
2023-01-10 14:34:40 -06:00
Mario Limonciello
ced9e0c934 trivial: drop docs from abi job
It's built with features=disabled, no need to include it.
2023-01-10 14:34:40 -06:00
Mario Limonciello
17d92d96be trivial: clarify documentation on PSP security processor (Fixes: #5394) 2023-01-10 12:33:05 -06:00
Vincent Huang
8d365e84de synaptics-rmi: add support to write signature 2023-01-10 14:59:11 +00:00
Richard Hughes
b1ea3fab8c dfu: Add some wisdom for vendors implementing devices 2023-01-10 14:58:57 +00:00
Richard Hughes
058dc2301a Include the plugin README text in the generated docs 2023-01-10 14:58:30 +00:00
Richard Hughes
2c20ade1db 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.
2023-01-09 15:39:36 +00:00
Richard Hughes
1ca3cdd4d9 Add a pefile firmware parser
This will eventually allow us to reconstruct a SBoM using a UEFI file volume.

This can be used like this `fwupdtool firmware-parse efi/fwupdx64.efi pefile`
to produce:

    <firmware gtype="FuPefileFirmware">
      <data size="0xef59">MZ.</data>
      <firmware>
        <id>.text</id>
        <offset>0x2d0</offset>
        <size>0x7bab</size>
        <data size="0x7bab">H...QRH.=....H.5</data>
      </firmware>
      ...
      <firmware gtype="FuCoswidFirmware">
        <id>fwupd-efi:fwupdx64</id>
        <idx>0x7</idx>
        <version>1.4</version>
        <offset>0xc4e0</offset>
        <size>0xce</size>
        <data size="0xce">..een-US</data>
        <version_scheme>semver</version_scheme>
        <product>fwupdx64</product>
        <summary>EFI helpers to install system firmware</summary>
        <colloquial_version>1.3-7-g881a508</colloquial_version>
        <link>
          <href>https://spdx.org/licenses/LGPL-2.0.html</href>
          <rel>license</rel>
        </link>
        <entity>
          <name>Richard Hughes</name>
          <regid>hughsie.com</regid>
          <role>maintainer</role>
          <role>tag-creator</role>
        </entity>
      </firmware>
    </firmware>
2023-01-06 17:32:59 +00:00
Richard Hughes
10e8f0559b Always search for uSWID data in the image 2023-01-06 14:23:13 +00:00
Vincent Huang
1ef407968e synaptics-rmi: add support to more firmware partitions 2023-01-06 11:45:55 +00:00
Sean Rhodes
d83007e1c8
plugins/flashrom: Allow 32MiB images for the StarBook Mk VI (#5383)
Also allow 32MiB images for the coreboot firmware

Signed-off-by: Sean Rhodes <sean@starlabs.systems>

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
2023-01-06 10:12:36 +00:00
Vincent Huang
716a98e70a synaptics-rmi: add support to USBHID devices 2023-01-06 07:55:02 +00:00
Ivan Mikhanchuk
ed6011fc4d modem-manager: add quirk for Quectel RM520 modem
Quectel RM520 is based on Qualcomm SDX6x chipset and requires different
firehose programmer file.
2023-01-05 17:39:13 +00:00
Ivan Mikhanchuk
d1fc1d1f93 modem-manager: add firehose prog name quirk
Adds FirehoseProgFile quirk to determine the correct filename for the
firehose prog depending on the device VID:PID.
2023-01-05 17:39:13 +00:00
Sean Rhodes
b20737fe4a plugins/flashrom: Allow 32MiB images for the StarBook Mk VI
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
2023-01-05 14:57:58 +00:00
Mario Limonciello
c939db9296 trivial: skip self tests that fail with G_IO_ERROR_NOT_DIRECTORY
fixes: #5370
2023-01-05 09:20:35 +00:00