Skip to content

Commit 23c1cb8

Browse files
sgramsmergify[bot]
authored andcommitted
OvmfPkg/IntelTdx: Update README.md with missing build command
README.md missed describing a single command to build BaseTools before building actual TDVF image. This commit adds missing command and suggests using tianocore/containers for containerized builds. Signed-off-by: Stanislaw Grams <[email protected]>
1 parent 52bbcff commit 23c1cb8

1 file changed

Lines changed: 35 additions & 20 deletions

File tree

OvmfPkg/IntelTdx/README.md

Lines changed: 35 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -55,33 +55,48 @@ There are 2 configurations for TDVF.
5555
loaded.
5656

5757
Build
58-
------
59-
- Build the TDVF (Config-A) target:
60-
```
61-
cd /path/to/edk2
62-
source edksetup.sh
63-
64-
## CC_MEASUREMENT disabled
65-
build -p OvmfPkg/OvmfPkgX64.dsc -a X64 -t GCC -D CC_MEASUREMENT_ENABLE=FALSE -b RELEASE
66-
67-
## CC_MEASUREMENT enabled
68-
build -p OvmfPkg/OvmfPkgX64.dsc -a X64 -t GCC -D CC_MEASUREMENT_ENABLE=TRUE -b RELEASE
69-
```
70-
71-
- Build the TDVF (Config-B) target:
72-
```
73-
cd /path/to/edk2
74-
source edksetup.sh
75-
build -p OvmfPkg/IntelTdx/IntelTdxX64.dsc -a X64 -t GCC -b RELEASE
76-
```
58+
-----
59+
> For the build environment, consider reusing the existing EDKII infrastructure for containerized builds.
60+
> See [tianocore/containers](https://github.com/tianocore/containers) for more details.
61+
62+
1. **(Optional)** Pull and run the tianocore/containers Ubuntu 22 Docker image:
63+
```bash
64+
docker run -it \
65+
-v "${HOME}":"${HOME}" \
66+
-e EDK2_DOCKER_USER_HOME="${HOME}" \
67+
ghcr.io/tianocore/containers/ubuntu-22-dev:latest /bin/bash
68+
```
69+
70+
2. Prepare the environment:
71+
```bash
72+
cd /path/to/edk2
73+
. ./edksetup.sh
74+
make -C BaseTools
75+
```
76+
77+
3. Build the TDVF target:
78+
79+
**Config-A** (OvmfPkgX64):
80+
```bash
81+
# CC_MEASUREMENT disabled
82+
build -p OvmfPkg/OvmfPkgX64.dsc -a X64 -t GCC -D CC_MEASUREMENT_ENABLE=FALSE -b RELEASE
83+
84+
# CC_MEASUREMENT enabled
85+
build -p OvmfPkg/OvmfPkgX64.dsc -a X64 -t GCC -D CC_MEASUREMENT_ENABLE=TRUE -b RELEASE
86+
```
87+
88+
**Config-B** (IntelTdxX64):
89+
```bash
90+
build -p OvmfPkg/IntelTdx/IntelTdxX64.dsc -a X64 -t GCC -b RELEASE
91+
```
7792

7893
Usage
7994
-----
8095

8196
Assuming TDX-QEMU/TDX-KVM are already built, one can start a TD virtual
8297
machine as [launching-a-tdx-vm](https://gitlab.com/qemu/qemu/-/blob/master/docs/system/i386/tdx.rst):
8398

84-
```
99+
```bash
85100
qemu_system_x86 \
86101
-accel kvm \
87102
-cpu host \

0 commit comments

Comments
 (0)