balena-os / leviathan-worker

The worker layer for Leviathan including worker plugins QemuKit & AutoKit
Apache License 2.0
6 stars 4 forks source link

qemu: erase firmware vars on flash #65

Closed jakogut closed 1 year ago

jakogut commented 1 year ago

Guests may write persistent variables to firmware in cases such as changing the boot order or configuring secure boot keys. These variables are backed by a file configured as part of pflash, typically shipped with edk2.

When reflashing, variables may need to be reset, or previous configuration may stop the flashing process, such as secure boot rejecting the signature of the flasher's bootloader.

Copy the edk2 vars file from the usr directory to a runtime location, allowing the flash method to reset this backing file.

Change-type: patch

alexgg commented 1 year ago

lgtm