Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

qemu: revert "update EFI image to fix an issue on Apple M3" #155469

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 1 addition & 25 deletions Formula/q/qemu.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class Qemu < Formula
url "https://download.qemu.org/qemu-8.1.3.tar.xz"
sha256 "43cc176804105586f74f90398f34e9f85787dff400d3b640d81f7779fbe265bb"
license "GPL-2.0-only"
revision 1
revision 2
head "https://git.qemu.org/git/qemu.git", branch: "master"

livecheck do
Expand Down Expand Up @@ -62,19 +62,6 @@ class Qemu < Formula
sha256 "81237c7b42dc0ffc8b32a2f5734e3480a3f9a470c50c14a9c4576a2561a35807"
end

# The default EFI image included in QEMU 8.1.3 (edk2-stable202302) does not work on Apple M3:
# https://gitlab.com/qemu-project/qemu/-/issues/1990
#
# The issue is reported to be fixed in:
# https://github.com/tianocore/edk2/commit/5ce29ae84db340244c3c3299f84713a88dec5171
# (included in edk2-stable202305 and later)
#
# Replace the EFI image until QEMU updates it, to rescue M3 users.
resource "efi-aarch64" do
url "https://snapshots.linaro.org/components/kernel/leg-virt-tianocore-edk2-upstream/5040/QEMU-AARCH64/RELEASE_CLANGDWARF/QEMU_EFI.fd"
sha256 "e5cc7beda96bc07d0e80745c84d648701586f8f1fd11223c3fe725327fd6e20c"
end

def install
ENV["LIBTOOL"] = "glibtool"

Expand Down Expand Up @@ -111,17 +98,6 @@ def install

system "./configure", *args
system "make", "V=1", "install"

# Overwrite edk2-aarch64-code.fd
resource("efi-aarch64").stage do
# The file has to be padded to 64MiB: https://gitlab.com/qemu-project/qemu/-/blob/v8.1.3/roms/edk2-build.config?ref_type=tags#L113
# Otherwise it fails with: `device requires 67108864 bytes, block backend provides 2097152 bytes`
File.open("QEMU_EFI.fd", "a") do |file|
file.truncate(64 * 1024 * 1024)
end
rm pkgshare/"edk2-aarch64-code.fd"
pkgshare.install "QEMU_EFI.fd" => "edk2-aarch64-code.fd"
end
end

test do
Expand Down
Loading