aboutsummaryrefslogtreecommitdiff
path: root/bl2
diff options
context:
space:
mode:
authorDavid Vincze <david.vincze@arm.com>2019-12-09 17:41:58 +0100
committerDavid Vincze <david.vincze@arm.com>2020-01-27 14:54:41 +0100
commitead78fb7c1268e38e639eac8b45c11eb4ffbc315 (patch)
treed6fa9d651c7220d8bea888a40fa2a303a47161aa /bl2
parent225c58fc4db1e4455f6a39541f51e1d20a62f6b7 (diff)
downloadtrusted-firmware-m-ead78fb7c1268e38e639eac8b45c11eb4ffbc315.tar.gz
Platform: Rename platform specific MCUBoot macros
The BOOT_MAX_IMG_SECTORS and BOOT_STATUS_MAX_ENTRIES macros in the original MCUBoot code base are defined in bootutil_priv.h. Rename them to avoid redefinition errors when building TF-M with upstream MCUBoot. Change-Id: I2e3ff105077f06bcb2ffafe3a2ac1863ec6e0478 Signed-off-by: David Vincze <david.vincze@arm.com>
Diffstat (limited to 'bl2')
-rw-r--r--bl2/ext/mcuboot/bootutil/src/bootutil_priv.h5
-rw-r--r--bl2/ext/mcuboot/include/target.h10
2 files changed, 9 insertions, 6 deletions
diff --git a/bl2/ext/mcuboot/bootutil/src/bootutil_priv.h b/bl2/ext/mcuboot/bootutil/src/bootutil_priv.h
index a603b01830..4edfcdbd3d 100644
--- a/bl2/ext/mcuboot/bootutil/src/bootutil_priv.h
+++ b/bl2/ext/mcuboot/bootutil/src/bootutil_priv.h
@@ -21,7 +21,7 @@
* Original code taken from mcuboot project at:
* https://github.com/JuulLabs-OSS/mcuboot
* Git SHA of the original version: ac55554059147fff718015be9f4bd3108123f50a
- * Modifications are Copyright (c) 2018-2019 Arm Limited.
+ * Modifications are Copyright (c) 2018-2020 Arm Limited.
*/
#ifndef H_BOOTUTIL_PRIV_
@@ -129,6 +129,8 @@ struct boot_swap_state {
_Static_assert(BOOT_IMAGE_NUMBER > 0, "Invalid value for BOOT_IMAGE_NUMBER");
+#define BOOT_MAX_IMG_SECTORS MCUBOOT_MAX_IMG_SECTORS
+
/*
* Extract the swap type and image number from image trailers's swap_info
* field.
@@ -166,6 +168,7 @@ _Static_assert(BOOT_IMAGE_NUMBER > 0, "Invalid value for BOOT_IMAGE_NUMBER");
/** Maximum number of image sectors supported by the bootloader. */
#define BOOT_STATUS_STATE_COUNT 3
+#define BOOT_STATUS_MAX_ENTRIES MCUBOOT_STATUS_MAX_ENTRIES
#define BOOT_PRIMARY_SLOT 0
#define BOOT_SECONDARY_SLOT 1
diff --git a/bl2/ext/mcuboot/include/target.h b/bl2/ext/mcuboot/include/target.h
index 68f1190e4d..a812df6476 100644
--- a/bl2/ext/mcuboot/include/target.h
+++ b/bl2/ext/mcuboot/include/target.h
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2017, Linaro Ltd
- * Copyright (c) 2018-2019, Arm Limited.
+ * Copyright (c) 2018-2020, Arm Limited.
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -85,12 +85,12 @@ defined by the target"
#error "BL2 supports CMSIS flash interface and device name must be specified"
#endif
-#ifndef BOOT_STATUS_MAX_ENTRIES
-#error "BOOT_STATUS_MAX_ENTRIES must be defined by the target"
+#ifndef MCUBOOT_STATUS_MAX_ENTRIES
+#error "MCUBOOT_STATUS_MAX_ENTRIES must be defined by the target"
#endif
-#ifndef BOOT_MAX_IMG_SECTORS
-#error "BOOT_MAX_IMG_SECTORS must be defined by the target"
+#ifndef MCUBOOT_MAX_IMG_SECTORS
+#error "MCUBOOT_MAX_IMG_SECTORS must be defined by the target"
#endif
#endif /* H_TARGETS_TARGET_ */