summaryrefslogtreecommitdiff
path: root/resources/scripts/blobs/inject
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2023-05-06 21:21:42 +0100
committerLeah Rowe <leah@libreboot.org>2023-05-06 22:23:27 +0100
commit5a197b4ff160a348179a3350af266c6b87a3aa04 (patch)
treeefd39a6332016d393aa639be07e200e9b4203119 /resources/scripts/blobs/inject
parent0729d6e600b6592e79db049576e36d1961341ea1 (diff)
blobutil: support downloading E6400 VGA ROM
For Nvidia GPU models of Dell Latitude E6400
Diffstat (limited to 'resources/scripts/blobs/inject')
-rwxr-xr-xresources/scripts/blobs/inject20
1 files changed, 20 insertions, 0 deletions
diff --git a/resources/scripts/blobs/inject b/resources/scripts/blobs/inject
index e96fface..2e4e7a7c 100755
--- a/resources/scripts/blobs/inject
+++ b/resources/scripts/blobs/inject
@@ -121,6 +121,26 @@ set -- "resources/coreboot/${board}/config/*"
./coreboot/default/util/cbfstool/cbfstool "${rom}" add -f ${_ec2_location} -n ecfw2.bin -b ${_ec2_offset} -t raw || exit 1
fi
+ if [ "${CONFIG_VGA_BIOS_FILE}" != "" ] \
+ && [ "${CONFIG_VGA_BIOS_ID}" != "" ]; then
+ _vga_location="${CONFIG_VGA_BIOS_FILE#../../}"
+ _vga_dir="${_vga_location%/*}"
+ _vga_filename="${_vga_location##*/}"
+ printf "adding pci option rom\n"
+ if [ "${_vga_dir}" != "pciroms" ]; then
+ printf "Invalid PCI ROM directory: %s\n" ${_vga_dir}
+ exit 1
+ fi
+ if [ ! -f "${_vga_location}" ]; then
+ printf "No such file exists: %s\n" ${_vga_location}
+ exit 1
+ fi
+ ./coreboot/default/util/cbfstool/cbfstool ${rom} \
+ add -f "${_vga_location}" \
+ -n "pci${CONFIG_VGA_BIOS_ID}.rom" \
+ -t optionrom || exit 1
+ fi
+
if [ "${modifygbe}" = "true" ] && ! [ "${release}" = "true" ]; then
Modify_gbe ${rom}
fi