Now incorporate is fixed to copy across the properties we need in the
superclass, we don't need to do the subclass ->probe().
Note, we still need to do the subclassed ->probe() when using
FU_UDEV_DEVICE_FLAG_VENDOR_FROM_PARENT or when looking at properties
on the parent device.
This also removes the spurious 'already set GType to FuVliUsbhubDevice,
ignoring FuVliUsbhubDevice' messages when running the daemon.
This avoids possible reading IFD multiple times and fixes a memory leak
of layout on errors and an unconditional leak in
fu_flashrom_device_prepare(), which didn't call
flashrom_layout_release().
Notice that flashrom_layout_set() call does NOT transfer ownership.
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Created only if intel_spi plugin indicates that the region exists by
creating its own device for it.
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Some plugins were creating local versions (which were not attached to
the daemon progress in any way) as a workaround as they needed to do
actions that took a long time to complete.
Flashrom is primarily used with coreboot, which has a pair version number
currently 4.16. As such, chance the default to pair so that fewer quirks
are required.
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
* HwId for StarLite Mk IV
* coreboot GUID for StarLite Mk IV
* HwId for StarLite Mk II (under coreboot)
* coreboot GUID for StarLite Mk II
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
For a while we flirted with the idea of updating non-internal
libflashrom-derived devices but the impedance mismatch was just too
great.
We removed the extra unused subclasses of FuFlashromDevice, but never
removed the indirection we added for the writing.
Remove the unused code now that we agree on the longer term plan.
Add FirmwareSizeMax = 0x800000 for StarLite Mk II and Mk III to allow
switching from AMI to coreboot firmware.
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
tristate features will automatically disable if dependencies marked
as required are missing.
Packagers can manually override using `auto_features`.
Link: https://mesonbuild.com/Build-options.html#features
Add a quirk for NovaCustom NV4x devices.
These laptops are running coreboot and are updatable using flashrom.
The HwId GUID matches to both previous Insyde firmware and the current
Dasharo firmware. The Dasharo GUID matches to the devices running
Dasharo firmware. This way the device can be switched from Insyde
to Dasharo using `fwupdmgr switch-branch`.
Homepage: https://configurelaptop.eu/nv40-series/
Signed-off-by: Michał Kopeć <michal.kopec@3mdeb.com>
At the moment a lot of the failures are only visible when running the
daemon in verbose mode, and the inhibit functionalit provides us a way
to unset FWUPD_DEVICE_FLAG_UPDATABLE from multiple places, as well as
setting the update error for the user to see why.
We were calling g_module_symbol() 2703 times, which is actually more
expensive than you'd think.
It also means the plugins are actually what we tell people they are:
A set of vfuncs that get run. The reality before that they were dlsym'd
functions that get called at pretty random times.
Resetting the CMOS before a write when switching branch will cause a lock on\
reboot which requires hard power off.
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
It's actually quite hard to build a front-end for fwupd at the moment
as you're never sure when the progress bar is going to zip back to 0%
and start all over again. Some plugins go 0..100% for write, others
go 0..100% for erase, then again for write, then *again* for verify.
By creating a helper object we can easily split up the progress of the
specific task, e.g. write_firmware().
We can encode at the plugin level "the erase takes 50% of the time, the
write takes 40% and the read takes 10%". This means we can have a
progressbar which goes up just once at a consistent speed.
Reset the CMOS based on a private flag. Tested on coreboot using an
offset of 123. Required when a CMOS layout or default option has
changed as the resulting flash will have 0's for the modified option.
As we are only writing to the BIOS region, we only need to backup the BIOS
region. The will avoid the error "failed to back up original firmware" if
regions such as the ME can't be read.