Skip to content

Commit

Permalink
ArmVirtPkg/PlatformCI/ReadMe.md: Update contents
Browse files Browse the repository at this point in the history
Since the code is most regularly tested in CI, distro/versioning
details are updated to match the latest CI configuration.

CI has moved from Ubuntu 18.04 to Ubuntu 22.04 since the time of the
file's creation, but the code is actually built in a Fedora container
so Fedora is mentioned as the primary build/test environment.

Updates the following information:

- Build OS: Fedora 37 Linux
- Supported Configuration: Additional DSCs added
- Python: 3.12.x
- Packaging Tool: dnf instead of apt
- Container Details: Added
- Primary Build Example: QemuBuild.py instead of PlatformBuild.py

Cc: Ard Biesheuvel <[email protected]>
Cc: Gerd Hoffmann <[email protected]>
Cc: Julien Grall <[email protected]>
Cc: Leif Lindholm <[email protected]>
Cc: Sami Mujawar <[email protected]>
Signed-off-by: Michael Kubacki <[email protected]>
Message-Id: <[email protected]>
Reviewed-by: Laszlo Ersek <[email protected]>
[[email protected]: don't specify the number of supported firmware builds]
  • Loading branch information
makubacki authored and mergify[bot] committed Oct 31, 2023
1 parent 2e12830 commit a6871b5
Showing 1 changed file with 35 additions and 20 deletions.
55 changes: 35 additions & 20 deletions ArmVirtPkg/PlatformCI/ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,43 @@ to use the same Pytools based build infrastructure locally.

## Supported Configuration Details

This solution for building and running ArmVirtPkg has only been validated with Ubuntu
18.04 and the GCC5 toolchain. Two different firmware builds are supported and are
described below.

| Configuration name | Architecture | DSC File |Additional Flags |
| :---------- | :----- | :----- | :---- |
| AARCH64 | AARCH64 | ArmVirtQemu.dsc | None |
| ARM | ARM | ArmVirtQemu.dsc | None |
This solution for building and running ArmVirtPkg has been validated with Fedora
37 Linux and the GCC5 toolchain. The following different firmware builds are
supported.

| Configuration name | Architecture | DSC File | Additional Flags |
| :---------- | :----- | :----- | :---- |
| AARCH64 - KVM Cloud HV | AARCH64 | ArmVirtCloudHv.dsc | None |
| ARM - KVM Cloud HV | ARM | ArmVirtCloudHv.dsc | None |
| AARCH64 - kvmtool | AARCH64 | ArmVirtKvmTool.dsc | None |
| ARM - kvmtool | ARM | ArmVirtKvmTool.dsc | None |
| AARCH64 - QEMU | AARCH64 | ArmVirtQemu.dsc | None |
| ARM - QEMU | ARM | ArmVirtQemu.dsc | None |
| AARCH64 - QEMU Kernel | AARCH64 | ArmVirtQemuKernel.dsc | None |
| ARM - QEMU Kernel | ARM | ArmVirtQemuKernel.dsc | None |
| AARCH64 - Xen HV | AARCH64 | ArmVirtXen.dsc | None |
| ARM - Xen HV | ARM | ArmVirtXen.dsc | None |

## EDK2 Developer environment

- [Python 3.8.x - Download & Install](https://www.python.org/downloads/)
- [Python 3.12.x - Download & Install](https://www.python.org/downloads/)
- [GIT - Download & Install](https://git-scm.com/download/)
- [QEMU - Download, Install, and add to your path](https://www.qemu.org/download/)
- [Edk2 Source](https://github.com/tianocore/edk2)
- Additional packages found necessary for Ubuntu 18.04
- apt-get install gcc g++ make uuid-dev
- Additional packages found necessary for Fedora Linux 37
- dnf install gcc g++ make libuuid-devel

Note: edksetup, Submodule initialization and manual installation of NASM, iASL, or
the required cross-compiler toolchains are **not** required, this is handled by the
Pytools build system.

The code is built in CI using a container. The latest Fedora Linux 37 container is
available in this GitHub container registry feed
[fedora-37-test](https://github.com/tianocore/containers/pkgs/container/containers%2Ffedora-37-test).

The exact container version tested in CI is maintained in this file
[edk2/.azurepipelines/templates/default.yml](https://github.com/tianocore/edk2/blob/HEAD/.azurepipelines/templates/defaults.yml).

## Building with Pytools for ArmVirtPkg

If you are unfamiliar with Pytools, it is recommended to first read through
Expand Down Expand Up @@ -57,16 +72,16 @@ the generic set of edk2 [Build Instructions](https://github.com/tianocore/tianoc
pip install --upgrade -r pip-requirements.txt
```

4. Initialize & Update Submodules - only when submodules updated
4. Initialize & Update Submodules - only when submodules updated (QEMU build example)

``` bash
stuart_setup -c ArmVirtPkg/PlatformCI/PlatformBuild.py TOOL_CHAIN_TAG=<TOOL_CHAIN_TAG> -a <TARGET_ARCH>
stuart_setup -c ArmVirtPkg/PlatformCI/QemuBuild.py TOOL_CHAIN_TAG=<TOOL_CHAIN_TAG> -a <TARGET_ARCH>
```

5. Initialize & Update Dependencies - only as needed when ext_deps change
5. Initialize & Update Dependencies - only as needed when ext_deps change (QEMU build example)

``` bash
stuart_update -c ArmVirtPkg/PlatformCI/PlatformBuild.py TOOL_CHAIN_TAG=<TOOL_CHAIN_TAG> -a <TARGET_ARCH>
stuart_update -c ArmVirtPkg/PlatformCI/QemuBuild.py TOOL_CHAIN_TAG=<TOOL_CHAIN_TAG> -a <TARGET_ARCH>
```

6. Compile the basetools if necessary - only when basetools C source files change
Expand All @@ -75,13 +90,13 @@ the generic set of edk2 [Build Instructions](https://github.com/tianocore/tianoc
python BaseTools/Edk2ToolsBuild.py -t <ToolChainTag>
```

7. Compile Firmware
7. Compile Firmware (QEMU build example)

``` bash
stuart_build -c ArmVirtPkg/PlatformCI/PlatformBuild.py TOOL_CHAIN_TAG=<TOOL_CHAIN_TAG> -a <TARGET_ARCH>
stuart_build -c ArmVirtPkg/PlatformCI/QemuBuild.py TOOL_CHAIN_TAG=<TOOL_CHAIN_TAG> -a <TARGET_ARCH>
```

- use `stuart_build -c ArmVirtPkg/PlatformCI/PlatformBuild.py -h` option to see additional
- use `stuart_build -c ArmVirtPkg/PlatformCI/QemuBuild.py -h` option to see additional
options like `--clean`

8. Running Emulator
Expand All @@ -90,7 +105,7 @@ the generic set of edk2 [Build Instructions](https://github.com/tianocore/tianoc
- or use the `--FlashOnly` feature to just run the emulator.

``` bash
stuart_build -c ArmVirtPkg/PlatformCI/PlatformBuild.py TOOL_CHAIN_TAG=<TOOL_CHAIN_TAG> -a <TARGET_ARCH> --FlashOnly
stuart_build -c ArmVirtPkg/PlatformCI/QemuBuild.py TOOL_CHAIN_TAG=<TOOL_CHAIN_TAG> -a <TARGET_ARCH> --FlashOnly
```

### Notes
Expand Down Expand Up @@ -120,7 +135,7 @@ command-line. _stuart_build_ currently requires values to be assigned, so add an
For example, to enable the TPM2 support, instead of the traditional "-D TPM2_ENABLE=TRUE", the stuart_build
command-line would be:
`stuart_build -c ArmVirtPkg/PlatformCI/PlatformBuild.py BLD_*_TPM2_ENABLE=TRUE`
`stuart_build -c ArmVirtPkg/PlatformCI/QemuBuild.py BLD_*_TPM2_ENABLE=TRUE`
## References
Expand Down

0 comments on commit a6871b5

Please sign in to comment.