Hi Supreeth,
On Mon, Jun 05, 2017 at 06:55:12PM +0100, Supreeth Venkatesh wrote:
This patch corrects TOS_BIN Path from "Build/StandaloneSmmPkg/DEBUG_GCC49/FV/STANDALONESMM.fd" to "Build/StandaloneSmmPkg/DEBUG_GCC5/FV/STANDALONESMM.fd"so that normal world firmware image package(fip) is generated successfully.
Why is this necessary? I am building with GCC 4.9 and [1] states the same path. It would be better if there was a way to detect the version of GCC at runtime and update the path accordingly.
Also, this patch adds commandline "SPM=1", when there is no secure payload dispatcher defined but TOS_BIN exists.
Signed-off-by: Supreeth Venkatesh supreeth.venkatesh@arm.com
atf-build.sh | 2 +- platforms.config | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/atf-build.sh b/atf-build.sh index 5c45708..1eb1c44 100755 --- a/atf-build.sh +++ b/atf-build.sh @@ -127,7 +127,7 @@ function build_platform
if [ X"$SPD" == X"none" ] && [ X"$TOS_BIN" != X"" ]; then BL32=$EDK2_DIR/$TOS_BIN
SPD_OPTION="BL32=$BL32"
SPD_OPTION="SPM=1"
SPM is not a SPD_OPTION. The original change was a deliberate attempt to not conflate the SPM and SPD terminology. If no SPD is specified but a pre-compiled BL32 is present then it is ensured that it is included in the FIP. SPM=1 separately ensures that it is used as the Standalone MM image.
If you think that SPD_OPTION="BL32=$BL32" is redundant since the BL32 variable will be exported anyways then it is worth removing this line altogether.
else echo "WARNING: Proceeding without Secure Partition!" echo " Please specify both ATF_SPD=none and TOS_BIN"
diff --git a/platforms.config b/platforms.config index 0639583..82b959c 100644 --- a/platforms.config +++ b/platforms.config @@ -107,9 +107,9 @@ BUILD_ATF=debug UEFI_BIN=FVP_AARCH64_EFI.fd UEFI_IMAGE_DIR=ArmVExpress-FVP-AArch64-MM-Normal ATF_PLATFORM=fvp -TOS_BIN=Build/StandaloneSmmPkg/DEBUG_GCC49/FV/STANDALONESMM.fd +TOS_BIN=Build/StandaloneSmmPkg/DEBUG_GCC5/FV/STANDALONESMM.fd ATF_SPD=none -ATF_BUILDFLAGS=ARM_BL31_IN_DRAM=1 SPM=1 +ATF_BUILDFLAGS=ARM_BL31_IN_DRAM=1
As pointed out earlier, SPM=1 was placed here since it is independent of an SPD.
[tc2] LONGNAME=Versatile Express TC2 -- 2.7.4
cheers, Achin
[1] https://github.com/tianocore/edk2-staging/blob/AArch64StandaloneMm/HowtoBuil...