When testing mokutil we found that import/delete functions don't
work fine without efivarfs.
The efivarfs at /sys/firmware/efi/efivars is a new way to access
the efi-variables and it is better supported by efi tools than the
old way /sys/firmware/efi/vars. So here compile the efivarfs as a
module by default. This won't affect the old way.
Test Plan:
The tests are done with all 3 commits for root/tools/kernel
repos.
PASS: build and install the iso image and boot up with secure boot
enabled, run "sudo mokutil --sb-state", the result is:
"SecureBoot enabled".
PASS: run "sudo mokutil --import example.der";
reboot the target;
select to enroll the key in MOK manager before grub menu starts;
check with "sudo mokutil --list-enrolled" to find the right key
there after system boots up.
PASS: above tests are done for both std and rt installations.
Depends-On: https://review.opendev.org/c/starlingx/tools/+/869533
Partial-Bug: 2002259
Signed-off-by: Li Zhou <li.zhou@windriver.com>
Change-Id: I1cc818717cacd9546e3045840398589a84192d7d