Skip to content

Commit

Permalink
mkosi: dev-fedora: Install edk2-arm on aarch64
Browse files Browse the repository at this point in the history
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
  • Loading branch information
nathanchance committed Jan 8, 2025
1 parent 297cc6d commit 0b71b39
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions mkosi/dev-fedora/mkosi.postinst.d/00-install-edk2-arm.fish.chroot
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/usr/bin/env fish
# Description: Download and install edk2-arm from Debian, as the Fedora package was sunset:
# https://src.fedoraproject.org/rpms/edk2/c/53fa21dafcef14a7d264a89c2977cdbef58df770

if test "$ARCHITECTURE" != arm64
return 0
end

set edk2_ver (curl -fLSs 'https://salsa.debian.org/qemu-team/edk2/-/raw/debian/latest/debian/changelog?ref_type=heads' | string match -gr '^edk2 \((.*)\) unstable;' | head -1)
or return
set edk2_deb qemu-efi-arm_"$edk2_ver"_all.deb

set workdir (mktemp -d)
and curl -fLSso $workdir/$edk2_deb http://http.us.debian.org/debian/pool/main/e/edk2/$edk2_deb
and ar x --output $workdir $workdir/$edk2_deb
and tar -C $workdir -xJf $workdir/data.tar.xz
and install -Dvm644 $workdir/usr/share/AAVMF/AAVMF32_CODE.fd /usr/share/edk2/arm/QEMU_EFI.fd
and rm -fr $workdir

0 comments on commit 0b71b39

Please sign in to comment.