puzzleos / stubby

UEFI bootloader stub
GNU Lesser General Public License v2.1
12 stars 8 forks source link

use virt-firmware to write nvram boot in test/harness rather than 'bcfg' #31

Open smoser opened 1 year ago

smoser commented 1 year ago

The way 'nvram' (boot entries written to nvram) based booting works as seen in STARTUP_NSH_NVRAM is:

  1. write a 'boot.opts' file to esp
  2. boot into a startup.nsh script
  3. use bootcfg to add a boot entry to nvram with '-opt' boot.opts
  4. move startup.nsh out of the way
  5. reboot

the path works, but it is both slow (due to reboot) and somewhat convoluted.

We should be able to use virt-firmware-vars to modify the ovmf-vars.fd to have the given boot entry on first power on.