From 6c01c0c13a5d8b65084ba923a80e5c4fda0bcf49 Mon Sep 17 00:00:00 2001 From: Lyle Zhu Date: Thu, 16 May 2024 10:34:05 +0800 Subject: [PATCH] module: hal_nxp: bt_controller: Verify if Blob is valid Use zephyr_blobs_verify to check the blob file is valid or not. The function zephyr_blobs_verify will check if the file exists. And it checks if the file is valid. Signed-off-by: Lyle Zhu --- modules/hal_nxp/bt_controller/CMakeLists.txt | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/modules/hal_nxp/bt_controller/CMakeLists.txt b/modules/hal_nxp/bt_controller/CMakeLists.txt index a0a79cdcb03..af3678364d3 100644 --- a/modules/hal_nxp/bt_controller/CMakeLists.txt +++ b/modules/hal_nxp/bt_controller/CMakeLists.txt @@ -16,8 +16,6 @@ if (NOT DEFINED blob_file) message(FATAL_ERROR "Unsupported controller. Please select a BT conntroller, refer to ./driver/bluetooth/hci/Kconfig.nxp") endif() -if(EXISTS ${blob_file}) - configure_file(${blob_file} ${blob_gen_file} COPYONLY) -else() - message(FATAL_ERROR "Can't find controller firmware, please fetch blobs by using command: \'west blobs fetch hal_nxp\'") -endif() +zephyr_blobs_verify(FILES ${blob_file} REQUIRED) + +configure_file(${blob_file} ${blob_gen_file} COPYONLY)