EFI Variables

Emmanuel Vadot manu at bidouilliste.com
Tue Oct 27 18:31:07 UTC 2015


  Hello all,

  I'm currently hacking around the loader.efi

  I've added the possibility to change background/foreground colors (not 
very useful I know).

  I've also added the list and get command to the not working "nvram" 
command.

  CUrrently the variables are printed in the form "${var}-${guid}" 
(Result of a nvram list command : 
https://pbs.twimg.com/media/CSVxdzMW0AEEVo4.jpg)
  The "get" subcommand print the content of the variable (passed without 
the guid) as if it is a unicode string even if a variable can contain 
any data possible.

  For the "set" subcommand I think that the best way to handle it is :
  "nvram set myvar data" -> This will set the variable myvar to data with 
the freebsd guid (if there is any)

  and

  "nvram set myvar guid data" -> This will force the guid to <guid>

  I'll look tomorrow how to access efivars once the kernel is booted so 
we can set some from some userland tool (especially the boot related 
one).

  Is any of you guys uses efivars for something not boot-releated ?
  I'm interested in any usage of efi variables.

  You can see my change on my github branch : 
https://github.com/evadot/freebsd/tree/loader_efi

  Cheers,

-- 
Emmanuel Vadot


More information about the freebsd-hackers mailing list