Hi Supreeth,
On Mon, Jun 05, 2017 at 02:00:24PM -0500, Supreeth Venkatesh wrote:
On Mon, 2017-06-05 at 19:44 +0100, Achin Gupta wrote:
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.
Reason being multiple folks have complained they are unable to build/generate normal FIP image, as they all have updated/auto-update (maybe as part of OS updates) GCC. I can check whether we can dynamically change the path to the STANDALONESMM.fd image based on where it gets generated. We will update https://github.com/tianocore/edk2-staging/blob/AArch64St andaloneM> m/HowtoBuild.MD#build-output. as well soon.
Fair enough! makes sense to change this once both the patches are ready.
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.
TOS_BIN itself should not have been used, if the original change was a deliberate attempt to not conflate SPM and SPD terminology. TOS means Trusted OS. It should have been easier to use a different variable so that SPM makes sense. But since TOS was used in conjunction with SPD in the original patch, have just changed minimally what makes it easier to distinguish between SPD and SPM options. if you concur, we can use altogether a new variable called "SPM_OPTION" and I can update the patch. However, the current checked-in patch is neither here (SPD) or there (SPM).
If you think that using TOS_BIN is not right then I am not sure how your change that conflates SPD_OPTION and SPM helps the situation.
BL32 and TOS_BIN are tightly coupled in documentation and implementation. The fiptool assumes BL32 is always tos-fw. So changing TOS_BIN here would not be the end of the story. My intent was to distinguish between a Secure Payload Dispatcher and a Secure Partition Manager. Hence they were kept separate and that was my point.
Please feel free to post a patch with the changes that you have in mind. I can review but I wish I could lose sleep over uefi-tools changes at this stage :o)
cheers, Achin
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/AArch64StandaloneM m/HowtoBuild.MD#build-output