From: "Masahisa Kojima" <masahisa.kojima@linaro.org>
To: devel@edk2.groups.io
Cc: Masahisa Kojima <masahisa.kojima@linaro.org>,
Ard Biesheuvel <ard.biesheuvel@arm.com>,
Leif Lindholm <leif@nuviainc.com>,
Graeme Gregory <graeme@nuviainc.com>,
Radoslaw Biernacki <rad@semihalf.com>,
Tanmay Jagdale <tanmay.jagdale@linaro.org>,
Shashi Mallela <shashi.mallela@linaro.org>
Subject: [PATCH edk2-platforms 3/4] SbsaQemu: add standalone MM build instruction
Date: Mon, 21 Dec 2020 21:53:56 +0900 [thread overview]
Message-ID: <20201221125357.17744-4-masahisa.kojima@linaro.org> (raw)
In-Reply-To: <20201221125357.17744-1-masahisa.kojima@linaro.org>
This commit adds the standalone MM build instruction
to enable UEFI secure boot.
Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
---
Platform/Qemu/SbsaQemu/Readme.md | 35 ++++++++++++++++++++
1 file changed, 35 insertions(+)
diff --git a/Platform/Qemu/SbsaQemu/Readme.md b/Platform/Qemu/SbsaQemu/Readme.md
index 63786d9d0fd3..cdee8b41507e 100644
--- a/Platform/Qemu/SbsaQemu/Readme.md
+++ b/Platform/Qemu/SbsaQemu/Readme.md
@@ -104,6 +104,41 @@ Create a directory $WORKSPACE that would hold source code of the components.
truncate -s 256M SBSA_FLASH[01].fd
```
+## Build UEFI with standalone MM based UEFI secure boot
+
+1. Compile standalone MM image
+
+ ```
+ cd $WORKSPACE
+ build -b RELEASE -a AARCH64 -t GCC5 -p edk2-platforms/Platform/Qemu/SbsaQemu/SbsaQemuStandaloneMM.dsc
+ ```
+
+2. Compile TF-A with BL32(Secure Payload)
+
+ Detailed build instructions can be found on the following link:
+ https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/tree/docs/plat/qemu-sbsa.rst
+
+ Then copy `bl1.bin` and `fip.bin` to the the edk2-non-osi directory:
+
+3. Compile UEFI with UEFI secure boot enabled
+
+ ```
+ cd $WORKSPACE
+ build -b RELEASE -a AARCH64 -t GCC5 -p edk2-platforms/Platform/Qemu/SbsaQemu/SbsaQemu.dsc -DSECURE_BOOT_ENABLE=TRUE
+ ```
+
+ Copy SBSA_FLASH0.fd and SBSA_FLASH1.fd to top $WORKSPACE directory.
+ Then extend the file size to match the machine flash size.
+ ```
+ cp Build/SbsaQemu/RELEASE_GCC5/FV/SBSA_FLASH[01].fd .
+ truncate -s 256M SBSA_FLASH[01].fd
+ ```
+
+ To keep the UEFI variable storage after the succeeding build, use `dd` instead of `cp`.
+ ```
+ dd if=./Build/SbsaQemu/RELEASE_GCC5/FV/SBSA_FLASH0.fd of=./SBSA_FLASH0.fd conv=notrunc bs=2M count=8
+ ```
+
# Running
The resulting SBSA_FLASH0.fd file will contain Secure flash0 image (TF-A code).
--
2.17.1
next prev parent reply other threads:[~2020-12-21 12:53 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-21 12:53 [PATCH edk2-platforms 0/4] add MM based UEFI secure boot on SbsaQemu Masahisa Kojima
2020-12-21 12:53 ` [PATCH edk2-platforms 1/4] SbsaQemu: Build infrastructure for StandaloneMm image Masahisa Kojima
2020-12-21 12:53 ` [PATCH edk2-platforms 2/4] SbsaQemu: add MM based UEFI secure boot support Masahisa Kojima
2021-02-16 11:35 ` Masahisa Kojima
2021-02-16 16:14 ` Graeme Gregory
2021-02-17 5:38 ` Masahisa Kojima
2020-12-21 12:53 ` Masahisa Kojima [this message]
2020-12-21 12:53 ` [PATCH edk2-platforms 4/4] SbsaQemu: fix typo Masahisa Kojima
2021-01-04 17:17 ` [PATCH edk2-platforms 0/4] add MM based UEFI secure boot on SbsaQemu Ard Biesheuvel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201221125357.17744-4-masahisa.kojima@linaro.org \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox