How to extract IGD Rom

I need to extract intergrated graphics ROM (Using Librem Mini) for GVT-D passthrough, the guide tells me to boot in non-uefi mode to be able to do that.

1. Enable non-UEFI mode in BIOS
2. Boot a livecd of your choice
3. Extract ROM

echo 1 > /sys/bus/pci/devices/0000:00:02.0/rom
cat /sys/bus/pci/devices/0000:00:02.0/rom > /tmp/extracted.rom
echo 0 > /sys/bus/pci/devices/0000:00:02.0/rom

How can I enable non-UEFI mode?

I made the switch from Pureboot to Coreboot, is my BIOS non-uefi now?

where did you read that you need to do that?

it’s non-UEFI in both cases.

Hey, thank you for your interest.
I’ve read it here: https://github.com/tmbeck/nuc-passthrough

They extract it first and then change the device ID (0406) and use that ROM when passing it through. But I need to ssh into my mini after I detach i915 so I haven’t done it yet. Not very experienced and my router has some rules that blocks such connections. Lots of hassle.

On another guide I’ve read that you can actually detach it with a qemu hook right before you start the VM, so I will look into that.

ok, well to make it easier you can just download it from the repo Purism uses to build the firmware:

Interesting, the ROM file I extracted is only 64.0 KB (65,536 bytes) while the files in the link you share seems to be bigger.

I extracted it by doing:

echo 1 > /sys/bus/pci/devices/0000:00:02.0/rom
cat /sys/bus/pci/devices/0000:00:02.0/rom > /tmp/extracted.rom
echo 0 > /sys/bus/pci/devices/0000:00:02.0/rom

The link I posted literally says “Download (64kb)” - I’m not sure how you’re seeing the file as larger