Skip to content

Commit

Permalink
.github/{scripts,worflows}: add support to build ipxe.efi
Browse files Browse the repository at this point in the history
Add support to build ipxe.efi and use it in Dasharo (UEFI) build for
QEMU Q35.

Signed-off-by: Piotr Król <[email protected]>
  • Loading branch information
pietrushnic committed Oct 23, 2023
1 parent 689d3fc commit bcc97a6
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/scripts/build-ipxe.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bash

export CROSS_COMPILE="x86_64-elf-"
make -C src bin-x86_64-efi-sb/ipxe.efi EMBED=$PWD/dasharo.ipxe BUILD_ID_CMD="echo 0x1234567890" \
EXTRA_CFLAGS="-Wno-address-of-packed-member -m64 -fuse-ld=bfd \
-Wl,--build-id=none -fno-delete-null-pointer-checks -Wlogical-op -march=nocona \
-malign-data=abi -mcmodel=large -mno-red-zone -fno-pic"

1 change: 1 addition & 0 deletions .github/scripts/build-qemu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ source ./edksetup.sh

export EDK2_PLATFORMS_PATH="$WORKSPACE/edk2-platforms"
export PACKAGES_PATH="$WORKSPACE:\
$WORKSPACE/ipxe/src/bin-x86_64-efi-sb:\
$EDK2_PLATFORMS_PATH/Platform/Intel:\
$EDK2_PLATFORMS_PATH/Silicon/Intel:\
$EDK2_PLATFORMS_PATH/Features/Intel:\
Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,24 @@ jobs:
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 && \
cd -
- name: Build iPXE
run: |
docker run --rm -i -v $PWD/ipxe:/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 \
Expand Down

0 comments on commit bcc97a6

Please sign in to comment.