Richard Hughes
7a224007f2
Add support for Flat Image Tree aka FIT firmware
2022-07-08 14:05:20 +01:00
Richard Hughes
f3755ef708
Add support for Flattened Devicetree aka FDT firmware
2022-07-08 14:05:20 +01:00
Richard Hughes
57a1270bad
Add fu_firmware_get_parent() for future use
...
Some firmware stacks images hierarchically, and it's useful to be able
to get the parent when unrolling them out into a linear format.
2022-07-05 16:47:18 +01:00
Richard Hughes
e6fee15d3c
Skip uSWID self tests when compiled without cbor support ( #4800 )
...
Fixes https://github.com/fwupd/fwupd/issues/4791
2022-07-05 10:20:46 +00:00
Richard Hughes
de31992522
trivial: Fix a tiny memory leak in the self tests
2022-07-01 13:57:18 +01:00
Richard Hughes
91cb4e7274
trivial: Relax some timings a little to fix running valgrind
2022-07-01 13:57:18 +01:00
Richard Hughes
726d20e498
Ensure more firmware formats can round-trip to and from XML
...
This greatly improves the coverage stats too.
2022-07-01 13:57:18 +01:00
Richard Hughes
96b423e04f
Add support for IFWI Intel Flash Program Tool (aka FPT) firmware
2022-06-28 10:09:58 +01:00
Richard Hughes
0a7eb03704
Add a linear firmware wrapper
...
This allows us to parse any concatenated firmware format where the
image size is stored in the image.
2022-06-28 10:09:58 +01:00
Richard Hughes
08c7172168
Add support for parsing OptionROM firmware
2022-06-28 10:09:58 +01:00
Richard Hughes
f1542c3f9f
Add support for IFWI Intel Code Partition (aka CPD) firmware
2022-06-28 10:09:58 +01:00
Richard Hughes
cf9ebdb703
Add startup profiling functionality
...
Using `sudo FWUPD_PROFILE=10 ./src/fwupd --verbose` will print a
dump of startup times onto the console so that we can debug which
plugin is slowing down system startup. For example:
../src/fu-engine.c:5409:plugins-coldplug [108.55ms]:
../plugins/amt/fu-plugin-amt.c:437:amt [27.14ms]:
:create-context [12.66ms]
:get-version [8.44ms]
:add-device [3.95ms]
2022-06-14 22:08:02 +01:00
Richard Hughes
30aab6f564
Copy the instance ID strings when incorporating
...
Also, add a test.
2022-06-14 21:01:57 +01:00
Richard Hughes
d4d0ba0faf
Unexport fu_common_cab_build_silo()
...
There's no reason this needs to be in the shared library.
2022-06-14 14:36:52 -05:00
Richard Hughes
3eaa907534
Remove the now unnecessary fu_smbios_to_string()
2022-06-14 14:36:52 -05:00
Richard Hughes
fc2da47b69
Remove fu_strtoull_full()
2022-06-14 14:36:52 -05:00
Richard Hughes
4105768a01
Remove the 'common' prefix when parsing version numbers
2022-06-14 14:36:52 -05:00
Richard Hughes
3e0a4dc1c3
Be smarter and include less header files per source file
2022-06-14 14:36:52 -05:00
Richard Hughes
7f86ffab6f
Split out the dump helpers to a new source file
2022-06-14 14:36:52 -05:00
Richard Hughes
72ca59653e
Unexport fu_common_uri_get_scheme()
...
We don't want plugins to be using this.
2022-06-14 14:36:52 -05:00
Richard Hughes
2c5e4ff3ab
Unexport fu_common_firmware_builder()
...
We don't want plugins to be using this.
2022-06-14 14:36:52 -05:00
Richard Hughes
3f77af3cd4
Split out the kernel helpers to a new source file
2022-06-14 14:36:52 -05:00
Richard Hughes
fd9b9db5b3
Unexport fu_common_instance_id_strsafe()
...
We want plugins to use the instance ID builder instead now.
2022-06-14 14:36:52 -05:00
Richard Hughes
25dccf09f7
Unexport fu_common_spawn_sync()
...
This isn't something we want plugins to use.
2022-06-14 14:36:52 -05:00
Richard Hughes
425fedcca1
trivial: Remove fu_byte_array_set_size_full()
2022-06-14 14:36:52 -05:00
Richard Hughes
ed1b13da28
Split out the memory helpers to a new source file
2022-06-14 14:36:52 -05:00
Richard Hughes
4b1313b406
Split out the GByte helpers to a new source file
2022-06-14 14:36:52 -05:00
Richard Hughes
9d33c29e92
Split out the string helpers to a new source file
2022-06-14 14:36:52 -05:00
Richard Hughes
3fe9c0de34
Split out the CRC and sum functions to new source files
2022-06-14 14:36:52 -05:00
Richard Hughes
9b29d70f31
Add a progress flag to indicate for when the child returns early
...
Using `fu_progress_finished(fu_progress_get_child(progress))` is IMHO
a hacky workaround.
2022-06-14 14:31:19 +01:00
Richard Hughes
e6b487e762
Add FuProgress to ->startup() and ->coldplug()
...
This allows us to profile the daemon startup so we can find any plugins
taking an inordinate amount of time to start.
2022-06-04 20:21:50 +01:00
Richard Hughes
dc91d59f8e
Remove the recently added fu_progress_add_step_full()
...
Just break API instead.
2022-06-03 13:47:11 -05:00
Richard Hughes
4ee6cce9b8
Remove some duplicated unsafe API
2022-06-03 13:47:11 -05:00
Richard Hughes
517dc88f4f
trivial: Fix the win32 CI tests
2022-05-06 13:55:51 +01:00
Richard Hughes
beb49d7ac0
trivial: Add fu_common_read_uint24() helper for future code
2022-04-28 14:18:30 +01:00
Richard Hughes
855ece352d
Check the alignment when reading in raw firmware
2022-04-28 14:15:49 +01:00
Richard Hughes
0b7af7d54b
trivial: Ignore the return value of setenv() in most cases
...
This makes Coverity happy.
2022-04-13 15:08:12 +01:00
Mario Limonciello
3006d238d6
Automatically obsolete negative duplicate attributes
...
To a user there is no point to explicitly showing two failures for
encrypted RAM if the system supports SME and TSME both.
To show them a single failure, de-duplicate the attributes by appstream
ID during depsolve.
If the plugin didn't explicitly set obsoletes and two attributes are both
failures and both share the same appstream ID obsolete one of them.
2022-04-12 11:59:49 -05:00
Richard Hughes
dcd39d80a7
Add the CFI quirks in setup() so the device can be open
2022-03-31 12:47:13 +01:00
Richard Hughes
5817ef3b4f
Emit 0% in FuProgress to show the child has started
...
This prevents showing the 'old' percentage until the first sub-task has
completed for some device firmware updates.
2022-03-29 20:04:26 +01:00
Richard Hughes
6b5d933e99
Do not show unconnected or unreachable devices in the client tools
...
Fixes https://github.com/fwupd/fwupd/issues/4378
2022-03-15 14:08:17 +00:00
Daniel Campello
61226b49f3
fwupdplugin-self-test: fix spawn tests for qemu
...
Wrap the spawned script with an explicit call to the /bin/sh
interpreter needed when running tests in a cross compiled enviroment.
Also increase the timeout for the spawned script to execute to give
enough time for the print to happen in the much slower virtualized
environment.
Change-Id: I71ed377e1bc8db4be4c522cdb9562c1662df7266
2022-03-09 17:32:40 -07:00
Richard Hughes
adfef91731
trivial: Strip leading and trailing spaces from the vendor name
2022-02-24 17:07:44 +00:00
Richard Hughes
308e03a6f4
Sanitize the instance ID parts more carefully
...
The only users of `SERIO\FWID` and `I2C\NAME` are already 'safe' and
the device GUIDs should all be unchanged.
There are no current users of the `MTD\NAME` instance IDs, and these
are the ones that may be more unpredictable and in need of sanity.
2022-02-18 08:23:39 +00:00
Richard Hughes
55bd4862d3
Try harder to convert to a version into a correct semver
...
This is really useful for the flashrom plugin.
2022-02-11 15:28:05 +00:00
Richard Hughes
f966dfe251
Fall back to the Device Tree 'compatible' data as required
...
This allows us to use CHID requirements on the PinePhone, and
potentially other hardware too.
See https://github.com/fwupd/fwupd/discussions/4209
2022-01-24 21:30:15 +00:00
Crag Wang
b728608baa
Show results when calling get-details if failing requirements
2022-01-19 12:10:52 +00:00
Richard Hughes
1ef67c60ca
Only accept GUIDs when calling fu_quirks_lookup_by_id()
...
The only place we were using the instance ID -> GUID conversion was in
the self tests, and assuming the group is always a GUID removes a lot
of checks from a very hot path at startup.
2022-01-12 16:16:52 +00:00
Richard Hughes
f885ab6d2a
Allow patching firmware files at known offsets
...
This allows us to replace the 'dfu-tool replace' with a much more
controlled 'fwupdtool firmware-patch' command that patches at a set of
specific offsets.
Drop in the new functionality into the existing firmware ->write()
vfuncs so that the image headers, footers and/or checksums are correct.
2022-01-05 09:51:45 +00:00
Richard Hughes
e17a107ce1
trivial: Cast the g_signal_connect() object to allow static analysis
...
This is useful when using https://gitlab.freedesktop.org/tartan/tartan
2022-01-03 22:46:23 +00:00