Boot: Use the same flash_map module as upstream MCUBoot
Add new sysflash.h and flash_map_extended.h files as they are needed to
build TF-M with the original MCUBoot. Some of the macro definitions and
function declarations from flash_map.h were moved into these
new headers.
Change-Id: I9b5ddeba9528c82c7ccfc59fbba5c661f0ad1084
Signed-off-by: David Vincze <david.vincze@arm.com>
diff --git a/bl2/src/boot_record.c b/bl2/src/boot_record.c
index 7585251..2c6146a 100644
--- a/bl2/src/boot_record.c
+++ b/bl2/src/boot_record.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018-2019, Arm Limited. All rights reserved.
+ * Copyright (c) 2018-2020, Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*
@@ -10,9 +10,9 @@
#include "tfm_boot_status.h"
#include "target.h"
#include "../ext/mcuboot/bootutil/src/bootutil_priv.h"
-#include "../ext/mcuboot/bootutil/include/bootutil/image.h"
-#include "../ext/mcuboot/bootutil/include/bootutil/sha256.h"
-#include "../ext/mcuboot/include/flash_map/flash_map.h"
+#include "bootutil/image.h"
+#include "bootutil/sha256.h"
+#include "flash_map/flash_map.h"
#include <stdint.h>
#include <string.h>
#include <stdio.h>
diff --git a/bl2/src/flash_map.c b/bl2/src/flash_map.c
index 1b0f20b..72e7ca1 100644
--- a/bl2/src/flash_map.c
+++ b/bl2/src/flash_map.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019, Arm Limited. All rights reserved.
+ * Copyright (c) 2019-2020, Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*
@@ -9,6 +9,7 @@
#include "target.h"
#include "bl2_util.h"
#include "flash_map/flash_map.h"
+#include "flash_map_backend/flash_map_backend.h"
#include "bootutil/bootutil_log.h"
#include "Driver_Flash.h"