Extract GOP driver when generating new model

This commit is contained in:
Tim Crawford 2020-11-11 15:10:04 -07:00 committed by Jeremy Soller
parent 85a3921c1c
commit 8bfc769028
2 changed files with 17 additions and 2 deletions

3
.gitignore vendored
View file

@ -1,2 +1,3 @@
build
backup.rom
build/
extract/

View file

@ -66,10 +66,24 @@ then
rm -f flashregion_*.bin
fi
# Get the Video BIOS Table for Intel systems
# Get the Video BIOS Table and GOP driver for Intel systems
if sudo [ -e /sys/kernel/debug/dri/0/i915_vbt ]
then
sudo cat /sys/kernel/debug/dri/0/i915_vbt > "${MODEL_DIR}/vbt.rom"
INTEL_GOP_DRIVER_GUID="7755CA7B-CA8F-43C5-889B-E1F59A93D575"
EXTRACT_DIR="extract"
if [ -n "${BIOS_IMAGE}" ]
then
if "${SCRIPT_DIR}/extract.sh" "${BIOS_IMAGE}" "${INTEL_GOP_DRIVER_GUID}" -o "${EXTRACT_DIR}" > /dev/null
then
cp -v "$(find "${EXTRACT_DIR}" | grep IntelGopDriver | grep PE32 | grep body.bin)" "${MODEL_DIR}/IntelGopDriver.efi"
rm -rf "${EXTRACT_DIR}"
else
echo "IntelGopDriver not present in firmware image"
fi
fi
fi
# XXX: More reliable way to determine if system has an EC?