diff options
Diffstat (limited to 'payloads/libpayload/libcbfs/cbfs.c')
-rw-r--r-- | payloads/libpayload/libcbfs/cbfs.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/payloads/libpayload/libcbfs/cbfs.c b/payloads/libpayload/libcbfs/cbfs.c index 3dc19d2e7d..08e312a08d 100644 --- a/payloads/libpayload/libcbfs/cbfs.c +++ b/payloads/libpayload/libcbfs/cbfs.c @@ -8,6 +8,7 @@ #include <commonlib/bsd/cbfs_private.h> #include <commonlib/bsd/fmap_serialized.h> #include <libpayload.h> +#include <lp_vboot.h> #include <lz4.h> #include <lzma.h> #include <string.h> @@ -232,5 +233,9 @@ void *_cbfs_unverified_area_load(const char *area, const char *name, void *buf, policy on using HW crypto. */ __weak bool cbfs_hwcrypto_allowed(void) { - return true; + /* Avoid compiling vboot calls to prevent linker errors. */ + if (!CONFIG(LP_CBFS_VERIFICATION)) + return true; + + return vb2api_hwcrypto_allowed(vboot_get_context()); } |