aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBalint Matyi <Balint.Matyi@arm.com>2020-06-09 14:03:47 +0100
committerDavid Vincze <david.vincze@linaro.org>2020-06-24 14:27:49 +0200
commitf0873cd2598c3aab09bbcbd90e153b8444965bdb (patch)
tree845ac03df807b01b544cb66c0d37a7d6d552f63c
parent67090ea05962937f130f2d082dec67febacc18be (diff)
downloadtrusted-firmware-m-f0873cd2598c3aab09bbcbd90e153b8444965bdb.tar.gz
Boot: Set the default MCUBoot repo to 'UPSTREAM'
Replace the TF-M default bootloader from the TF-M's version of MCUBoot to the original MCUboot project. The fork is intended to be removed in the future. Signed-off-by: Balint Matyi <Balint.Matyi@arm.com> Change-Id: I9c7c55ed6490712f1b24d4f4eb79db4bdbb23b83
-rw-r--r--bl2/ext/mcuboot/MCUBootConfig.cmake10
-rw-r--r--docs/getting_started/tfm_secure_boot.rst35
2 files changed, 26 insertions, 19 deletions
diff --git a/bl2/ext/mcuboot/MCUBootConfig.cmake b/bl2/ext/mcuboot/MCUBootConfig.cmake
index 06a828b37..ef4246e6a 100644
--- a/bl2/ext/mcuboot/MCUBootConfig.cmake
+++ b/bl2/ext/mcuboot/MCUBootConfig.cmake
@@ -13,7 +13,7 @@ set(BL2 True CACHE BOOL "Configure TF-M to use BL2 and enable building BL2")
if (BL2)
add_definitions(-DBL2)
- set(MCUBOOT_REPO "TF-M" CACHE STRING "Configure which repository use the MCUBoot from")
+ set(MCUBOOT_REPO "UPSTREAM" CACHE STRING "Configure which repository use the MCUBoot from")
set_property(CACHE MCUBOOT_REPO PROPERTY STRINGS "TF-M;UPSTREAM")
validate_cache_value(MCUBOOT_REPO)
@@ -29,6 +29,14 @@ if (BL2)
set_property(CACHE MCUBOOT_SIGNATURE_TYPE PROPERTY STRINGS "RSA-3072;RSA-2048")
validate_cache_value(MCUBOOT_SIGNATURE_TYPE)
+ #FixMe: These checks can be removed when the upgrade strategies in question are upstreamed to the original MCUBoot repo.
+ if (TARGET_PLATFORM STREQUAL "MUSCA_A" OR TARGET_PLATFORM STREQUAL "AN524")
+ if (MCUBOOT_REPO STREQUAL "UPSTREAM")
+ message(WARNING "The 'UPSTREAM' MCUBoot repository cannot be used when building for ${TARGET_PLATFORM}. Your choice was overridden.")
+ endif()
+ set(MCUBOOT_REPO "TF-M")
+ endif()
+
if (MCUBOOT_REPO STREQUAL "TF-M")
set(MCUBOOT_HW_KEY On CACHE BOOL "Configure to use HW key for image verification. Otherwise key is embedded in MCUBoot image.")
else() #Using upstream MCUBoot
diff --git a/docs/getting_started/tfm_secure_boot.rst b/docs/getting_started/tfm_secure_boot.rst
index 39e314608..041da901c 100644
--- a/docs/getting_started/tfm_secure_boot.rst
+++ b/docs/getting_started/tfm_secure_boot.rst
@@ -273,26 +273,25 @@ modes are supported by which platforms:
``MCUBOOT_UPGRADE_STRATEGY`` configuration variable in the build
configuration file, or include this macro definition in the command line
-**************************
-Using the original MCUBoot
-**************************
-The original MCUBoot from `GitHub <https://github.com/JuulLabs-OSS/mcuboot>`__
-can also be used as the bootloader in TF-M. However please note that the
-original MCUBoot doesn't support the ``No-swap`` and ``RAM loading`` upgrade
-strategies, therefore those platforms that doesn't support other upgrade
-strategies (e.g. ``Overwrite``) cannot be used with the original MCUBoot at the
-moment.
-
-To use the upstream MCUBoot it must be cloned into the TF-M base folder
-first (into which the TF-M was cloned previously). After the original MCUBoot
-code is present at the required location the ``MCUBOOT_REPO=UPSTREAM`` option
-must be added to the command line at the CMake configuration step::
+*******
+MCUBoot
+*******
+By default, the original MCUBoot from
+`GitHub <https://github.com/JuulLabs-OSS/mcuboot>`__ is used as the bootloader
+in TF-M. The repository must be cloned into the base folder (into which TF-M
+was cloned previously).::
cd <TF-M base folder>
- git clone https://github.com/JuulLabs-OSS/mcuboot.git -b v1.5.0
+ git clone https://github.com/JuulLabs-OSS/mcuboot.git -b v1.6.0
cd <TF-M build folder>
cmake -G"Unix Makefiles" -DTARGET_PLATFORM=AN521 -DCOMPILER=ARMCLANG -DMCUBOOT_REPO=UPSTREAM ../
+However, please note that it doesn't support the ``No-swap`` and ``RAM loading``
+upgrade strategies, therefore the platforms that don't support other upgrade
+strategies (e.g. ``Overwrite``) cannot be used with the original MCUBoot at the
+moment. To use the TF-M project's fork, the ``MCUBOOT_REPO=TF-M`` option
+must be added to the command line at the CMake configuration step.
+
*******************
Multiple image boot
*******************
@@ -362,12 +361,12 @@ Compile time switches:
- **False:** TF-M built without bootloader. Secure image linked to the
beginning of the device memory and executed after reset. If it is false
then using any of the further compile time switches is invalid.
-- MCUBOOT_REPO (default: "TF-M"):
+- MCUBOOT_REPO (default: "UPSTREAM"):
- **"TF-M":** Use TF-M's MCUBoot fork as bootloader which is located in the
bl2/ext/mcuboot folder.
- **"UPSTREAM":** Use the original (upstream) MCUBoot as bootloader. Before
- selecting this option please read the `Using the original MCUBoot`_
- section for more information and the limitations of using this option.
+ selecting this option please read the `MCUBoot`_ section for more
+ information and the limitations of using this option.
- MCUBOOT_UPGRADE_STRATEGY (default: "OVERWRITE_ONLY"):
- **"OVERWRITE_ONLY":** Default firmware upgrade operation with overwrite.
- **"SWAP":** Activate swapping firmware upgrade operation.