Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Oct 2015 19:24:23 +0100
From:      Emmanuel Vadot <manu@bidouilliste.com>
To:        freebsd-hackers <freebsd-hackers@freebsd.org>
Subject:   EFI Variables
Message-ID:  <6ce779725aab266bc85e92f0ee2186b6@megadrive.org>

next in thread | raw e-mail | index | archive | help

  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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6ce779725aab266bc85e92f0ee2186b6>