efivarfs: Add support to run the kernel efivarfs tests

This recipe builds the efivarfs selftests. These tests check that files
can be created, deleted and modified in a efivarfs mount and that it is
not possible to create files with bogus filenames, etc.

Signed-off-by: Rakesh Seethamsetty <rakesh.seethamsetty@intel.com>
[ Expanded on commit log ]
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
core-image-efi-initramfs: Include the efivarfs-test package

Signed-off-by: Rakesh Seethamsetty <rakesh.seethamsetty@intel.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
efivarfs: Ensure we build using target compiler

If we don't set ${CROSS_COMPILE} when building the efivarfs tests then
it will default to using the host's compiler, not the compiler for the
target. This results in the tests being unable to run on the target.

Use ${TARGET_PREFIX} to set ${CROSS_COMPILE} so that the efivarfs
Makefile will pickup the correct compiler.

Also, instead of building all the selftests limit the build to just the
efivarfs/ directory.

Signed-off-by: Matt Fleming <matt.fleming@intel.com>
base-files: Customize fstab

We need to provide our own copy of fstab which mounts efivarfs at
/sys/firmware/efi/efivars as the efivarfs tests require it.

Signed-off-by: Matt Fleming <matt.fleming@intel.com>
efivarfs: Enable automatic test execution

Inherit luv-test.bbclass which will automatically run the efivarfs tests
when booting.

The efivarfs selftests are not easily executed out of the box and it was
necessary to create a /usr/bin/efivarfs script, which is basically just
a wrapper that invokes the tests from within /usr/share/efivarfs-test.

Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Merge pull request #1 from 01org/rs/efivarfs

Rs/efivarfs