Boot: Make MCUBoot logging optional
Add new MCUBOOT_LOG_LEVEL CMake variable to the MCUBoot configuration.
In a debug build the MCUBoot logging can be set to several levels.
The logging can also be entirely disabled and thus the code size can be
reduced. In case of a release build the value of MCUBOOT_LOG_LEVEL is
overridden and the logging is disabled in MCUBoot.
Change-Id: I55ad8f85fdd0921f07a9c156858fadecf81a7449
Signed-off-by: David Vincze <david.vincze@arm.com>
diff --git a/bl2/ext/mcuboot/bootutil/src/loader.c b/bl2/ext/mcuboot/bootutil/src/loader.c
index a24e332..3e0ba90 100644
--- a/bl2/ext/mcuboot/bootutil/src/loader.c
+++ b/bl2/ext/mcuboot/bootutil/src/loader.c
@@ -39,13 +39,11 @@
#include "bootutil/bootutil.h"
#include "bootutil/image.h"
#include "bootutil_priv.h"
+#include "bootutil/bootutil_log.h"
#include "bl2/include/tfm_boot_status.h"
#include "bl2/include/boot_record.h"
#include "security_cnt.h"
-#define BOOT_LOG_LEVEL BOOT_LOG_LEVEL_INFO
-#include "bootutil/bootutil_log.h"
-
static struct boot_loader_state boot_data;
uint8_t current_image = 0;