fwts: Enable optional efi_runtime kernel module build
authorSumit Garg <sumit.garg@linaro.org>
Mon, 5 Nov 2018 12:03:24 +0000 (17:33 +0530)
committerPeter Korsgaard <peter@korsgaard.com>
Wed, 7 Nov 2018 22:16:27 +0000 (23:16 +0100)
Firmware test suite does provides efi_runtime kernel module required
to run UEFI tests. So optionally enable this module build.

[Peter: fix -/_ in comment as suggested by Erico]
Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/fwts/Config.in
package/fwts/fwts.mk

index 959d871a72c49747653ce34c34d7e88cb0a4681d..269f065fd50e2748451ab0ec2ebcd59b20734f69 100644 (file)
@@ -21,6 +21,18 @@ config BR2_PACKAGE_FWTS
 
          https://wiki.ubuntu.com/FirmwareTestSuite
 
+if BR2_PACKAGE_FWTS
+config BR2_PACKAGE_FWTS_EFI_RUNTIME_MODULE
+       bool "efi_runtime module"
+       depends on BR2_LINUX_KERNEL
+       help
+         Firmware Test Suite (FWTS) provides a EFI runtime kernel
+         module required to run UEFI tests.
+
+comment "efi_runtime module needs a Linux kernel to be built"
+       depends on !BR2_LINUX_KERNEL
+endif
+
 comment "fwts needs a glibc toolchain w/ wchar, threads"
        depends on BR2_i386 || BR2_x86_64 || BR2_aarch64
        depends on BR2_PACKAGE_LIBBSD_ARCH_SUPPORTS # libbsd
index 15f0afcce36e6c0d4f5b9e6432cc4066a410ada1..aa006f3b8bbafd6231993760ffab32159c84fd13 100644 (file)
@@ -13,4 +13,9 @@ FWTS_AUTORECONF = YES
 FWTS_DEPENDENCIES = host-bison host-flex host-pkgconf json-c libglib2 libbsd \
        $(if $(BR2_PACKAGE_DTC),dtc)
 
+ifdef BR2_PACKAGE_FWTS_EFI_RUNTIME_MODULE
+FWTS_MODULE_SUBDIRS = efi_runtime
+$(eval $(kernel-module))
+endif
+
 $(eval $(autotools-package))