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.
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.
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>
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.
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]
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
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.
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.
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.
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>
Also allow 32MiB images for the coreboot firmware
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Signed-off-by: Sean Rhodes <sean@starlabs.systems>