diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json
index 592bb8cf66..41b18091fe 100644
--- a/.devcontainer/devcontainer.json
+++ b/.devcontainer/devcontainer.json
@@ -1,16 +1,10 @@
-{
- "image": "ghcr.io/tianocore/containers/fedora-35-dev:latest",
- "postCreateCommand": "git config --global --add safe.directory * && pip install --upgrade -r pip-requirements.txt",
- "customizations": {
- "vscode": {
- "extensions": [
- "DavidAnson.vscode-markdownlint",
- "ms-azuretools.vscode-docker",
- "ms-vscode-remote.remote-containers",
- "ms-vscode.cpptools",
- "walonli.edk2-vscode",
- "zachflower.uncrustify"
- ]
- }
- }
-}
+{
+ "name": "audk",
+ "build": {
+ "dockerfile": "../OpenCorePkg/Dockerfiles/oc-dev/Dockerfile",
+ "context": "../OpenCorePkg/Dockerfiles/oc-dev/",
+ "target": "oc-dev-edk2"
+ },
+ "workspaceMount": "source=${localWorkspaceFolder},target=/com.docker.devenvironments.code,type=bind,consistency=cached",
+ "workspaceFolder": "/com.docker.devenvironments.code"
+}
diff --git a/.github/workflows/build_arm.yaml b/.github/workflows/build_arm.yaml
new file mode 100644
index 0000000000..be83e78d4e
--- /dev/null
+++ b/.github/workflows/build_arm.yaml
@@ -0,0 +1,312 @@
+name: Build ARM Firmwares
+
+on:
+ push:
+ pull_request:
+ workflow_dispatch:
+ release:
+ types: [published]
+
+env:
+ PROJECT_TYPE: UEFI
+ FORCE_INSTALL: 1
+ WERROR: 1
+ QEMU_VERSION_TAG: qemu-ci-8.1.5-r1
+ WINPE_VERSION_TAG: images-winpe-1.0
+
+jobs:
+ build-linux-gcc5:
+ name: Linux GCC5
+ runs-on: ubuntu-22.04
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ submodules: recursive
+
+ - name: Install Dependencies
+ run: |
+ sudo apt-get update
+ sudo apt-get install -y lsb-release wget software-properties-common gnupg build-essential nasm uuid-dev libssl-dev iasl curl git zip gcc-arm-linux-gnueabi gcc-aarch64-linux-gnu
+
+ - name: CI Bootstrap
+ run: |
+ src=$(/usr/bin/curl -Lfs https://raw.githubusercontent.com/acidanthera/ocbuild/master/ci-bootstrap.sh) && eval "$src" || exit 1
+ touch UDK.ready
+
+ - name: Prepare efibuild.sh
+ run: |
+ curl -o ./efibuild.sh https://raw.githubusercontent.com/acidanthera/ocbuild/master/efibuild.sh || exit 1
+ chmod +x ./efibuild.sh
+ ln -s `pwd` UDK
+
+ - name: Build BaseTools
+ run: ./efibuild.sh
+ env:
+ SELFPKG: MdePkg
+ SKIP_BUILD: 1
+
+ - name: Build ArmPkg
+ if: always()
+ run: ./efibuild.sh
+ env:
+ SELFPKG: ArmPkg
+ SELFPKG_DIR: ArmPkg
+ TOOLCHAINS: GCC5
+ ARCHS: ARM,AARCH64
+ TARGETS: RELEASE,DEBUG,NOOPT
+ SKIP_TESTS: 1
+ SKIP_PACKAGE: 1
+ GCC5_ARM_PREFIX: arm-linux-gnueabi-
+ GCC5_AARCH64_PREFIX: aarch64-linux-gnu-
+
+ - name: Build ArmPlatformPkg
+ if: always()
+ run: ./efibuild.sh
+ env:
+ SELFPKG: ArmPlatformPkg
+ SELFPKG_DIR: ArmPlatformPkg
+ TOOLCHAINS: GCC5
+ ARCHS: ARM,AARCH64
+ TARGETS: RELEASE,DEBUG,NOOPT
+ SKIP_TESTS: 1
+ SKIP_PACKAGE: 1
+ GCC5_ARM_PREFIX: arm-linux-gnueabi-
+ GCC5_AARCH64_PREFIX: aarch64-linux-gnu-
+
+ - name: Build ArmVirtQemu
+ if: always()
+ run: ./efibuild.sh
+ env:
+ SELFPKG: ArmVirtQemu
+ SELFPKG_DIR: ArmVirtPkg
+ TOOLCHAINS: GCC5
+ ARCHS: ARM,AARCH64
+ TARGETS: RELEASE,DEBUG,NOOPT
+ SKIP_TESTS: 1
+ SKIP_PACKAGE: 1
+ GCC5_ARM_PREFIX: arm-linux-gnueabi-
+ GCC5_AARCH64_PREFIX: aarch64-linux-gnu-
+
+ - name: Prepare artifacts with firmwares
+ if: always()
+ run: |
+ IFS=', ' read -r -a TARGETS <<< "$TARGETS"
+ IFS=', ' read -r -a ARCHS <<< "$ARCHS"
+ for target in "${TARGETS[@]}"; do
+ for arch in "${ARCHS[@]}"; do
+ mkdir -p ./firmware_artifacts/ArmVirtQemu/"$arch"/"$target"_"$TOOLCHAIN"
+ cp ./Build/ArmVirtQemu-"$arch"/"$target"_"$TOOLCHAIN"/FV/QEMU_EFI.fd ./firmware_artifacts/ArmVirtQemu/"$arch"/"$target"_"$TOOLCHAIN"/FW.fd
+ done
+ done
+ env:
+ ARCHS: ARM,AARCH64
+ TARGETS: RELEASE,DEBUG,NOOPT
+ TOOLCHAIN: GCC5
+
+ - name: Zip artifacts
+ run: zip GCC5_fw_arm_artifacts.zip ./firmware_artifacts/* -r
+
+ - name: Upload to Artifacts
+ uses: actions/upload-artifact@v4
+ with:
+ name: GCC5 Firmware ARM Artifacts
+ path: GCC5_fw_arm_artifacts.zip
+
+ build-linux-clangdwarf:
+ name: Linux CLANGDWARF
+ runs-on: ubuntu-22.04
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ submodules: recursive
+
+ - name: Install Dependencies
+ run: |
+ sudo apt-get update
+ sudo apt-get install -y lsb-release wget software-properties-common gnupg build-essential nasm uuid-dev libssl-dev iasl curl git zip
+ wget https://apt.llvm.org/llvm.sh
+ chmod +x llvm.sh
+ yes '' | sudo ./llvm.sh 15
+ rm -f llvm.sh
+ echo "/usr/lib/llvm-15/bin" >> $GITHUB_PATH
+
+ - name: CI Bootstrap
+ run: |
+ src=$(/usr/bin/curl -Lfs https://raw.githubusercontent.com/acidanthera/ocbuild/master/ci-bootstrap.sh) && eval "$src" || exit 1
+ touch UDK.ready
+
+ - name: Prepare efibuild.sh
+ run: |
+ curl -o ./efibuild.sh https://raw.githubusercontent.com/acidanthera/ocbuild/master/efibuild.sh || exit 1
+ chmod +x ./efibuild.sh
+ ln -s `pwd` UDK
+
+ - name: Build BaseTools
+ run: ./efibuild.sh
+ env:
+ SELFPKG: MdePkg
+ SKIP_BUILD: 1
+
+ - name: Build ArmPkg
+ if: always()
+ run: ./efibuild.sh
+ env:
+ SELFPKG: ArmPkg
+ SELFPKG_DIR: ArmPkg
+ TOOLCHAINS: CLANGDWARF
+ ARCHS: ARM,AARCH64
+ TARGETS: RELEASE,DEBUG,NOOPT
+ SKIP_TESTS: 1
+ SKIP_PACKAGE: 1
+
+ - name: Build ArmPlatformPkg
+ if: always()
+ run: ./efibuild.sh
+ env:
+ SELFPKG: ArmPlatformPkg
+ SELFPKG_DIR: ArmPlatformPkg
+ TOOLCHAINS: CLANGDWARF
+ ARCHS: ARM,AARCH64
+ TARGETS: RELEASE,DEBUG,NOOPT
+ SKIP_TESTS: 1
+ SKIP_PACKAGE: 1
+
+ - name: Build ArmVirtQemu
+ if: always()
+ run: ./efibuild.sh
+ env:
+ SELFPKG: ArmVirtQemu
+ SELFPKG_DIR: ArmVirtPkg
+ TOOLCHAINS: CLANGDWARF
+ ARCHS: ARM,AARCH64
+ TARGETS: RELEASE,DEBUG,NOOPT
+ SKIP_TESTS: 1
+ SKIP_PACKAGE: 1
+
+ - name: Prepare artifacts with firmwares
+ if: always()
+ run: |
+ IFS=', ' read -r -a TARGETS <<< "$TARGETS"
+ IFS=', ' read -r -a ARCHS <<< "$ARCHS"
+ for target in "${TARGETS[@]}"; do
+ for arch in "${ARCHS[@]}"; do
+ mkdir -p ./firmware_artifacts/ArmVirtQemu/"$arch"/"$target"_"$TOOLCHAIN"
+ cp ./Build/ArmVirtQemu-"$arch"/"$target"_"$TOOLCHAIN"/FV/QEMU_EFI.fd ./firmware_artifacts/ArmVirtQemu/"$arch"/"$target"_"$TOOLCHAIN"/FW.fd
+ done
+ done
+ env:
+ ARCHS: ARM,AARCH64
+ TARGETS: RELEASE,DEBUG,NOOPT
+ TOOLCHAIN: CLANGDWARF
+
+ - name: Zip artifacts
+ run: zip CLANGDWARF_fw_arm_artifacts.zip ./firmware_artifacts/* -r
+
+ - name: Upload to Artifacts
+ uses: actions/upload-artifact@v4
+ with:
+ name: CLANGDWARF Firmware ARM Artifacts
+ path: CLANGDWARF_fw_arm_artifacts.zip
+
+ test-firmwares:
+ name: Test
+ runs-on: ubuntu-22.04
+ needs: [build-linux-gcc5, build-linux-clangdwarf]
+
+ strategy:
+ fail-fast: false
+ matrix:
+ package: [
+ {name: "ArmVirtQemu", archs: "ARM,AARCH64", toolchain: "GCC5", targets: "RELEASE,DEBUG,NOOPT"},
+ {name: "ArmVirtQemu", archs: "ARM,AARCH64", toolchain: "CLANGDWARF", targets: "RELEASE,DEBUG,NOOPT"},
+ ]
+ steps:
+ - name: Checkout ocbuild repository
+ uses: actions/checkout@v4
+ with:
+ repository: acidanthera/ocbuild
+ ref: master
+ path: ./
+
+ - name: Install dependencies
+ run: |
+ sudo apt-get update
+ sudo apt-get install -y python3 python3-pip libglib2.0-dev libfdt-dev libpixman-1-dev libepoxy-dev libcapstone-dev libsdl2-dev libnuma-dev libgtk-3-dev libvte-2.91-dev libbrlapi-dev libiscsi-dev libnfs-dev librbd-dev libxen-dev
+ python3 -m pip install -r requirements.txt
+
+ - name: Downloading QEMU
+ uses: robinraju/release-downloader@v1.7
+ with:
+ repository: "acidanthera/OcBinaryData"
+ tag: ${{ env.QEMU_VERSION_TAG }}
+ fileName: "qemu.tar.xz"
+
+ - name: Installing QEMU and add to PATH
+ run: |
+ echo "${HOME}/qemu/bin" >> $GITHUB_PATH
+ tar -xJf ./qemu.tar.xz -C $HOME
+
+ - name: Download a single artifact
+ uses: actions/download-artifact@v4
+ with:
+ name: ${{ matrix.package.toolchain }} Firmware ARM Artifacts
+
+ - name: Unzip artifacts
+ run: unzip "$TOOLCHAIN"_fw_arm_artifacts.zip
+ env:
+ TOOLCHAIN: ${{ matrix.package.toolchain }}
+
+ - name: Downloading Windows PE AARCH64 iso
+ uses: robinraju/release-downloader@v1.7
+ with:
+ repository: "acidanthera/OcBinaryData"
+ tag: ${{ env.WINPE_VERSION_TAG }}
+ fileName: "winpe_AARCH64.iso"
+
+ - name: Run TestConsole
+ if: always()
+ run: |
+ IFS=', ' read -r -a TARGETS <<< "$TARGETS"
+ IFS=', ' read -r -a ARCHS <<< "$ARCHS"
+ for target in "${TARGETS[@]}"; do
+ for arch in "${ARCHS[@]}"; do
+ echo Checking "$PACKAGE""$arch" "$target"_"$TOOLCHAIN"
+ python3 test_qemu_fw.py ./firmware_artifacts/"$PACKAGE"/"$arch"/"$target"_"$TOOLCHAIN"/FW.fd --fw-arch "$arch"
+ done
+ done
+ env:
+ PACKAGE: ${{ matrix.package.name }}
+ ARCHS: ${{ matrix.package.archs }}
+ TARGETS: ${{ matrix.package.targets }}
+ TOOLCHAIN: ${{ matrix.package.toolchain }}
+
+ - name: Run TestLinux
+ if: always()
+ run: |
+ IFS=', ' read -r -a TARGETS <<< "$TARGETS"
+ IFS=', ' read -r -a ARCHS <<< "$ARCHS"
+ for target in "${TARGETS[@]}"; do
+ for arch in "${ARCHS[@]}"; do
+ echo Checking "$PACKAGE""$arch" "$target"_"$TOOLCHAIN"
+ python3 test_qemu_fw.py ./firmware_artifacts/"$PACKAGE"/"$arch"/"$target"_"$TOOLCHAIN"/FW.fd --test-linux --fw-arch "$arch"
+ done
+ done
+ env:
+ PACKAGE: ${{ matrix.package.name }}
+ ARCHS: ${{ matrix.package.archs }}
+ TARGETS: ${{ matrix.package.targets }}
+ TOOLCHAIN: ${{ matrix.package.toolchain }}
+
+ - name: Run Windows PE aarch64
+ if: always()
+ run: |
+ IFS=', ' read -r -a TARGETS <<< "$TARGETS"
+ IFS=', ' read -r -a ARCHS <<< "$ARCHS"
+ for target in "${TARGETS[@]}"; do
+ echo Checking "$PACKAGE"AARCH64 "$target"_"$TOOLCHAIN"
+ python3 test_qemu_fw.py ./firmware_artifacts/"$PACKAGE"/AARCH64/"$target"_"$TOOLCHAIN"/FW.fd --fw-arch AARCH64 --test-winpe --test-winpe-path ./winpe_AARCH64.iso
+ done
+ env:
+ PACKAGE: ${{ matrix.package.name }}
+ TARGETS: ${{ matrix.package.targets }}
+ TOOLCHAIN: ${{ matrix.package.toolchain }}
diff --git a/.github/workflows/build_common.yml b/.github/workflows/build_common.yml
new file mode 100644
index 0000000000..5a7629d830
--- /dev/null
+++ b/.github/workflows/build_common.yml
@@ -0,0 +1,622 @@
+name: Build Common packages
+
+on:
+ push:
+ pull_request:
+ workflow_dispatch:
+ release:
+ types: [published]
+
+env:
+ PROJECT_TYPE: UEFI
+ FORCE_INSTALL: 1
+ WERROR: 1
+
+jobs:
+ build-macos:
+ name: macOS XCODE5
+ runs-on: macos-latest
+ env:
+ JOB_TYPE: BUILD
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ submodules: recursive
+
+ - name: Add Linux Toolchain
+ run: brew tap FiloSottile/homebrew-musl-cross
+
+ - name: Install Linux Toolchain
+ run: brew install musl-cross
+ env:
+ HOMEBREW_NO_INSTALL_CLEANUP: 1
+ HOMEBREW_NO_AUTO_UPDATE: 1
+
+ - name: Install Dependencies
+ run: brew install openssl mingw-w64
+ env:
+ HOMEBREW_NO_INSTALL_CLEANUP: 1
+ HOMEBREW_NO_AUTO_UPDATE: 1
+
+ - name: CI Bootstrap
+ run: |
+ src=$(/usr/bin/curl -Lfs https://raw.githubusercontent.com/acidanthera/ocbuild/master/ci-bootstrap.sh) && eval "$src" || exit 1
+ touch UDK.ready
+
+ - name: Prepare efibuild.sh
+ run: |
+ curl -o ./efibuild.sh https://raw.githubusercontent.com/acidanthera/ocbuild/master/efibuild.sh || exit 1
+ chmod +x ./efibuild.sh
+ ln -s `pwd` UDK
+
+ - name: Build BaseTools
+ run: ./efibuild.sh
+ env:
+ SELFPKG: MdePkg
+ SKIP_BUILD: 1
+
+ - name: Build Ext4Pkg
+ run: ./efibuild.sh
+ env:
+ SELFPKG: Ext4Pkg
+ ARCHS: IA32,X64
+ SKIP_TESTS: 1
+ SKIP_PACKAGE: 1
+
+ - name: Build FatPkg
+ if: always()
+ run: ./efibuild.sh
+ env:
+ SELFPKG: FatPkg
+ ARCHS: IA32,X64
+ SKIP_TESTS: 1
+ SKIP_PACKAGE: 1
+
+ - name: Build IntelFsp2Pkg
+ if: always()
+ run: ./efibuild.sh
+ env:
+ SELFPKG: IntelFsp2Pkg
+ ARCHS: IA32,X64
+ SKIP_TESTS: 1
+ SKIP_PACKAGE: 1
+
+ - name: Build IntelFsp2WrapperPkg
+ if: always()
+ run: ./efibuild.sh
+ env:
+ SELFPKG: IntelFsp2WrapperPkg
+ ARCHS: IA32,X64
+ SKIP_TESTS: 1
+ SKIP_PACKAGE: 1
+
+ - name: Build MdeModulePkg
+ if: always()
+ run: ./efibuild.sh
+ env:
+ SELFPKG: MdeModulePkg
+ ARCHS: IA32,X64
+ SKIP_TESTS: 1
+ SKIP_PACKAGE: 1
+
+ - name: Build MdePkg
+ if: always()
+ run: ./efibuild.sh
+ env:
+ SELFPKG: MdePkg
+ ARCHS: IA32,X64
+ SKIP_TESTS: 1
+ SKIP_PACKAGE: 1
+
+ - name: Build UefiCpuPkg
+ if: always()
+ run: ./efibuild.sh
+ env:
+ SELFPKG: UefiCpuPkg
+ ARCHS: IA32,X64
+ SKIP_TESTS: 1
+ SKIP_PACKAGE: 1
+
+ - name: Build UnitTestFrameworkPkg
+ if: always()
+ run: ./efibuild.sh
+ env:
+ SELFPKG: UnitTestFrameworkPkg
+ ARCHS: IA32,X64
+ SKIP_TESTS: 1
+ SKIP_PACKAGE: 1
+
+ - name: Build NetworkPkg
+ if: always()
+ run: ./efibuild.sh
+ env:
+ SELFPKG: NetworkPkg
+ ARCHS: IA32,X64
+ SKIP_TESTS: 1
+ SKIP_PACKAGE: 1
+
+ build-windows:
+ name: Windows VS2019
+ runs-on: windows-latest
+ env:
+ CC: gcc
+ defaults:
+ run:
+ shell: bash
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ submodules: recursive
+
+ - name: Install Dependencies
+ run: |
+ choco install make nasm zip iasl --no-progress
+
+ - name: CI Bootstrap
+ run: |
+ src=$(curl -Lfs https://raw.githubusercontent.com/acidanthera/ocbuild/master/ci-bootstrap.sh) && eval "$src" || exit 1
+ touch UDK.ready
+
+ - name: Prepare efibuild.sh
+ run: |
+ curl -o ./efibuild.sh https://raw.githubusercontent.com/acidanthera/ocbuild/master/efibuild.sh || exit 1
+ chmod +x ./efibuild.sh
+ cmd <<< "mklink /D .\\UDK .\\" > /dev/null
+
+ - name: Build BaseTools
+ run: ./efibuild.sh
+ env:
+ SELFPKG: MdePkg
+ SKIP_BUILD: 1
+
+ - name: Build Ext4Pkg
+ run: ./efibuild.sh
+ env:
+ SELFPKG: Ext4Pkg
+ ARCHS: IA32,X64
+ SKIP_TESTS: 1
+ SKIP_PACKAGE: 1
+
+ - name: Build FatPkg
+ if: always()
+ run: ./efibuild.sh
+ env:
+ SELFPKG: FatPkg
+ ARCHS: IA32,X64
+ SKIP_TESTS: 1
+ SKIP_PACKAGE: 1
+
+ - name: Build IntelFsp2Pkg
+ if: always()
+ run: ./efibuild.sh
+ env:
+ SELFPKG: IntelFsp2Pkg
+ ARCHS: IA32,X64
+ SKIP_TESTS: 1
+ SKIP_PACKAGE: 1
+
+ - name: Build IntelFsp2WrapperPkg
+ if: always()
+ run: ./efibuild.sh
+ env:
+ SELFPKG: IntelFsp2WrapperPkg
+ ARCHS: IA32,X64
+ SKIP_TESTS: 1
+ SKIP_PACKAGE: 1
+
+ - name: Build MdeModulePkg
+ if: always()
+ run: ./efibuild.sh
+ env:
+ SELFPKG: MdeModulePkg
+ ARCHS: IA32,X64
+ SKIP_TESTS: 1
+ SKIP_PACKAGE: 1
+
+ - name: Build MdePkg
+ if: always()
+ run: ./efibuild.sh
+ env:
+ SELFPKG: MdePkg
+ ARCHS: IA32,X64
+ SKIP_TESTS: 1
+ SKIP_PACKAGE: 1
+
+ - name: Build UefiCpuPkg
+ if: always()
+ run: ./efibuild.sh
+ env:
+ SELFPKG: UefiCpuPkg
+ ARCHS: IA32,X64
+ SKIP_TESTS: 1
+ SKIP_PACKAGE: 1
+
+ - name: Build UnitTestFrameworkPkg
+ if: always()
+ run: ./efibuild.sh
+ env:
+ SELFPKG: UnitTestFrameworkPkg
+ ARCHS: IA32,X64
+ SKIP_TESTS: 1
+ SKIP_PACKAGE: 1
+
+ - name: Build NetworkPkg
+ if: always()
+ run: ./efibuild.sh
+ env:
+ SELFPKG: NetworkPkg
+ ARCHS: IA32,X64
+ SKIP_TESTS: 1
+ SKIP_PACKAGE: 1
+
+ build-linux-clangpdb:
+ name: Linux CLANGPDB
+ runs-on: ubuntu-22.04
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ submodules: recursive
+
+ - name: Use Docker in rootless mode.
+ uses: ScribeMD/rootless-docker@0.2.2
+
+ - name: Build BaseTools
+ run: docker compose run build-package
+ env:
+ SELFPKG: MdePkg
+ SKIP_BUILD: 1
+
+ - name: Build Ext4Pkg
+ run: docker compose run build-package
+ env:
+ SELFPKG: Ext4Pkg
+ SELFPKG_DIR: Ext4Pkg
+ TOOLCHAINS: CLANGPDB
+ ARCHS: IA32,X64
+ TARGETS: RELEASE,DEBUG,NOOPT
+ SKIP_TESTS: 1
+ SKIP_PACKAGE: 1
+
+ - name: Build FatPkg
+ if: always()
+ run: docker compose run build-package
+ env:
+ SELFPKG: FatPkg
+ SELFPKG_DIR: FatPkg
+ TOOLCHAINS: CLANGPDB
+ ARCHS: IA32,X64
+ TARGETS: RELEASE,DEBUG,NOOPT
+ SKIP_TESTS: 1
+ SKIP_PACKAGE: 1
+
+ - name: Build IntelFsp2Pkg
+ if: always()
+ run: docker compose run build-package
+ env:
+ SELFPKG: IntelFsp2Pkg
+ SELFPKG_DIR: IntelFsp2Pkg
+ TOOLCHAINS: CLANGPDB
+ ARCHS: IA32,X64
+ TARGETS: RELEASE,DEBUG,NOOPT
+ SKIP_TESTS: 1
+ SKIP_PACKAGE: 1
+
+ - name: Build IntelFsp2WrapperPkg
+ if: always()
+ run: docker compose run build-package
+ env:
+ SELFPKG: IntelFsp2WrapperPkg
+ SELFPKG_DIR: IntelFsp2WrapperPkg
+ TOOLCHAINS: CLANGPDB
+ ARCHS: IA32,X64
+ TARGETS: RELEASE,DEBUG,NOOPT
+ SKIP_TESTS: 1
+ SKIP_PACKAGE: 1
+
+ - name: Build MdeModulePkg
+ if: always()
+ run: docker compose run build-package
+ env:
+ SELFPKG: MdeModulePkg
+ SELFPKG_DIR: MdeModulePkg
+ TOOLCHAINS: CLANGPDB
+ ARCHS: IA32,X64
+ TARGETS: RELEASE,DEBUG,NOOPT
+ SKIP_TESTS: 1
+ SKIP_PACKAGE: 1
+
+ - name: Build MdePkg
+ if: always()
+ run: docker compose run build-package
+ env:
+ SELFPKG: MdePkg
+ SELFPKG_DIR: MdePkg
+ TOOLCHAINS: CLANGPDB
+ ARCHS: IA32,X64
+ TARGETS: RELEASE,DEBUG,NOOPT
+ SKIP_TESTS: 1
+ SKIP_PACKAGE: 1
+
+ - name: Build UefiCpuPkg
+ if: always()
+ run: docker compose run build-package
+ env:
+ SELFPKG: UefiCpuPkg
+ SELFPKG_DIR: UefiCpuPkg
+ TOOLCHAINS: CLANGPDB
+ ARCHS: IA32,X64
+ TARGETS: RELEASE,DEBUG,NOOPT
+ SKIP_TESTS: 1
+ SKIP_PACKAGE: 1
+
+ - name: Build UnitTestFrameworkPkg
+ if: always()
+ run: docker compose run build-package
+ env:
+ SELFPKG: UnitTestFrameworkPkg
+ SELFPKG_DIR: UnitTestFrameworkPkg
+ TOOLCHAINS: CLANGPDB
+ ARCHS: IA32,X64
+ TARGETS: RELEASE,DEBUG,NOOPT
+ SKIP_TESTS: 1
+ SKIP_PACKAGE: 1
+
+ - name: Build NetworkPkg
+ if: always()
+ run: docker compose run build-package
+ env:
+ SELFPKG: NetworkPkg
+ SELFPKG_DIR: NetworkPkg
+ TOOLCHAINS: CLANGPDB
+ ARCHS: IA32,X64
+ TARGETS: RELEASE,DEBUG,NOOPT
+ SKIP_TESTS: 1
+ SKIP_PACKAGE: 1
+
+ build-linux-clangdwarf:
+ name: Linux CLANGDWARF
+ runs-on: ubuntu-22.04
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ submodules: recursive
+
+ - name: Use Docker in rootless mode.
+ uses: ScribeMD/rootless-docker@0.2.2
+
+ - name: Build BaseTools
+ run: docker compose run build-package
+ env:
+ SELFPKG: MdePkg
+ SKIP_BUILD: 1
+
+ - name: Build Ext4Pkg
+ run: docker compose run build-package
+ env:
+ SELFPKG: Ext4Pkg
+ SELFPKG_DIR: Ext4Pkg
+ TOOLCHAINS: CLANGDWARF
+ ARCHS: IA32,X64
+ TARGETS: RELEASE,DEBUG,NOOPT
+ SKIP_TESTS: 1
+ SKIP_PACKAGE: 1
+
+ - name: Build FatPkg
+ if: always()
+ run: docker compose run build-package
+ env:
+ SELFPKG: FatPkg
+ SELFPKG_DIR: FatPkg
+ TOOLCHAINS: CLANGDWARF
+ ARCHS: IA32,X64
+ TARGETS: RELEASE,DEBUG,NOOPT
+ SKIP_TESTS: 1
+ SKIP_PACKAGE: 1
+
+ - name: Build IntelFsp2Pkg
+ if: always()
+ run: docker compose run build-package
+ env:
+ SELFPKG: IntelFsp2Pkg
+ SELFPKG_DIR: IntelFsp2Pkg
+ TOOLCHAINS: CLANGDWARF
+ ARCHS: IA32,X64
+ TARGETS: RELEASE,DEBUG,NOOPT
+ SKIP_TESTS: 1
+ SKIP_PACKAGE: 1
+
+ - name: Build IntelFsp2WrapperPkg
+ if: always()
+ run: docker compose run build-package
+ env:
+ SELFPKG: IntelFsp2WrapperPkg
+ SELFPKG_DIR: IntelFsp2WrapperPkg
+ TOOLCHAINS: CLANGDWARF
+ ARCHS: IA32,X64
+ TARGETS: RELEASE,DEBUG,NOOPT
+ SKIP_TESTS: 1
+ SKIP_PACKAGE: 1
+
+ - name: Build MdeModulePkg
+ if: always()
+ run: docker compose run build-package
+ env:
+ SELFPKG: MdeModulePkg
+ SELFPKG_DIR: MdeModulePkg
+ TOOLCHAINS: CLANGDWARF
+ ARCHS: IA32,X64
+ TARGETS: RELEASE,DEBUG,NOOPT
+ SKIP_TESTS: 1
+ SKIP_PACKAGE: 1
+
+ - name: Build MdePkg
+ if: always()
+ run: docker compose run build-package
+ env:
+ SELFPKG: MdePkg
+ SELFPKG_DIR: MdePkg
+ TOOLCHAINS: CLANGDWARF
+ ARCHS: IA32,X64
+ TARGETS: RELEASE,DEBUG,NOOPT
+ SKIP_TESTS: 1
+ SKIP_PACKAGE: 1
+
+ - name: Build UefiCpuPkg
+ if: always()
+ run: docker compose run build-package
+ env:
+ SELFPKG: UefiCpuPkg
+ SELFPKG_DIR: UefiCpuPkg
+ TOOLCHAINS: CLANGDWARF
+ ARCHS: IA32,X64
+ TARGETS: RELEASE,DEBUG,NOOPT
+ SKIP_TESTS: 1
+ SKIP_PACKAGE: 1
+
+ - name: Build UnitTestFrameworkPkg
+ if: always()
+ run: docker compose run build-package
+ env:
+ SELFPKG: UnitTestFrameworkPkg
+ SELFPKG_DIR: UnitTestFrameworkPkg
+ TOOLCHAINS: CLANGDWARF
+ ARCHS: IA32,X64
+ TARGETS: RELEASE,DEBUG,NOOPT
+ SKIP_TESTS: 1
+ SKIP_PACKAGE: 1
+
+ - name: Build NetworkPkg
+ if: always()
+ run: docker compose run build-package
+ env:
+ SELFPKG: NetworkPkg
+ SELFPKG_DIR: NetworkPkg
+ TOOLCHAINS: CLANGDWARF
+ ARCHS: IA32,X64
+ TARGETS: RELEASE,DEBUG,NOOPT
+ SKIP_TESTS: 1
+ SKIP_PACKAGE: 1
+
+ build-linux-gcc5:
+ name: Linux GCC5
+ runs-on: ubuntu-22.04
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ submodules: recursive
+
+ - name: Use Docker in rootless mode.
+ uses: ScribeMD/rootless-docker@0.2.2
+
+ - name: Build BaseTools
+ run: docker compose run build-package
+ env:
+ SELFPKG: MdePkg
+ SKIP_BUILD: 1
+
+ - name: Build Ext4Pkg
+ run: docker compose run build-package
+ env:
+ SELFPKG: Ext4Pkg
+ SELFPKG_DIR: Ext4Pkg
+ TOOLCHAINS: GCC5
+ ARCHS: IA32,X64
+ TARGETS: RELEASE,DEBUG,NOOPT
+ SKIP_TESTS: 1
+ SKIP_PACKAGE: 1
+
+ - name: Build FatPkg
+ if: always()
+ run: docker compose run build-package
+ env:
+ SELFPKG: FatPkg
+ SELFPKG_DIR: FatPkg
+ TOOLCHAINS: GCC5
+ ARCHS: IA32,X64
+ TARGETS: RELEASE,DEBUG,NOOPT
+ SKIP_TESTS: 1
+ SKIP_PACKAGE: 1
+
+ - name: Build IntelFsp2Pkg
+ if: always()
+ run: docker compose run build-package
+ env:
+ SELFPKG: IntelFsp2Pkg
+ SELFPKG_DIR: IntelFsp2Pkg
+ TOOLCHAINS: GCC5
+ ARCHS: IA32,X64
+ TARGETS: RELEASE,DEBUG,NOOPT
+ SKIP_TESTS: 1
+ SKIP_PACKAGE: 1
+
+ - name: Build IntelFsp2WrapperPkg
+ if: always()
+ run: docker compose run build-package
+ env:
+ SELFPKG: IntelFsp2WrapperPkg
+ SELFPKG_DIR: IntelFsp2WrapperPkg
+ TOOLCHAINS: GCC5
+ ARCHS: IA32,X64
+ TARGETS: RELEASE,DEBUG,NOOPT
+ SKIP_TESTS: 1
+ SKIP_PACKAGE: 1
+
+ - name: Build MdeModulePkg
+ if: always()
+ run: docker compose run build-package
+ env:
+ SELFPKG: MdeModulePkg
+ SELFPKG_DIR: MdeModulePkg
+ TOOLCHAINS: GCC5
+ ARCHS: IA32,X64
+ TARGETS: RELEASE,DEBUG,NOOPT
+ SKIP_TESTS: 1
+ SKIP_PACKAGE: 1
+
+ - name: Build MdePkg
+ if: always()
+ run: docker compose run build-package
+ env:
+ SELFPKG: MdePkg
+ SELFPKG_DIR: MdePkg
+ TOOLCHAINS: GCC5
+ ARCHS: IA32,X64
+ TARGETS: RELEASE,DEBUG,NOOPT
+ SKIP_TESTS: 1
+ SKIP_PACKAGE: 1
+
+ - name: Build UefiCpuPkg
+ if: always()
+ run: docker compose run build-package
+ env:
+ SELFPKG: UefiCpuPkg
+ SELFPKG_DIR: UefiCpuPkg
+ TOOLCHAINS: GCC5
+ ARCHS: IA32,X64
+ TARGETS: RELEASE,DEBUG,NOOPT
+ SKIP_TESTS: 1
+ SKIP_PACKAGE: 1
+
+ - name: Build UnitTestFrameworkPkg
+ if: always()
+ run: docker compose run build-package
+ env:
+ SELFPKG: UnitTestFrameworkPkg
+ SELFPKG_DIR: UnitTestFrameworkPkg
+ TOOLCHAINS: GCC5
+ ARCHS: IA32,X64
+ TARGETS: RELEASE,DEBUG,NOOPT
+ SKIP_TESTS: 1
+ SKIP_PACKAGE: 1
+
+ - name: Build NetworkPkg
+ if: always()
+ run: docker compose run build-package
+ env:
+ SELFPKG: NetworkPkg
+ SELFPKG_DIR: NetworkPkg
+ TOOLCHAINS: GCC5
+ ARCHS: IA32,X64
+ TARGETS: RELEASE,DEBUG,NOOPT
+ SKIP_TESTS: 1
+ SKIP_PACKAGE: 1
diff --git a/.github/workflows/build_nolto.yaml b/.github/workflows/build_nolto.yaml
new file mode 100644
index 0000000000..ad48934a31
--- /dev/null
+++ b/.github/workflows/build_nolto.yaml
@@ -0,0 +1,577 @@
+name: Build Firmwares using GCC without Link Time Optimization
+
+on:
+ push:
+ pull_request:
+ workflow_dispatch:
+ release:
+ types: [published]
+
+env:
+ PROJECT_TYPE: UEFI
+ FORCE_INSTALL: 1
+ WERROR: 1
+ QEMU_VERSION_TAG: qemu-ci-8.1.5-r1
+ WINPE_VERSION_TAG: images-winpe-1.0
+
+jobs:
+ build-linux-arm:
+ name: Linux GCC ARM
+ runs-on: ubuntu-22.04
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ submodules: recursive
+
+ - name: Install Dependencies
+ run: |
+ sudo apt-get update
+ sudo apt-get install -y lsb-release wget software-properties-common gnupg build-essential nasm uuid-dev libssl-dev iasl curl git zip gcc-arm-linux-gnueabi gcc-aarch64-linux-gnu
+
+ - name: CI Bootstrap
+ run: |
+ src=$(/usr/bin/curl -Lfs https://raw.githubusercontent.com/acidanthera/ocbuild/master/ci-bootstrap.sh) && eval "$src" || exit 1
+ touch UDK.ready
+
+ - name: Prepare efibuild.sh
+ run: |
+ curl -o ./efibuild.sh https://raw.githubusercontent.com/acidanthera/ocbuild/master/efibuild.sh || exit 1
+ chmod +x ./efibuild.sh
+ ln -s `pwd` UDK
+
+ - name: Build BaseTools
+ run: ./efibuild.sh
+ env:
+ SELFPKG: MdePkg
+ SKIP_BUILD: 1
+
+ - name: Build ArmPkg
+ if: always()
+ run: ./efibuild.sh
+ env:
+ SELFPKG: ArmPkg
+ SELFPKG_DIR: ArmPkg
+ TOOLCHAINS: GCC
+ ARCHS: ARM,AARCH64
+ TARGETS: RELEASE,DEBUG
+ SKIP_TESTS: 1
+ SKIP_PACKAGE: 1
+ GCC_ARM_PREFIX: arm-linux-gnueabi-
+ GCC_AARCH64_PREFIX: aarch64-linux-gnu-
+ BUILD_ARGUMENTS: -D EDK2_GCC_NOLTO
+
+ - name: Build ArmPlatformPkg
+ if: always()
+ run: ./efibuild.sh
+ env:
+ SELFPKG: ArmPlatformPkg
+ SELFPKG_DIR: ArmPlatformPkg
+ TOOLCHAINS: GCC
+ ARCHS: ARM,AARCH64
+ TARGETS: RELEASE,DEBUG
+ SKIP_TESTS: 1
+ SKIP_PACKAGE: 1
+ GCC_ARM_PREFIX: arm-linux-gnueabi-
+ GCC_AARCH64_PREFIX: aarch64-linux-gnu-
+ BUILD_ARGUMENTS: -D EDK2_GCC_NOLTO
+
+ - name: Build ArmVirtQemu
+ if: always()
+ run: ./efibuild.sh
+ env:
+ SELFPKG: ArmVirtQemu
+ SELFPKG_DIR: ArmVirtPkg
+ TOOLCHAINS: GCC
+ ARCHS: ARM,AARCH64
+ TARGETS: RELEASE,DEBUG
+ SKIP_TESTS: 1
+ SKIP_PACKAGE: 1
+ GCC_ARM_PREFIX: arm-linux-gnueabi-
+ GCC_AARCH64_PREFIX: aarch64-linux-gnu-
+ BUILD_ARGUMENTS: -D EDK2_GCC_NOLTO
+
+ - name: Prepare artifacts with firmwares
+ if: always()
+ run: |
+ IFS=', ' read -r -a TARGETS <<< "$TARGETS"
+ IFS=', ' read -r -a ARCHS <<< "$ARCHS"
+ for target in "${TARGETS[@]}"; do
+ for arch in "${ARCHS[@]}"; do
+ mkdir -p ./firmware_artifacts/ArmVirtQemu/"$arch"/"$target"_"$TOOLCHAIN"
+ cp ./Build/ArmVirtQemu-"$arch"/"$target"_"$TOOLCHAIN"/FV/QEMU_EFI.fd ./firmware_artifacts/ArmVirtQemu/"$arch"/"$target"_"$TOOLCHAIN"/FW.fd
+ done
+ done
+ env:
+ ARCHS: ARM,AARCH64
+ TARGETS: RELEASE,DEBUG
+ TOOLCHAIN: GCC
+
+ - name: Zip artifacts
+ run: zip GCC_no_lto_artifacts.zip ./firmware_artifacts/* -r
+
+ - name: Upload to Artifacts
+ uses: actions/upload-artifact@v4
+ with:
+ name: GCC Firmware NO_LTO Artifacts
+ path: GCC_no_lto_artifacts.zip
+
+ build-linux-amd:
+ name: Linux GCC AMD
+ runs-on: ubuntu-22.04
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ submodules: recursive
+
+ - name: Use Docker in rootless mode.
+ uses: ScribeMD/rootless-docker@0.2.2
+
+ - name: Build BaseTools
+ run: docker compose run build-package
+ env:
+ SELFPKG: MdePkg
+ SKIP_BUILD: 1
+
+ - name: Build OvmfPkgIa32
+ if: always()
+ run: docker compose run build-package
+ env:
+ SELFPKG: OvmfPkgIa32
+ SELFPKG_DIR: OvmfPkg
+ TOOLCHAINS: GCC
+ ARCHS: IA32
+ TARGETS: RELEASE,DEBUG
+ SKIP_TESTS: 1
+ SKIP_PACKAGE: 1
+ BUILD_ARGUMENTS: -D WINDOWS_10_IA32 -D EDK2_GCC_NOLTO
+
+ - name: Build OvmfPkgX64
+ if: always()
+ run: docker compose run build-package
+ env:
+ SELFPKG: OvmfPkgX64
+ SELFPKG_DIR: OvmfPkg
+ TOOLCHAINS: GCC
+ ARCHS: X64
+ TARGETS: RELEASE,DEBUG
+ SKIP_TESTS: 1
+ SKIP_PACKAGE: 1
+ BUILD_ARGUMENTS: -D EDK2_GCC_NOLTO
+
+ - name: Build OvmfPkgIa32X64
+ if: always()
+ run: docker compose run build-package
+ env:
+ SELFPKG: OvmfPkgIa32X64
+ SELFPKG_DIR: OvmfPkg
+ TOOLCHAINS: GCC
+ ARCHS: X64
+ ARCHS_EXT: IA32
+ TARGETS: RELEASE,DEBUG
+ SKIP_TESTS: 1
+ SKIP_PACKAGE: 1
+ BUILD_ARGUMENTS: -D EDK2_GCC_NOLTO
+
+ - name: Build UefiPayloadPkg with X64 PEI/DXE
+ if: always()
+ run: docker compose run build-package
+ env:
+ SELFPKG: UefiPayloadPkg
+ SELFPKG_DIR: UefiPayloadPkg
+ TOOLCHAINS: GCC
+ ARCHS: X64
+ TARGETS: RELEASE,DEBUG
+ SKIP_TESTS: 1
+ SKIP_PACKAGE: 1
+ BUILD_ARGUMENTS: -D EDK2_GCC_NOLTO
+
+ - name: Build UefiPayloadPkg with Ia32 PEI and X64 DXE
+ if: always()
+ run: docker compose run build-package
+ env:
+ SELFPKG: UefiPayloadPkg
+ SELFPKG_DIR: UefiPayloadPkg
+ TOOLCHAINS: GCC
+ ARCHS: X64
+ ARCHS_EXT: IA32
+ TARGETS: RELEASE,DEBUG
+ SKIP_TESTS: 1
+ SKIP_PACKAGE: 1
+ BUILD_ARGUMENTS: -D EDK2_GCC_NOLTO
+
+ - name: Prepare artifacts with firmwares
+ if: always()
+ run: |
+ IFS=', ' read -r -a TARGETS <<< "$TARGETS"
+ IFS=', ' read -r -a ARCHS <<< "$ARCHS"
+ for target in "${TARGETS[@]}"; do
+ for arch in "${ARCHS[@]}"; do
+ mkdir -p ./firmware_artifacts/Ovmf/"$arch"/"$target"_"$TOOLCHAIN"
+ cp ./Build/Ovmf"$arch"/"$target"_"$TOOLCHAIN"/FV/OVMF.fd ./firmware_artifacts/Ovmf/"$arch"/"$target"_"$TOOLCHAIN"/FW.fd
+ done
+ done
+ env:
+ ARCHS: Ia32,X64,3264
+ TARGETS: RELEASE,DEBUG
+ TOOLCHAIN: GCC
+
+ - name: Zip artifacts
+ run: zip GCC_fw_artifacts.zip ./firmware_artifacts/* -r
+
+ - name: Upload to Artifacts
+ uses: actions/upload-artifact@v4
+ with:
+ name: GCC Firmware Artifacts
+ path: GCC_fw_artifacts.zip
+
+ build-linux-common:
+ name: Linux GCC Common
+ runs-on: ubuntu-22.04
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ submodules: recursive
+
+ - name: Use Docker in rootless mode.
+ uses: ScribeMD/rootless-docker@0.2.2
+
+ - name: Build BaseTools
+ run: docker compose run build-package
+ env:
+ SELFPKG: MdePkg
+ SKIP_BUILD: 1
+
+ - name: Build Ext4Pkg
+ run: docker compose run build-package
+ env:
+ SELFPKG: Ext4Pkg
+ SELFPKG_DIR: Ext4Pkg
+ TOOLCHAINS: GCC
+ ARCHS: IA32,X64
+ TARGETS: RELEASE,DEBUG
+ SKIP_TESTS: 1
+ SKIP_PACKAGE: 1
+ BUILD_ARGUMENTS: -D EDK2_GCC_NOLTO
+
+ - name: Build FatPkg
+ if: always()
+ run: docker compose run build-package
+ env:
+ SELFPKG: FatPkg
+ SELFPKG_DIR: FatPkg
+ TOOLCHAINS: GCC
+ ARCHS: IA32,X64
+ TARGETS: RELEASE,DEBUG
+ SKIP_TESTS: 1
+ SKIP_PACKAGE: 1
+ BUILD_ARGUMENTS: -D EDK2_GCC_NOLTO
+
+ - name: Build IntelFsp2Pkg
+ if: always()
+ run: docker compose run build-package
+ env:
+ SELFPKG: IntelFsp2Pkg
+ SELFPKG_DIR: IntelFsp2Pkg
+ TOOLCHAINS: GCC
+ ARCHS: IA32,X64
+ TARGETS: RELEASE,DEBUG
+ SKIP_TESTS: 1
+ SKIP_PACKAGE: 1
+ BUILD_ARGUMENTS: -D EDK2_GCC_NOLTO
+
+ - name: Build IntelFsp2WrapperPkg
+ if: always()
+ run: docker compose run build-package
+ env:
+ SELFPKG: IntelFsp2WrapperPkg
+ SELFPKG_DIR: IntelFsp2WrapperPkg
+ TOOLCHAINS: GCC
+ ARCHS: IA32,X64
+ TARGETS: RELEASE,DEBUG
+ SKIP_TESTS: 1
+ SKIP_PACKAGE: 1
+ BUILD_ARGUMENTS: -D EDK2_GCC_NOLTO
+
+ - name: Build MdeModulePkg
+ if: always()
+ run: docker compose run build-package
+ env:
+ SELFPKG: MdeModulePkg
+ SELFPKG_DIR: MdeModulePkg
+ TOOLCHAINS: GCC
+ ARCHS: IA32,X64
+ TARGETS: RELEASE,DEBUG
+ SKIP_TESTS: 1
+ SKIP_PACKAGE: 1
+ BUILD_ARGUMENTS: -D EDK2_GCC_NOLTO
+
+ - name: Build MdePkg
+ if: always()
+ run: docker compose run build-package
+ env:
+ SELFPKG: MdePkg
+ SELFPKG_DIR: MdePkg
+ TOOLCHAINS: GCC
+ ARCHS: IA32,X64
+ TARGETS: RELEASE,DEBUG
+ SKIP_TESTS: 1
+ SKIP_PACKAGE: 1
+ BUILD_ARGUMENTS: -D EDK2_GCC_NOLTO
+
+ - name: Build UefiCpuPkg
+ if: always()
+ run: docker compose run build-package
+ env:
+ SELFPKG: UefiCpuPkg
+ SELFPKG_DIR: UefiCpuPkg
+ TOOLCHAINS: GCC
+ ARCHS: IA32,X64
+ TARGETS: RELEASE,DEBUG
+ SKIP_TESTS: 1
+ SKIP_PACKAGE: 1
+ BUILD_ARGUMENTS: -D EDK2_GCC_NOLTO
+
+ - name: Build UnitTestFrameworkPkg
+ if: always()
+ run: docker compose run build-package
+ env:
+ SELFPKG: UnitTestFrameworkPkg
+ SELFPKG_DIR: UnitTestFrameworkPkg
+ TOOLCHAINS: GCC
+ ARCHS: IA32,X64
+ TARGETS: RELEASE,DEBUG
+ SKIP_TESTS: 1
+ SKIP_PACKAGE: 1
+ BUILD_ARGUMENTS: -D EDK2_GCC_NOLTO
+
+ - name: Build NetworkPkg
+ if: always()
+ run: docker compose run build-package
+ env:
+ SELFPKG: NetworkPkg
+ SELFPKG_DIR: NetworkPkg
+ TOOLCHAINS: GCC
+ ARCHS: IA32,X64
+ TARGETS: RELEASE,DEBUG
+ SKIP_TESTS: 1
+ SKIP_PACKAGE: 1
+ BUILD_ARGUMENTS: -D EDK2_GCC_NOLTO
+
+ test-arm:
+ name: Test ARM
+ runs-on: ubuntu-22.04
+ needs: [build-linux-arm]
+
+ strategy:
+ fail-fast: false
+ matrix:
+ package: [
+ {name: "ArmVirtQemu", archs: "ARM,AARCH64", toolchain: "GCC", targets: "RELEASE,DEBUG"},
+ ]
+ steps:
+ - name: Checkout ocbuild repository
+ uses: actions/checkout@v4
+ with:
+ repository: acidanthera/ocbuild
+ ref: master
+ path: ./
+
+ - name: Install dependencies
+ run: |
+ sudo apt-get update
+ sudo apt-get install -y python3 python3-pip libglib2.0-dev libfdt-dev libpixman-1-dev libepoxy-dev libcapstone-dev libsdl2-dev libnuma-dev libgtk-3-dev libvte-2.91-dev libbrlapi-dev libiscsi-dev libnfs-dev librbd-dev libxen-dev
+ python3 -m pip install -r requirements.txt
+
+ - name: Downloading QEMU
+ uses: robinraju/release-downloader@v1.7
+ with:
+ repository: "acidanthera/OcBinaryData"
+ tag: ${{ env.QEMU_VERSION_TAG }}
+ fileName: "qemu.tar.xz"
+
+ - name: Installing QEMU and add to PATH
+ run: |
+ echo "${HOME}/qemu/bin" >> $GITHUB_PATH
+ tar -xJf ./qemu.tar.xz -C $HOME
+
+ - name: Download a single artifact
+ uses: actions/download-artifact@v4
+ with:
+ name: ${{ matrix.package.toolchain }} Firmware NO_LTO Artifacts
+
+ - name: Unzip artifacts
+ run: unzip "$TOOLCHAIN"_no_lto_artifacts.zip
+ env:
+ TOOLCHAIN: ${{ matrix.package.toolchain }}
+
+ - name: Downloading Windows PE AARCH64 iso
+ uses: robinraju/release-downloader@v1.7
+ with:
+ repository: "acidanthera/OcBinaryData"
+ tag: ${{ env.WINPE_VERSION_TAG }}
+ fileName: "winpe_AARCH64.iso"
+
+ - name: Run TestConsole
+ if: always()
+ run: |
+ IFS=', ' read -r -a TARGETS <<< "$TARGETS"
+ IFS=', ' read -r -a ARCHS <<< "$ARCHS"
+ for target in "${TARGETS[@]}"; do
+ for arch in "${ARCHS[@]}"; do
+ echo Checking "$PACKAGE""$arch" "$target"_"$TOOLCHAIN"
+ python3 test_qemu_fw.py ./firmware_artifacts/"$PACKAGE"/"$arch"/"$target"_"$TOOLCHAIN"/FW.fd --fw-arch "$arch"
+ done
+ done
+ env:
+ PACKAGE: ${{ matrix.package.name }}
+ ARCHS: ${{ matrix.package.archs }}
+ TARGETS: ${{ matrix.package.targets }}
+ TOOLCHAIN: ${{ matrix.package.toolchain }}
+
+ - name: Run TestLinux
+ if: always()
+ run: |
+ IFS=', ' read -r -a TARGETS <<< "$TARGETS"
+ IFS=', ' read -r -a ARCHS <<< "$ARCHS"
+ for target in "${TARGETS[@]}"; do
+ for arch in "${ARCHS[@]}"; do
+ echo Checking "$PACKAGE""$arch" "$target"_"$TOOLCHAIN"
+ python3 test_qemu_fw.py ./firmware_artifacts/"$PACKAGE"/"$arch"/"$target"_"$TOOLCHAIN"/FW.fd --test-linux --fw-arch "$arch"
+ done
+ done
+ env:
+ PACKAGE: ${{ matrix.package.name }}
+ ARCHS: ${{ matrix.package.archs }}
+ TARGETS: ${{ matrix.package.targets }}
+ TOOLCHAIN: ${{ matrix.package.toolchain }}
+
+ - name: Run Windows PE aarch64
+ if: always()
+ run: |
+ IFS=', ' read -r -a TARGETS <<< "$TARGETS"
+ IFS=', ' read -r -a ARCHS <<< "$ARCHS"
+ for target in "${TARGETS[@]}"; do
+ echo Checking "$PACKAGE"AARCH64 "$target"_"$TOOLCHAIN"
+ python3 test_qemu_fw.py ./firmware_artifacts/"$PACKAGE"/AARCH64/"$target"_"$TOOLCHAIN"/FW.fd --fw-arch AARCH64 --test-winpe --test-winpe-path ./winpe_AARCH64.iso
+ done
+ env:
+ PACKAGE: ${{ matrix.package.name }}
+ TARGETS: ${{ matrix.package.targets }}
+ TOOLCHAIN: ${{ matrix.package.toolchain }}
+
+ test-amd:
+ name: Test AMD
+ runs-on: ubuntu-22.04
+ needs: [build-linux-amd]
+
+ strategy:
+ fail-fast: false
+ matrix:
+ package: [
+ {name: "Ovmf", archs: "Ia32,X64,3264", toolchain: "GCC", targets: "RELEASE,DEBUG"},
+ ]
+ steps:
+ - name: Checkout ocbuild repository
+ uses: actions/checkout@v4
+ with:
+ repository: acidanthera/ocbuild
+ ref: master
+ path: ./
+
+ - name: Install dependencies
+ run: |
+ sudo apt-get update
+ sudo apt-get install -y python3 python3-pip libglib2.0-dev libfdt-dev libpixman-1-dev libepoxy-dev libcapstone-dev libsdl2-dev libnuma-dev libgtk-3-dev libvte-2.91-dev libbrlapi-dev libiscsi-dev libnfs-dev librbd-dev libxen-dev
+ python3 -m pip install -r requirements.txt
+
+ - name: Downloading QEMU
+ uses: robinraju/release-downloader@v1.7
+ with:
+ repository: "acidanthera/OcBinaryData"
+ tag: ${{ env.QEMU_VERSION_TAG }}
+ fileName: "qemu.tar.xz"
+
+ - name: Installing QEMU and add to PATH
+ run: |
+ echo "${HOME}/qemu/bin" >> $GITHUB_PATH
+ tar -xJf ./qemu.tar.xz -C $HOME
+
+ - name: Download a single artifact
+ uses: actions/download-artifact@v4
+ with:
+ name: ${{ matrix.package.toolchain }} Firmware Artifacts
+
+ - name: Unzip artifacts
+ run: unzip "$TOOLCHAIN"_fw_artifacts.zip
+ env:
+ TOOLCHAIN: ${{ matrix.package.toolchain }}
+
+ - name: Downloading Windows PE X64 iso
+ uses: robinraju/release-downloader@v1.7
+ with:
+ repository: "acidanthera/OcBinaryData"
+ tag: ${{ env.WINPE_VERSION_TAG }}
+ fileName: "winpe_X64.iso"
+
+ - name: Downloading Windows PE IA32 iso
+ uses: robinraju/release-downloader@v1.7
+ with:
+ repository: "acidanthera/OcBinaryData"
+ tag: ${{ env.WINPE_VERSION_TAG }}
+ fileName: "winpe_IA32.iso"
+
+ - name: Run TestConsole
+ if: always()
+ run: |
+ IFS=', ' read -r -a TARGETS <<< "$TARGETS"
+ IFS=', ' read -r -a ARCHS <<< "$ARCHS"
+ for target in "${TARGETS[@]}"; do
+ for arch in "${ARCHS[@]}"; do
+ echo Checking "$PACKAGE""$arch" "$target"_"$TOOLCHAIN"
+ python3 test_qemu_fw.py ./firmware_artifacts/"$PACKAGE"/"$arch"/"$target"_"$TOOLCHAIN"/FW.fd
+ done
+ done
+ env:
+ PACKAGE: ${{ matrix.package.name }}
+ ARCHS: ${{ matrix.package.archs }}
+ TARGETS: ${{ matrix.package.targets }}
+ TOOLCHAIN: ${{ matrix.package.toolchain }}
+
+ - name: Run TestLinux
+ if: always()
+ run: |
+ IFS=', ' read -r -a TARGETS <<< "$TARGETS"
+ IFS=', ' read -r -a ARCHS <<< "$ARCHS"
+ for target in "${TARGETS[@]}"; do
+ for arch in "${ARCHS[@]}"; do
+ echo Checking "$PACKAGE""$arch" "$target"_"$TOOLCHAIN"
+ python3 test_qemu_fw.py ./firmware_artifacts/"$PACKAGE"/"$arch"/"$target"_"$TOOLCHAIN"/FW.fd --test-linux
+ done
+ done
+ env:
+ PACKAGE: ${{ matrix.package.name }}
+ ARCHS: ${{ matrix.package.archs }}
+ TARGETS: ${{ matrix.package.targets }}
+ TOOLCHAIN: ${{ matrix.package.toolchain }}
+
+ - name: Run Windows PE
+ if: always()
+ run: |
+ IFS=', ' read -r -a TARGETS <<< "$TARGETS"
+ IFS=', ' read -r -a ARCHS <<< "$ARCHS"
+ for target in "${TARGETS[@]}"; do
+ for arch in "${ARCHS[@]}"; do
+ if [ "$arch" = "Ia32" ]; then
+ WINPE_FILENAME=winpe_IA32.iso
+ elif [ "$arch" = "X64" ] || [ "$arch" = "3264" ]; then
+ WINPE_FILENAME=winpe_X64.iso
+ fi
+ echo Checking "$PACKAGE""$arch" "$target"_"$TOOLCHAIN"
+ python3 test_qemu_fw.py ./firmware_artifacts/"$PACKAGE"/"$arch"/"$target"_"$TOOLCHAIN"/FW.fd --test-winpe --test-winpe-path "$WINPE_FILENAME"
+ done
+ done
+ env:
+ PACKAGE: ${{ matrix.package.name }}
+ ARCHS: ${{ matrix.package.archs }}
+ TARGETS: ${{ matrix.package.targets }}
+ TOOLCHAIN: ${{ matrix.package.toolchain }}
diff --git a/.github/workflows/build_x86.yaml b/.github/workflows/build_x86.yaml
new file mode 100644
index 0000000000..c7d72fbf40
--- /dev/null
+++ b/.github/workflows/build_x86.yaml
@@ -0,0 +1,680 @@
+name: Build X86 Firmwares
+
+on:
+ push:
+ pull_request:
+ workflow_dispatch:
+ release:
+ types: [published]
+
+env:
+ PROJECT_TYPE: UEFI
+ FORCE_INSTALL: 1
+ WERROR: 1
+ QEMU_VERSION_TAG: qemu-ci-8.1.5-r1
+ WINPE_VERSION_TAG: images-winpe-1.0
+
+jobs:
+ build-macos:
+ name: macOS XCODE5
+ runs-on: macos-latest
+ env:
+ JOB_TYPE: BUILD
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ submodules: recursive
+
+ - name: Add Linux Toolchain
+ run: brew tap FiloSottile/homebrew-musl-cross
+
+ - name: Install Linux Toolchain
+ run: brew install musl-cross
+ env:
+ HOMEBREW_NO_INSTALL_CLEANUP: 1
+ HOMEBREW_NO_AUTO_UPDATE: 1
+
+ - name: Install Dependencies
+ run: brew install openssl mingw-w64
+ env:
+ HOMEBREW_NO_INSTALL_CLEANUP: 1
+ HOMEBREW_NO_AUTO_UPDATE: 1
+
+ - name: CI Bootstrap
+ run: |
+ src=$(/usr/bin/curl -Lfs https://raw.githubusercontent.com/acidanthera/ocbuild/master/ci-bootstrap.sh) && eval "$src" || exit 1
+ touch UDK.ready
+
+ - name: Prepare efibuild.sh
+ run: |
+ curl -o ./efibuild.sh https://raw.githubusercontent.com/acidanthera/ocbuild/master/efibuild.sh || exit 1
+ chmod +x ./efibuild.sh
+ ln -s `pwd` UDK
+
+ - name: Build BaseTools
+ run: ./efibuild.sh
+ env:
+ SELFPKG: MdePkg
+ SKIP_BUILD: 1
+
+ - name: Build OvmfPkgIa32
+ if: always()
+ run: ./efibuild.sh
+ env:
+ SELFPKG: OvmfPkgIa32
+ SELFPKG_DIR: OvmfPkg
+ ARCHS: IA32
+ SKIP_TESTS: 1
+ SKIP_PACKAGE: 1
+ BUILD_ARGUMENTS: -D WINDOWS_10_IA32
+
+ - name: Build OvmfPkgX64
+ if: always()
+ run: ./efibuild.sh
+ env:
+ SELFPKG: OvmfPkgX64
+ SELFPKG_DIR: OvmfPkg
+ ARCHS: X64
+ SKIP_TESTS: 1
+ SKIP_PACKAGE: 1
+
+ - name: Build OvmfPkgIa32X64
+ if: always()
+ run: ./efibuild.sh
+ env:
+ SELFPKG: OvmfPkgIa32X64
+ SELFPKG_DIR: OvmfPkg
+ ARCHS: X64
+ ARCHS_EXT: IA32
+ SKIP_TESTS: 1
+ SKIP_PACKAGE: 1
+
+ - name: Build UefiPayloadPkg with X64 PEI/DXE
+ if: always()
+ run: ./efibuild.sh
+ env:
+ SELFPKG: UefiPayloadPkg
+ ARCHS: X64
+ SKIP_TESTS: 1
+ SKIP_PACKAGE: 1
+
+ - name: Build UefiPayloadPkg with Ia32 PEI and X64 DXE
+ if: always()
+ run: ./efibuild.sh
+ env:
+ SELFPKG: UefiPayloadPkg
+ ARCHS: X64
+ ARCHS_EXT: IA32
+ SKIP_TESTS: 1
+ SKIP_PACKAGE: 1
+
+ - name: Prepare artifacts with firmwares
+ if: always()
+ run: |
+ IFS=', ' read -r -a TARGETS <<< "$TARGETS"
+ IFS=', ' read -r -a ARCHS <<< "$ARCHS"
+ for target in "${TARGETS[@]}"; do
+ for arch in "${ARCHS[@]}"; do
+ mkdir -p ./firmware_artifacts/Ovmf/"$arch"/"$target"_"$TOOLCHAIN"
+ cp ./Build/Ovmf"$arch"/"$target"_"$TOOLCHAIN"/FV/OVMF.fd ./firmware_artifacts/Ovmf/"$arch"/"$target"_"$TOOLCHAIN"/FW.fd
+ done
+ done
+ env:
+ ARCHS: Ia32,X64,3264
+ TARGETS: RELEASE,DEBUG,NOOPT
+ TOOLCHAIN: XCODE5
+
+ - name: Zip artifacts
+ run: zip XCODE5_fw_artifacts.zip ./firmware_artifacts/* -r
+
+ - name: Upload to Artifacts
+ uses: actions/upload-artifact@v4
+ with:
+ name: XCODE5 Firmware Artifacts
+ path: XCODE5_fw_artifacts.zip
+
+ build-windows:
+ name: Windows VS2019
+ runs-on: windows-latest
+ env:
+ CC: gcc
+ defaults:
+ run:
+ shell: bash
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ submodules: recursive
+
+ - name: Install Dependencies
+ run: |
+ choco install make nasm zip iasl --no-progress
+
+ - name: CI Bootstrap
+ run: |
+ src=$(curl -Lfs https://raw.githubusercontent.com/acidanthera/ocbuild/master/ci-bootstrap.sh) && eval "$src" || exit 1
+ touch UDK.ready
+
+ - name: Prepare efibuild.sh
+ run: |
+ curl -o ./efibuild.sh https://raw.githubusercontent.com/acidanthera/ocbuild/master/efibuild.sh || exit 1
+ chmod +x ./efibuild.sh
+ cmd <<< "mklink /D .\\UDK .\\" > /dev/null
+
+ - name: Build BaseTools
+ run: ./efibuild.sh
+ env:
+ SELFPKG: MdePkg
+ SKIP_BUILD: 1
+
+ - name: Build OvmfPkgIa32
+ if: always()
+ run: ./efibuild.sh
+ env:
+ SELFPKG: OvmfPkgIa32
+ SELFPKG_DIR: OvmfPkg
+ ARCHS: IA32
+ SKIP_TESTS: 1
+ SKIP_PACKAGE: 1
+ BUILD_ARGUMENTS: -D WINDOWS_10_IA32
+
+ - name: Build OvmfPkgX64
+ if: always()
+ run: ./efibuild.sh
+ env:
+ SELFPKG: OvmfPkgX64
+ SELFPKG_DIR: OvmfPkg
+ ARCHS: X64
+ SKIP_TESTS: 1
+ SKIP_PACKAGE: 1
+
+ - name: Build OvmfPkgIa32X64
+ if: always()
+ run: ./efibuild.sh
+ env:
+ SELFPKG: OvmfPkgIa32X64
+ SELFPKG_DIR: OvmfPkg
+ ARCHS: X64
+ ARCHS_EXT: IA32
+ SKIP_TESTS: 1
+ SKIP_PACKAGE: 1
+
+ - name: Build UefiPayloadPkg with X64 PEI/DXE
+ if: always()
+ run: ./efibuild.sh
+ env:
+ SELFPKG: UefiPayloadPkg
+ ARCHS: X64
+ SKIP_TESTS: 1
+ SKIP_PACKAGE: 1
+
+ - name: Build UefiPayloadPkg with Ia32 PEI and X64 DXE
+ if: always()
+ run: ./efibuild.sh
+ env:
+ SELFPKG: UefiPayloadPkg
+ ARCHS: X64
+ ARCHS_EXT: IA32
+ SKIP_TESTS: 1
+ SKIP_PACKAGE: 1
+
+ - name: Prepare artifacts with firmwares
+ if: always()
+ run: |
+ IFS=', ' read -r -a TARGETS <<< "$TARGETS"
+ IFS=', ' read -r -a ARCHS <<< "$ARCHS"
+ for target in "${TARGETS[@]}"; do
+ for arch in "${ARCHS[@]}"; do
+ mkdir -p ./firmware_artifacts/Ovmf/"$arch"/"$target"_"$TOOLCHAIN"
+ cp ./Build/Ovmf"$arch"/"$target"_"$TOOLCHAIN"/FV/OVMF.fd ./firmware_artifacts/Ovmf/"$arch"/"$target"_"$TOOLCHAIN"/FW.fd
+ done
+ done
+ env:
+ ARCHS: Ia32,X64,3264
+ TARGETS: RELEASE,DEBUG,NOOPT
+ TOOLCHAIN: VS2019
+
+ - name: Zip artifacts
+ run: zip VS2019_fw_artifacts.zip ./firmware_artifacts/* -r
+
+ - name: Upload to Artifacts
+ uses: actions/upload-artifact@v4
+ with:
+ name: VS2019 Firmware Artifacts
+ path: VS2019_fw_artifacts.zip
+
+ build-linux-clangpdb:
+ name: Linux CLANGPDB
+ runs-on: ubuntu-22.04
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ submodules: recursive
+
+ - name: Use Docker in rootless mode.
+ uses: ScribeMD/rootless-docker@0.2.2
+
+ - name: Build BaseTools
+ run: docker compose run build-package
+ env:
+ SELFPKG: MdePkg
+ SKIP_BUILD: 1
+
+ - name: Build OvmfPkgIa32
+ if: always()
+ run: docker compose run build-package
+ env:
+ SELFPKG: OvmfPkgIa32
+ SELFPKG_DIR: OvmfPkg
+ TOOLCHAINS: CLANGPDB
+ ARCHS: IA32
+ TARGETS: RELEASE,DEBUG,NOOPT
+ SKIP_TESTS: 1
+ SKIP_PACKAGE: 1
+ BUILD_ARGUMENTS: -D WINDOWS_10_IA32
+
+ - name: Build OvmfPkgX64
+ if: always()
+ run: docker compose run build-package
+ env:
+ SELFPKG: OvmfPkgX64
+ SELFPKG_DIR: OvmfPkg
+ TOOLCHAINS: CLANGPDB
+ ARCHS: X64
+ TARGETS: RELEASE,DEBUG,NOOPT
+ SKIP_TESTS: 1
+ SKIP_PACKAGE: 1
+
+ - name: Build OvmfPkgIa32X64
+ if: always()
+ run: docker compose run build-package
+ env:
+ SELFPKG: OvmfPkgIa32X64
+ SELFPKG_DIR: OvmfPkg
+ TOOLCHAINS: CLANGPDB
+ ARCHS: X64
+ ARCHS_EXT: IA32
+ TARGETS: RELEASE,DEBUG,NOOPT
+ SKIP_TESTS: 1
+ SKIP_PACKAGE: 1
+
+ - name: Build UefiPayloadPkg with X64 PEI/DXE
+ if: always()
+ run: docker compose run build-package
+ env:
+ SELFPKG: UefiPayloadPkg
+ SELFPKG_DIR: UefiPayloadPkg
+ TOOLCHAINS: CLANGPDB
+ ARCHS: X64
+ TARGETS: RELEASE,DEBUG,NOOPT
+ SKIP_TESTS: 1
+ SKIP_PACKAGE: 1
+
+ - name: Build UefiPayloadPkg with Ia32 PEI and X64 DXE
+ if: always()
+ run: docker compose run build-package
+ env:
+ SELFPKG: UefiPayloadPkg
+ SELFPKG_DIR: UefiPayloadPkg
+ TOOLCHAINS: CLANGPDB
+ ARCHS: X64
+ ARCHS_EXT: IA32
+ TARGETS: RELEASE,DEBUG,NOOPT
+ SKIP_TESTS: 1
+ SKIP_PACKAGE: 1
+
+ - name: Prepare artifacts with firmwares
+ if: always()
+ run: |
+ IFS=', ' read -r -a TARGETS <<< "$TARGETS"
+ IFS=', ' read -r -a ARCHS <<< "$ARCHS"
+ for target in "${TARGETS[@]}"; do
+ for arch in "${ARCHS[@]}"; do
+ mkdir -p ./firmware_artifacts/Ovmf/"$arch"/"$target"_"$TOOLCHAIN"
+ cp ./Build/Ovmf"$arch"/"$target"_"$TOOLCHAIN"/FV/OVMF.fd ./firmware_artifacts/Ovmf/"$arch"/"$target"_"$TOOLCHAIN"/FW.fd
+ done
+ done
+ env:
+ ARCHS: Ia32,X64,3264
+ TARGETS: RELEASE,DEBUG,NOOPT
+ TOOLCHAIN: CLANGPDB
+
+ - name: Zip artifacts
+ run: zip CLANGPDB_fw_artifacts.zip ./firmware_artifacts/* -r
+
+ - name: Upload to Artifacts
+ uses: actions/upload-artifact@v4
+ with:
+ name: CLANGPDB Firmware Artifacts
+ path: CLANGPDB_fw_artifacts.zip
+
+ build-linux-clangdwarf:
+ name: Linux CLANGDWARF
+ runs-on: ubuntu-22.04
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ submodules: recursive
+
+ - name: Use Docker in rootless mode.
+ uses: ScribeMD/rootless-docker@0.2.2
+
+ - name: Build BaseTools
+ run: docker compose run build-package
+ env:
+ SELFPKG: MdePkg
+ SKIP_BUILD: 1
+
+ - name: Build OvmfPkgIa32
+ if: always()
+ run: docker compose run build-package
+ env:
+ SELFPKG: OvmfPkgIa32
+ SELFPKG_DIR: OvmfPkg
+ TOOLCHAINS: CLANGDWARF
+ ARCHS: IA32
+ TARGETS: RELEASE,DEBUG,NOOPT
+ SKIP_TESTS: 1
+ SKIP_PACKAGE: 1
+ BUILD_ARGUMENTS: -D WINDOWS_10_IA32
+
+ - name: Build OvmfPkgX64
+ if: always()
+ run: docker compose run build-package
+ env:
+ SELFPKG: OvmfPkgX64
+ SELFPKG_DIR: OvmfPkg
+ TOOLCHAINS: CLANGDWARF
+ ARCHS: X64
+ TARGETS: RELEASE,DEBUG,NOOPT
+ SKIP_TESTS: 1
+ SKIP_PACKAGE: 1
+
+ - name: Build OvmfPkgIa32X64
+ if: always()
+ run: docker compose run build-package
+ env:
+ SELFPKG: OvmfPkgIa32X64
+ SELFPKG_DIR: OvmfPkg
+ TOOLCHAINS: CLANGDWARF
+ ARCHS: X64
+ ARCHS_EXT: IA32
+ TARGETS: RELEASE,DEBUG,NOOPT
+ SKIP_TESTS: 1
+ SKIP_PACKAGE: 1
+
+ - name: Build UefiPayloadPkg with X64 PEI/DXE
+ if: always()
+ run: docker compose run build-package
+ env:
+ SELFPKG: UefiPayloadPkg
+ SELFPKG_DIR: UefiPayloadPkg
+ TOOLCHAINS: CLANGDWARF
+ ARCHS: X64
+ TARGETS: RELEASE,DEBUG,NOOPT
+ SKIP_TESTS: 1
+ SKIP_PACKAGE: 1
+
+ - name: Build UefiPayloadPkg with Ia32 PEI and X64 DXE
+ if: always()
+ run: docker compose run build-package
+ env:
+ SELFPKG: UefiPayloadPkg
+ SELFPKG_DIR: UefiPayloadPkg
+ TOOLCHAINS: CLANGDWARF
+ ARCHS: X64
+ ARCHS_EXT: IA32
+ TARGETS: RELEASE,DEBUG,NOOPT
+ SKIP_TESTS: 1
+ SKIP_PACKAGE: 1
+
+ - name: Prepare artifacts with firmwares
+ if: always()
+ run: |
+ IFS=', ' read -r -a TARGETS <<< "$TARGETS"
+ IFS=', ' read -r -a ARCHS <<< "$ARCHS"
+ for target in "${TARGETS[@]}"; do
+ for arch in "${ARCHS[@]}"; do
+ mkdir -p ./firmware_artifacts/Ovmf/"$arch"/"$target"_"$TOOLCHAIN"
+ cp ./Build/Ovmf"$arch"/"$target"_"$TOOLCHAIN"/FV/OVMF.fd ./firmware_artifacts/Ovmf/"$arch"/"$target"_"$TOOLCHAIN"/FW.fd
+ done
+ done
+ env:
+ ARCHS: Ia32,X64,3264
+ TARGETS: RELEASE,DEBUG,NOOPT
+ TOOLCHAIN: CLANGDWARF
+
+ - name: Zip artifacts
+ run: zip CLANGDWARF_fw_artifacts.zip ./firmware_artifacts/* -r
+
+ - name: Upload to Artifacts
+ uses: actions/upload-artifact@v4
+ with:
+ name: CLANGDWARF Firmware Artifacts
+ path: CLANGDWARF_fw_artifacts.zip
+
+ build-linux-gcc5:
+ name: Linux GCC5
+ runs-on: ubuntu-22.04
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ submodules: recursive
+
+ - name: Use Docker in rootless mode.
+ uses: ScribeMD/rootless-docker@0.2.2
+
+ - name: Build BaseTools
+ run: docker compose run build-package
+ env:
+ SELFPKG: MdePkg
+ SKIP_BUILD: 1
+
+ - name: Build OvmfPkgIa32
+ if: always()
+ run: docker compose run build-package
+ env:
+ SELFPKG: OvmfPkgIa32
+ SELFPKG_DIR: OvmfPkg
+ TOOLCHAINS: GCC5
+ ARCHS: IA32
+ TARGETS: RELEASE,DEBUG,NOOPT
+ SKIP_TESTS: 1
+ SKIP_PACKAGE: 1
+ BUILD_ARGUMENTS: -D WINDOWS_10_IA32
+
+ - name: Build OvmfPkgX64
+ if: always()
+ run: docker compose run build-package
+ env:
+ SELFPKG: OvmfPkgX64
+ SELFPKG_DIR: OvmfPkg
+ TOOLCHAINS: GCC5
+ ARCHS: X64
+ TARGETS: RELEASE,DEBUG,NOOPT
+ SKIP_TESTS: 1
+ SKIP_PACKAGE: 1
+
+ - name: Build OvmfPkgIa32X64
+ if: always()
+ run: docker compose run build-package
+ env:
+ SELFPKG: OvmfPkgIa32X64
+ SELFPKG_DIR: OvmfPkg
+ TOOLCHAINS: GCC5
+ ARCHS: X64
+ ARCHS_EXT: IA32
+ TARGETS: RELEASE,DEBUG,NOOPT
+ SKIP_TESTS: 1
+ SKIP_PACKAGE: 1
+
+ - name: Build UefiPayloadPkg with X64 PEI/DXE
+ if: always()
+ run: docker compose run build-package
+ env:
+ SELFPKG: UefiPayloadPkg
+ SELFPKG_DIR: UefiPayloadPkg
+ TOOLCHAINS: GCC5
+ ARCHS: X64
+ TARGETS: RELEASE,DEBUG,NOOPT
+ SKIP_TESTS: 1
+ SKIP_PACKAGE: 1
+
+ - name: Build UefiPayloadPkg with Ia32 PEI and X64 DXE
+ if: always()
+ run: docker compose run build-package
+ env:
+ SELFPKG: UefiPayloadPkg
+ SELFPKG_DIR: UefiPayloadPkg
+ TOOLCHAINS: GCC5
+ ARCHS: X64
+ ARCHS_EXT: IA32
+ TARGETS: RELEASE,DEBUG,NOOPT
+ SKIP_TESTS: 1
+ SKIP_PACKAGE: 1
+
+ - name: Prepare artifacts with firmwares
+ if: always()
+ run: |
+ IFS=', ' read -r -a TARGETS <<< "$TARGETS"
+ IFS=', ' read -r -a ARCHS <<< "$ARCHS"
+ for target in "${TARGETS[@]}"; do
+ for arch in "${ARCHS[@]}"; do
+ mkdir -p ./firmware_artifacts/Ovmf/"$arch"/"$target"_"$TOOLCHAIN"
+ cp ./Build/Ovmf"$arch"/"$target"_"$TOOLCHAIN"/FV/OVMF.fd ./firmware_artifacts/Ovmf/"$arch"/"$target"_"$TOOLCHAIN"/FW.fd
+ done
+ done
+ env:
+ ARCHS: Ia32,X64,3264
+ TARGETS: RELEASE,DEBUG,NOOPT
+ TOOLCHAIN: GCC5
+
+ - name: Zip artifacts
+ run: zip GCC5_fw_artifacts.zip ./firmware_artifacts/* -r
+
+ - name: Upload to Artifacts
+ uses: actions/upload-artifact@v4
+ with:
+ name: GCC5 Firmware Artifacts
+ path: GCC5_fw_artifacts.zip
+
+ test-firmwares:
+ name: Test
+ runs-on: ubuntu-22.04
+ needs: [build-macos, build-windows, build-linux-clangpdb, build-linux-clangdwarf, build-linux-gcc5]
+
+ strategy:
+ fail-fast: false
+ matrix:
+ package: [
+ {name: "Ovmf", archs: "Ia32,X64,3264", toolchain: "XCODE5", targets: "RELEASE,DEBUG,NOOPT"},
+ {name: "Ovmf", archs: "Ia32,X64,3264", toolchain: "VS2019", targets: "RELEASE,DEBUG,NOOPT"},
+ {name: "Ovmf", archs: "Ia32,X64,3264", toolchain: "CLANGPDB", targets: "RELEASE,DEBUG,NOOPT"},
+ {name: "Ovmf", archs: "Ia32,X64,3264", toolchain: "CLANGDWARF", targets: "RELEASE,DEBUG,NOOPT"},
+ {name: "Ovmf", archs: "Ia32,X64,3264", toolchain: "GCC5", targets: "RELEASE,DEBUG,NOOPT"},
+ ]
+ steps:
+ - name: Checkout ocbuild repository
+ uses: actions/checkout@v4
+ with:
+ repository: acidanthera/ocbuild
+ ref: master
+ path: ./
+
+ - name: Install dependencies
+ run: |
+ sudo apt-get update
+ sudo apt-get install -y python3 python3-pip libglib2.0-dev libfdt-dev libpixman-1-dev libepoxy-dev libcapstone-dev libsdl2-dev libnuma-dev libgtk-3-dev libvte-2.91-dev libbrlapi-dev libiscsi-dev libnfs-dev librbd-dev libxen-dev
+ python3 -m pip install -r requirements.txt
+
+ - name: Downloading QEMU
+ uses: robinraju/release-downloader@v1.7
+ with:
+ repository: "acidanthera/OcBinaryData"
+ tag: ${{ env.QEMU_VERSION_TAG }}
+ fileName: "qemu.tar.xz"
+
+ - name: Installing QEMU and add to PATH
+ run: |
+ echo "${HOME}/qemu/bin" >> $GITHUB_PATH
+ tar -xJf ./qemu.tar.xz -C $HOME
+
+ - name: Download a single artifact
+ uses: actions/download-artifact@v4
+ with:
+ name: ${{ matrix.package.toolchain }} Firmware Artifacts
+
+ - name: Unzip artifacts
+ run: unzip "$TOOLCHAIN"_fw_artifacts.zip
+ env:
+ TOOLCHAIN: ${{ matrix.package.toolchain }}
+
+ - name: Downloading Windows PE X64 iso
+ uses: robinraju/release-downloader@v1.7
+ with:
+ repository: "acidanthera/OcBinaryData"
+ tag: ${{ env.WINPE_VERSION_TAG }}
+ fileName: "winpe_X64.iso"
+
+ - name: Downloading Windows PE IA32 iso
+ uses: robinraju/release-downloader@v1.7
+ with:
+ repository: "acidanthera/OcBinaryData"
+ tag: ${{ env.WINPE_VERSION_TAG }}
+ fileName: "winpe_IA32.iso"
+
+ - name: Run TestConsole
+ if: always()
+ run: |
+ IFS=', ' read -r -a TARGETS <<< "$TARGETS"
+ IFS=', ' read -r -a ARCHS <<< "$ARCHS"
+ for target in "${TARGETS[@]}"; do
+ for arch in "${ARCHS[@]}"; do
+ echo Checking "$PACKAGE""$arch" "$target"_"$TOOLCHAIN"
+ python3 test_qemu_fw.py ./firmware_artifacts/"$PACKAGE"/"$arch"/"$target"_"$TOOLCHAIN"/FW.fd
+ done
+ done
+ env:
+ PACKAGE: ${{ matrix.package.name }}
+ ARCHS: ${{ matrix.package.archs }}
+ TARGETS: ${{ matrix.package.targets }}
+ TOOLCHAIN: ${{ matrix.package.toolchain }}
+
+ - name: Run TestLinux
+ if: always()
+ run: |
+ IFS=', ' read -r -a TARGETS <<< "$TARGETS"
+ IFS=', ' read -r -a ARCHS <<< "$ARCHS"
+ for target in "${TARGETS[@]}"; do
+ for arch in "${ARCHS[@]}"; do
+ echo Checking "$PACKAGE""$arch" "$target"_"$TOOLCHAIN"
+ python3 test_qemu_fw.py ./firmware_artifacts/"$PACKAGE"/"$arch"/"$target"_"$TOOLCHAIN"/FW.fd --test-linux
+ done
+ done
+ env:
+ PACKAGE: ${{ matrix.package.name }}
+ ARCHS: ${{ matrix.package.archs }}
+ TARGETS: ${{ matrix.package.targets }}
+ TOOLCHAIN: ${{ matrix.package.toolchain }}
+
+ - name: Run Windows PE
+ if: always()
+ run: |
+ IFS=', ' read -r -a TARGETS <<< "$TARGETS"
+ IFS=', ' read -r -a ARCHS <<< "$ARCHS"
+ for target in "${TARGETS[@]}"; do
+ for arch in "${ARCHS[@]}"; do
+ if [ "$arch" = "Ia32" ]; then
+ WINPE_FILENAME=winpe_IA32.iso
+ elif [ "$arch" = "X64" ] || [ "$arch" = "3264" ]; then
+ WINPE_FILENAME=winpe_X64.iso
+ fi
+ echo Checking "$PACKAGE""$arch" "$target"_"$TOOLCHAIN"
+ python3 test_qemu_fw.py ./firmware_artifacts/"$PACKAGE"/"$arch"/"$target"_"$TOOLCHAIN"/FW.fd --test-winpe --test-winpe-path "$WINPE_FILENAME"
+ done
+ done
+ env:
+ PACKAGE: ${{ matrix.package.name }}
+ ARCHS: ${{ matrix.package.archs }}
+ TARGETS: ${{ matrix.package.targets }}
+ TOOLCHAIN: ${{ matrix.package.toolchain }}
diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml
index e0c5f69f6c..2c90eedf0f 100644
--- a/.github/workflows/codeql.yml
+++ b/.github/workflows/codeql.yml
@@ -35,44 +35,28 @@ jobs:
fail-fast: false
matrix:
include:
- - Package: "ArmPkg"
- ArchList: "IA32,X64"
- - Package: "CryptoPkg"
- ArchList: "IA32"
- - Package: "CryptoPkg"
- ArchList: "X64"
- - Package: "DynamicTablesPkg"
+ - Package: "Ext4Pkg"
ArchList: "IA32,X64"
- Package: "FatPkg"
ArchList: "IA32,X64"
- - Package: "FmpDevicePkg"
- ArchList: "IA32,X64"
- Package: "IntelFsp2Pkg"
ArchList: "IA32,X64"
- Package: "IntelFsp2WrapperPkg"
ArchList: "IA32,X64"
- Package: "MdeModulePkg"
- ArchList: "IA32"
- - Package: "MdeModulePkg"
- ArchList: "X64"
+ ArchList: "IA32,X64"
- Package: "MdePkg"
ArchList: "IA32,X64"
- - Package: "PcAtChipsetPkg"
- ArchList: "IA32,X64"
- - Package: "PrmPkg"
- ArchList: "IA32,X64"
- - Package: "SecurityPkg"
- ArchList: "IA32,X64"
- - Package: "ShellPkg"
- ArchList: "IA32,X64"
- - Package: "SourceLevelDebugPkg"
- ArchList: "IA32,X64"
- - Package: "StandaloneMmPkg"
- ArchList: "IA32,X64"
- Package: "UefiCpuPkg"
ArchList: "IA32,X64"
- Package: "UnitTestFrameworkPkg"
ArchList: "IA32,X64"
+ - Package: "OvmfPkg"
+ ArchList: "IA32,X64"
+ - Package: "UefiPayloadPkg"
+ ArchList: "IA32,X64"
+ - Package: "NetworkPkg"
+ ArchList: "IA32,X64"
steps:
- name: Checkout repository
@@ -269,7 +253,7 @@ jobs:
- name: CI Build
env:
STUART_CODEQL_PATH: ${{ steps.cache_key_gen.outputs.codeql_cli_ext_dep_dir }}
- run: stuart_ci_build -c .pytool/CISettings.py -t DEBUG -p ${{ matrix.Package }} -a ${{ matrix.ArchList }} TOOL_CHAIN_TAG=VS2019 --codeql
+ run: stuart_ci_build -c .pytool/CISettings.py -t DEBUG -p ${{ matrix.Package }} -a ${{ matrix.ArchList }} TOOL_CHAIN_TAG=VS2019 --codeql --npt
- name: Build Cleanup
id: build_cleanup
diff --git a/.pytool/CISettings.py b/.pytool/CISettings.py
index 314758da32..e7428a7882 100644
--- a/.pytool/CISettings.py
+++ b/.pytool/CISettings.py
@@ -80,6 +80,7 @@ class Settings(CiBuildSettingsManager, UpdateSettingsManager, SetupSettingsManag
"DynamicTablesPkg",
"EmbeddedPkg",
"EmulatorPkg",
+ "Ext4Pkg",
"IntelFsp2Pkg",
"IntelFsp2WrapperPkg",
"MdePkg",
@@ -239,6 +240,8 @@ class Settings(CiBuildSettingsManager, UpdateSettingsManager, SetupSettingsManag
"CryptoPkg/Library/MbedTlsLib/mbedtls", False))
rs.append(RequiredSubmodule(
"SecurityPkg/DeviceSecurity/SpdmLib/libspdm", False))
+ rs.append(RequiredSubmodule(
+ "OpenCorePkg", False))
return rs
def GetName(self):
diff --git a/Ext4Pkg/Ext4Pkg.ci.yaml b/Ext4Pkg/Ext4Pkg.ci.yaml
new file mode 100644
index 0000000000..81c7694c5f
--- /dev/null
+++ b/Ext4Pkg/Ext4Pkg.ci.yaml
@@ -0,0 +1,65 @@
+## @file
+# CI configuration for Ext4Pkg
+#
+# Copyright (c) Microsoft Corporation
+# Copyright (c) 2020, Intel Corporation. All rights reserved.
+# SPDX-License-Identifier: BSD-2-Clause-Patent
+##
+{
+ "LicenseCheck": {
+ "IgnoreFiles": []
+ },
+ "EccCheck": {
+ ## Exception sample looks like below:
+ ## "ExceptionList": [
+ ## "", ""
+ ## ]
+ "ExceptionList": [
+ ],
+ ## Both file path and directory path are accepted.
+ "IgnoreFiles": [
+ ]
+ },
+ "CompilerPlugin": {
+ "DscPath": "Ext4Pkg.dsc"
+ },
+ "CharEncodingCheck": {
+ "IgnoreFiles": []
+ },
+ "DependencyCheck": {
+ "AcceptableDependencies": [
+ "MdePkg/MdePkg.dec",
+ "MdeModulePkg/MdeModulePkg.dec",
+ ],
+ # For host based unit tests
+ "AcceptableDependencies-HOST_APPLICATION":[],
+ # For UEFI shell based apps
+ "AcceptableDependencies-UEFI_APPLICATION":[],
+ "IgnoreInf": []
+ },
+ "DscCompleteCheck": {
+ "IgnoreInf": [],
+ "DscPath": "Ext4Pkg.dsc"
+ },
+ "GuidCheck": {
+ "IgnoreGuidName": [],
+ "IgnoreGuidValue": [],
+ "IgnoreFoldersAndFiles": []
+ },
+ "LibraryClassCheck": {
+ "IgnoreHeaderFile": []
+ },
+ "SpellCheck": {
+ "ExtendWords": [
+ "ELTORITO",
+ "FHAND",
+ "IFILE",
+ "OFILE",
+ "FDISKed",
+ "Lfnbuffer",
+ "FFFFFFFFL",
+ "CDVOL",
+ "DMDEPKG"
+ ]
+ }
+}
diff --git a/docker-compose.yaml b/docker-compose.yaml
new file mode 100755
index 0000000000..1d2b6adde7
--- /dev/null
+++ b/docker-compose.yaml
@@ -0,0 +1,13 @@
+name: audk
+services:
+ build-package:
+ extends:
+ service: dev-edk2
+ file: OpenCorePkg/docker-compose.yaml
+ environment:
+ - SELFPKG
+ - SELFPKG_DIR
+ entrypoint:
+ - /bin/bash
+ - -c
+ - "{ . ~/.edk2_rc.sh && eval \"$(/usr/bin/curl -Lfs https://raw.githubusercontent.com/acidanthera/ocbuild/master/ci-bootstrap.sh)\" && curl -o ./efibuild.sh \"https://raw.githubusercontent.com/acidanthera/ocbuild/master/efibuild.sh\" && rm -f UDK && ln -s `pwd` UDK && touch UDK.ready && . ./efibuild.sh; } || exit 1"