Skip to content

Commit

Permalink
refactor: move OVMF out of repo
Browse files Browse the repository at this point in the history
  • Loading branch information
natesales committed Dec 13, 2024
1 parent b5863d5 commit 3ef10e4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 23 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,22 @@ jobs:

- name: Install build dependencies
run: |
sudo apt install -y pipx ubuntu-keyring debian-archive-keyring gcc build-essential uuid-dev iasl nasm mtools make jq
sudo apt install -y pipx ubuntu-keyring debian-archive-keyring make jq
pipx install git+https://github.com/systemd/mkosi.git
pipx install sev-snp-measure
- name: Build OVMF
run: |
make ovmf
- name: Build image
run: |
mkosi --image-version ${{ github.ref }}
mkdir upload
mv tinfoilcvm.raw upload/tinfoil-cvm-base-${{ github.ref_name }}.img
sha256sum upload/tinfoil-cvm-base-${{ github.ref_name }}.img > upload/tinfoil-cvm-base-${{ github.ref_name }}.img.sha256
- name: Fetch OVMF
run: |
LATEST_OVMF_TAG=$(curl -s "https://api.github.com/repos/tinfoilanalytics/AMDSEV/releases/latest" | jq -r .tag_name)
wget https://github.com/tinfoilanalytics/AMDSEV/releases/download/$LATEST_OVMF_TAG/OVMF.fd
- name: Measure image
run: |
make measure > upload/tinfoil-cvm-base-${{ github.ref_name }}.measurement.json
Expand Down Expand Up @@ -77,5 +78,4 @@ jobs:
files: |
upload/tinfoil-cvm-base-${{ github.ref_name }}.measurement.json
upload/tinfoil-cvm-base-${{ github.ref_name }}.img.sha256
OVFM.fd
body: ${{ steps.generate-release-notes.outputs.release-notes }}
17 changes: 0 additions & 17 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,6 @@ console-bios:
-bios /usr/share/ovmf/OVMF.fd \
-nographic

ovmf:
rm -rf amdsev && git clone https://github.com/amdese/amdsev -b snp-latest

sudo ln -s /usr/bin/python3 /usr/bin/python || true

sed -i 's/OvmfPkgX64.dsc/AmdSev\/AmdSevX64.dsc/' amdsev/common.sh
sed -i 's/.*run_cmd cp -f Build\/OvmfX64\/DEBUG_.*//g' amdsev/common.sh

sed -i '/git submodule update --init --recursive/i\git rm -rf UnitTestFrameworkPkg' amdsev/common.sh

# https://github.com/kata-containers/kata-containers/blob/CCv0/tools/packaging/static-build/ovmf/build-ovmf.sh#L54
sed -i '/git submodule update --init --recursive/i\touch OvmfPkg/AmdSev/Grub/grub.efi' amdsev/common.sh

cd amdsev && ./build.sh ovmf

mv amdsev/ovmf/Build/AmdSev/DEBUG_GCC5/FV/OVMF.fd .

measure:
@MEASUREMENT=$$(sev-snp-measure \
--mode snp \
Expand Down

0 comments on commit 3ef10e4

Please sign in to comment.