Delete unused EFI variables when deploying firmware

Unconditionally delete FWUPDATE_VERBOSE and FWUPDATE_DEBUG_LOG when deploying
the update using fwupdtool or fwupd and leave it to fwupdate.

If you want to debug the efi binary you then have to use fwupdate and squirt
the .cap file rather than using all the other layers.
This commit is contained in:
Richard Hughes 2020-10-26 16:54:28 +00:00
parent 6d257cbe7f
commit ded5410f6d

View File

@ -571,6 +571,10 @@ fu_uefi_device_write_firmware (FuDevice *device,
if (!fu_common_set_contents_bytes (fn, fixed_fw, error))
return FALSE;
/* delete the logs to save space; use fwupdate to debug the EFI binary */
fu_efivar_delete (FU_EFIVAR_GUID_FWUPDATE, "FWUPDATE_VERBOSE", NULL);
fu_efivar_delete (FU_EFIVAR_GUID_FWUPDATE, "FWUPDATE_DEBUG_LOG", NULL);
/* set the blob header shared with fwupd.efi */
if (!fu_uefi_device_write_update_info (self, fn, varname, self->fw_class, error))
return FALSE;