Skip to content

Add support for iPXE and make Dasharo netwok boot menu work #76

Add support for iPXE and make Dasharo netwok boot menu work

Add support for iPXE and make Dasharo netwok boot menu work #76

Workflow file for this run

name: Check EDK2 QEMU Build
on:
push:
branches:
- dasharo
tags:
- 'dasharo_qemu_v*'
pull_request:
branches:
- dasharo
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2
with:
submodules: 'recursive' # Checkout submodules recursively.
- name: Clone edk2-platforms Repository
run: |
git clone https://github.com/Dasharo/edk2-platforms.git && \
cd edk2-platforms && \
git checkout 3323ed481d35096fb6a7eae7b49f35eff00f86cf && \
cd -
- name: Clone iPXE Repository
run: |
git clone https://git.ipxe.org/ipxe.git && \
cd ipxe && \
git checkout 4bffe0f0d9d0e1496ae5cfb7579e813277c29b0f && \
sed -i 's|//#define\s*IMAGE_SCRIPT.*|#define IMAGE_SCRIPT|' "src/config/general.h" && \
sed -i 's|.*DOWNLOAD_PROTO_HTTPS|#define DOWNLOAD_PROTO_HTTPS|g' "src/config/general.h" && \
wget https://raw.githubusercontent.com/Dasharo/dasharo-blobs/main/dasharo/dasharo.ipxe
- name: Build iPXE
run: |
docker run --rm -i -v $PWD:/home/coreboot/ipxe:rw \
-v $PWD/../.github:/home/coreboot/ipxe/.github \
-u $(id -u):$(id -g) -w /home/coreboot/ipxe \
coreboot/coreboot-sdk:2021-09-23_b0d87f753c \
./.github/scripts/build-ipxe.sh
- name: Build OVMF Firmware Image
run: |
docker run --rm -i -v $PWD:/home/coreboot/coreboot:rw \
-u $(id -u):$(id -g) -w /home/coreboot/coreboot \
coreboot/coreboot-sdk:2021-09-23_b0d87f753c \
./.github/scripts/build-qemu.sh
- name: Check RELEASE build Artifacts
run: |
if [ -f "Build/OvmfX64/RELEASE_GCC5/FV/OVMF_CODE.fd" ] && [ -f "Build/OvmfX64/RELEASE_GCC5/FV/OVMF_VARS.fd" ]; then
echo "RELEASE build successful. OVMF firmware image files found."
cp Build/OvmfX64/RELEASE_GCC5/FV/OVMF_CODE.fd OVMF_CODE_RELEASE.fd
cp Build/OvmfX64/RELEASE_GCC5/FV/OVMF_VARS.fd OVMF_VARS_RELEASE.fd
else
echo "RELEASE build failed. OVMF firmware image files not found."
exit 1
fi
- name: Check DEBUG build Artifacts
run: |
if [ -f "Build/OvmfX64/DEBUG_GCC5/FV/OVMF_CODE.fd" ] && [ -f "Build/OvmfX64/DEBUG_GCC5/FV/OVMF_VARS.fd" ]; then
echo "DEBUG build successful. OVMF firmware image files found."
cp Build/OvmfX64/DEBUG_GCC5/FV/OVMF_CODE.fd OVMF_CODE_DEBUG.fd
cp Build/OvmfX64/DEBUG_GCC5/FV/OVMF_VARS.fd OVMF_VARS_DEBUG.fd
else
echo "DEBUG build failed. OVMF firmware image files not found."
exit 1
fi
- name: Upload Artifacts
uses: actions/upload-artifact@v2
with:
name: ovmf-artifacts # Name for the artifact
path: |
OVMF_CODE_RELEASE.fd
OVMF_VARS_RELEASE.fd
OVMF_CODE_DEBUG.fd
OVMF_VARS_DEBUG.fd
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
if: startsWith(github.event.ref, 'refs/tags/dasharo_qemu')
with:
files: |
OVMF_CODE_RELEASE.fd
OVMF_VARS_RELEASE.fd
OVMF_CODE_DEBUG.fd
OVMF_VARS_DEBUG.fd