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 <lyle.zhu@nxp.com>
This commit is contained in:
Lyle Zhu 2024-05-16 10:34:05 +08:00 committed by Anas Nashif
parent 35204de197
commit 6c01c0c13a

View file

@ -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)