Linux kernel exposes EFI variables data to userspace via 2 interfaces:
- old sysfs-efivars interface (CONFIG_EFI_VARS), populated at 
/sys/firmware/efi/vars,
1024 byte maximum per-variable data size limitation, no UEFI Secure Boot 
variables support
and not recommended anymore.
- new efivarfs interface (CONFIG_EFIVAR_FS), typically mounted like this:
mount -t efivarfs efivarfs /sys/firmware/efi/efivar
It was added in 3.8 intended as a replacement for the sysfs-efivars interface,
has no maximum per-variable size limitation and supports UEFI Secure Boot 
variables.
It also allows creating new vars easily, a very useful trick:
printf "\x07\x00\x00\x00\x00" > 
/sys/firmware/efi/efivar/myvar-12345678-1234-1234-1234-123456789abc

I find CONFIG_EFIVAR_FS very useful for EFI images and I'd like to have it
enabled by default. For example with gummiboot you can use the
LoaderEntryOneShot to tell it the entry identifier to select at the next
and only the next bootup, and I plan to use that in automated testing.

They both can co-exist - but they shouldn't both be
active / mounted (the problem isn't the mount point but data
inconsistency) so we enable them as modules and have the new one as the
default and the old one around for anyone that needs it.

Signed-off-by: Stefan Stanacar <stefanx.stana...@intel.com>
---
 meta/cfg/kernel-cache/cfg/efi-ext.cfg | 2 +-
 meta/cfg/kernel-cache/cfg/efi.cfg     | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/cfg/kernel-cache/cfg/efi-ext.cfg 
b/meta/cfg/kernel-cache/cfg/efi-ext.cfg
index 6371da2..9569788 100644
--- a/meta/cfg/kernel-cache/cfg/efi-ext.cfg
+++ b/meta/cfg/kernel-cache/cfg/efi-ext.cfg
@@ -10,5 +10,5 @@ CONFIG_PARTITION_ADVANCED=y
 # Add support for optional EFI features
 CONFIG_FRAMEBUFFER_CONSOLE=y
 CONFIG_FB_EFI=y
-CONFIG_EFI_VARS=y
+CONFIG_EFI_VARS=m
 CONFIG_EFI_PARTITION=y
diff --git a/meta/cfg/kernel-cache/cfg/efi.cfg 
b/meta/cfg/kernel-cache/cfg/efi.cfg
index e2ecc18..33753cc 100644
--- a/meta/cfg/kernel-cache/cfg/efi.cfg
+++ b/meta/cfg/kernel-cache/cfg/efi.cfg
@@ -7,3 +7,4 @@ CONFIG_ACPI=y
 # Enable basic EFI support
 CONFIG_EFI=y
 CONFIG_EFI_STUB=y
+CONFIG_EFIVAR_FS=m
-- 
1.8.5.3

-- 
_______________________________________________
linux-yocto mailing list
linux-yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto

Reply via email to