i915ovmfPkg icon indicating copy to clipboard operation
i915ovmfPkg copied to clipboard

Some changes necessary for edk2 gcc 11 compilation

Open scorpion81 opened this issue 2 years ago • 3 comments

I had to use https://github.com/tianocore/edk2/pull/2231 in order to be able to compile edk2 correctly with gcc 11.x here. But unfortunately that involved some more changes to i915ovmfPkg itself.

It builds now correctly BUT... when used like in this qemu launcher script (scroll right to see it at the end of the device vfio-pci line) the keyboard stops responding and the opencore picker cant be used.

Disabling the picker leads to unsuccessful boot with this romfile (without it seems to boot fine)

But i wanted to test whether it may help to solve the issue of the apple drivers not properly recognizing the virtual igpu.

Hence I put up this pull request so @patmagauran can better see the differences in the code :slightly_smiling_face:

#!/bin/bash
exec qemu-system-x86_64 -m 4096 \
-cpu max,vendor=GenuineIntel,+invtsc,vmware-cpuid-freq=on,+ssse3,+sse4.2,+popcnt,+avx,+aes,+xsave,+xsaveopt,check \
-machine q35,accel=kvm:tcg \
-smp 4,cores=1 \
-device vfio-pci,sysfsdev=/sys/bus/mdev/devices/9085644c-8cf8-4df0-900e-0c1362deddea,bus=pcie.0,addr=0x2,driver=vfio-pci-nohotplug,display=on,ramfb=on,romfile=/home/martin/Projekte/gpu_passthru/i915ovmf.rom \
-usb \
-device usb-kbd \
-device usb-tablet \
-device isa-applesmc,osk=ourhardworkbythesewordsguardedpleasedontsteal\(c\)AppleComputerInc \
-drive if=pflash,format=raw,readonly=on,file=/home/martin/Projekte/gpu_passthru/OVMF_CODE.fd \
-drive if=pflash,format=raw,file=/home/martin/Projekte/gpu_passthru/OVMF_VARS.fd \
-smbios type=2 \
-audiodev pa,server=unix:/run/user/1000/pulse/native,id=hda \
-device ich9-intel-hda \
-device hda-duplex,audiodev=hda \
-device ich9-ahci,id=sata,bus=pcie.0,addr=0x7 \
-drive id=OpenCoreBoot,if=none,snapshot=on,format=qcow2,file=/mnt/CA8690DA8690C7F9/VM/Monterey/OpenCore.qcow2 \
-device ide-hd,bus=sata.2,drive=OpenCoreBoot \
-drive id=MacHDD,if=none,file=/mnt/CA8690DA8690C7F9/VM/Monterey/macos_hdd_monterey.img,format=qcow2 \
-device ide-hd,bus=sata.3,drive=MacHDD \
-netdev user,id=net0 \
-device vmxnet3,netdev=net0,id=net0,mac=52:54:00:09:49:17,bus=pcie.0,addr=0xA \
-monitor stdio \
-boot menu=on \
-display gtk,gl=on \
-vga none

scorpion81 avatar Jan 07 '22 10:01 scorpion81