diff options
-rw-r--r-- | Makefile | 29 | ||||
-rw-r--r-- | docs/user-guide.md | 9 | ||||
-rw-r--r-- | fwu/ns_bl1u/ns_bl1u.mk | 10 | ||||
-rw-r--r-- | fwu/ns_bl2u/ns_bl2u.mk | 9 | ||||
-rw-r--r-- | plat/armstrong/platform.mk | 5 | ||||
-rw-r--r-- | plat/ashbrook/platform.mk | 5 | ||||
-rw-r--r-- | plat/fvp/platform.mk | 3 | ||||
-rw-r--r-- | plat/juno/platform.mk | 3 |
8 files changed, 40 insertions, 33 deletions
@@ -54,7 +54,8 @@ USE_NVM := 1 # Whether a new test session should be started every time or whether the # framework should try to resume a previous one if it was interrupted NEW_TEST_SESSION := 1 -# Flag to enable Firmware Update images +# Whether the Firmware Update images (i.e. NS_BL1U and NS_BL2U images) should be +# built. The platform makefile is free to override this value. FIRMWARE_UPDATE := 0 # Flag to enable test cases and/or helper functions in NS_BL1U and NS_BL2U images FWU_BL_TEST := 0 @@ -184,15 +185,12 @@ $(eval $(call assert_boolean,FWU_BL_TEST)) $(eval $(call add_define,FWU_BL_TEST)) ifeq (${FIRMWARE_UPDATE},1) - # Check that the USE_NVM flag is enabled - ifneq (${USE_NVM},1) - $(error "Firmware Update requires use of NVM, build with USE_NVM=1") - endif - include fwu/ns_bl1u/ns_bl1u.mk NS_BL1U_SOURCES += ${PLAT_SOURCES} + include fwu/ns_bl2u/ns_bl2u.mk NS_BL2U_SOURCES += ${PLAT_SOURCES} + # Process PLAT flag $(eval $(call add_define,PLAT_${PLAT})) endif @@ -272,13 +270,9 @@ BUILD_TARGETS := all tftf ifeq (${FIRMWARE_UPDATE},1) BUILD_TARGETS += ns_bl1u ns_bl2u else -ns_bl1u: - @echo "ERROR: ns_bl1u target requires support for Firmware Update" - @echo "ERROR: Please define FIRMWARE_UPDATE=1" - @exit 1 -ns_bl2u: - @echo "ERROR: ns_bl2u target requires support for Firmware Update" - @echo "ERROR: Please define FIRMWARE_UPDATE=1" +ns_bl1u ns_bl2u: + @echo "ERROR: Can't build $@ because Firmware Update is not supported \ + on this platform." @exit 1 endif @@ -443,10 +437,11 @@ help: @echo "If no platform is specified, PLAT defaults to: ${DEFAULT_PLAT}" @echo "" @echo "Supported Targets:" - @echo " all Build the TFTF" - @echo " tftf Same as rule 'all'" - @echo " ns_bl1u Build the NS_BL1U image (requires FIRMWARE_UPDATE=1)" - @echo " ns_bl2u Build the NS_BL2U image (requires FIRMWARE_UPDATE=1)" + @echo " all Build all supported binaries for this platform" + @echo " (i.e. TFTF and FWU images)" + @echo " tftf Build the TFTF image" + @echo " ns_bl1u Build the NS_BL1U image" + @echo " ns_bl2u Build the NS_BL2U image" @echo " checkcodebase Check the coding style of the entire source tree" @echo " checkpatch Check the coding style on changes in the current" @echo " branch against BASE_COMMIT (default origin/master)" diff --git a/docs/user-guide.md b/docs/user-guide.md index 912d19d..02cc0ac 100644 --- a/docs/user-guide.md +++ b/docs/user-guide.md @@ -149,10 +149,11 @@ performed. 0 (RAM) or 1 (Secondary memory like flash) as test results storage. Default value is 1. -* `FIRMWARE_UPDATE`: Used to enable Firmware Update support in TFTF. This - flag enables compiling of FWU images: NS_BL1U and NS_BL2U and also enables - compiling of FWU related test cases in TFTF framework. - Default value is 0. +* `FIRMWARE_UPDATE`: Whether the Firmware Update non-secure images (i.e. + `NS_BL1U` and `NS_BL2U` images) should be built. The default value is 0. The + platform makefile is free to override this value if Firmware Update is + supported on this platform. + 5. Running the Test framework ------------------------------ diff --git a/fwu/ns_bl1u/ns_bl1u.mk b/fwu/ns_bl1u/ns_bl1u.mk index 6ecca25..d059c0c 100644 --- a/fwu/ns_bl1u/ns_bl1u.mk +++ b/fwu/ns_bl1u/ns_bl1u.mk @@ -28,7 +28,7 @@ # POSSIBILITY OF SUCH DAMAGE. # -NS_BL1U_SOURCES += drivers/io/io_fip.c \ +NS_BL1U_SOURCES := drivers/io/io_fip.c \ drivers/io/io_memmap.c \ framework/aarch64/arch.c \ framework/aarch64/asm_platform_weak.S \ @@ -53,3 +53,11 @@ NS_BL1U_SOURCES += drivers/io/io_fip.c \ plat/common/image_loader.c NS_BL1U_LINKERFILE := fwu/ns_bl1u/ns_bl1u.ld.S + + +ifneq (${USE_NVM},1) +ns_bl1u_nvm_error: + $(error "NS_BL1U requires the use of non-volatile memory, please build with USE_NVM=1") + +ns_bl1u: ns_bl1u_nvm_error +endif diff --git a/fwu/ns_bl2u/ns_bl2u.mk b/fwu/ns_bl2u/ns_bl2u.mk index 1c88fa3..e8179b4 100644 --- a/fwu/ns_bl2u/ns_bl2u.mk +++ b/fwu/ns_bl2u/ns_bl2u.mk @@ -28,7 +28,7 @@ # POSSIBILITY OF SUCH DAMAGE. # -NS_BL2U_SOURCES += framework/aarch64/arch.c \ +NS_BL2U_SOURCES := framework/aarch64/arch.c \ framework/aarch64/asm_platform_weak.S \ framework/aarch64/exceptions.S \ framework/debug.c \ @@ -54,3 +54,10 @@ NS_BL2U_SOURCES += framework/aarch64/arch.c \ NS_BL2U_LINKERFILE := fwu/ns_bl2u/ns_bl2u.ld.S + +ifneq (${USE_NVM},1) +ns_bl2u_nvm_error: + $(error "NS_BL2U requires the use of non-volatile memory, please build with USE_NVM=1") + +ns_bl2u: ns_bl2u_nvm_error +endif diff --git a/plat/armstrong/platform.mk b/plat/armstrong/platform.mk index 4c7bde1..2e872ec 100644 --- a/plat/armstrong/platform.mk +++ b/plat/armstrong/platform.mk @@ -51,8 +51,3 @@ PLAT_SOURCES += drivers/io/io_storage.c \ drivers/io/vexpress_nor/io_vexpress_nor_hw.c \ plat/armstrong/armstrong_io_storage.c endif - -ifeq (${FIRMWARE_UPDATE},1) - $(error "Firmware update is not yet implemented on Armstrong platform. \ - Please set FIRMWARE_UPDATE to 0.") -endif diff --git a/plat/ashbrook/platform.mk b/plat/ashbrook/platform.mk index c231ea0..8ab6b49 100644 --- a/plat/ashbrook/platform.mk +++ b/plat/ashbrook/platform.mk @@ -51,8 +51,3 @@ PLAT_SOURCES += drivers/io/io_storage.c \ drivers/io/vexpress_nor/io_vexpress_nor_hw.c \ plat/ashbrook/ashbrook_io_storage.c endif - -ifeq (${FIRMWARE_UPDATE},1) - $(error "Firmware update is not yet implemented on Ashbrook platform. \ - Please set FIRMWARE_UPDATE to 0.") -endif diff --git a/plat/fvp/platform.mk b/plat/fvp/platform.mk index a7d86f0..517140c 100644 --- a/plat/fvp/platform.mk +++ b/plat/fvp/platform.mk @@ -52,3 +52,6 @@ PLAT_SOURCES += drivers/io/io_storage.c \ drivers/io/vexpress_nor/io_vexpress_nor_hw.c \ plat/fvp/fvp_io_storage.c endif + +# Firmware update is implemented on FVP. +FIRMWARE_UPDATE := 1 diff --git a/plat/juno/platform.mk b/plat/juno/platform.mk index 4c43dbc..13a10c9 100644 --- a/plat/juno/platform.mk +++ b/plat/juno/platform.mk @@ -55,3 +55,6 @@ PLAT_SUPPORTS_NS_RESET := 1 # Process PLAT_SUPPORTS_NS_RESET flag $(eval $(call assert_boolean,PLAT_SUPPORTS_NS_RESET)) $(eval $(call add_define,PLAT_SUPPORTS_NS_RESET)) + +# Firmware update is implemented on Juno. +FIRMWARE_UPDATE := 1 |