summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2024-06-29 00:23:26 +0100
committerLeah Rowe <leah@libreboot.org>2024-06-29 00:23:26 +0100
commitc6df9666af32a65319a6ddf5ef2a123cc153501c (patch)
tree53feda2f3d40689d01ad786014b4aa8f09dd740b
parentf7ab70f60e4b581b95004583f37ec96fc6e90527 (diff)
vendor.sh: don't inject /dev/null
if injection is attempted, verification comes next, and verification fails. this happens for kcma/kgpe amd boards, where pike2008 fake roms are inserted by inserting the correct pci ids using /dev/null as a source. an empty pike2008 rom prevents seabios from loading the real pci rom, and this is done because the real one hangs SeaBIOS. a similar fix was made for ./vendor download, but overlooked for ./vendor inject. this patch fixes that. Signed-off-by: Leah Rowe <leah@libreboot.org>
-rwxr-xr-xinclude/vendor.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/vendor.sh b/include/vendor.sh
index a89ec7e5..4acc3eed 100755
--- a/include/vendor.sh
+++ b/include/vendor.sh
@@ -23,7 +23,7 @@ eval `setvars "" EC_url_bkup EC_hash DL_hash DL_url_bkup MRC_refcode_gbe vcfg \
CONFIG_VGA_BIOS_FILE CONFIG_VGA_BIOS_ID CONFIG_KBC1126_FW1 cbdir DL_url \
CONFIG_INCLUDE_SMSC_SCH5545_EC_FW CONFIG_SMSC_SCH5545_EC_FW_FILE nukemode \
CONFIG_IFD_BIN_PATH CONFIG_MRC_FILE CONFIG_HAVE_REFCODE_BLOB cbfstoolref \
- CONFIG_REFCODE_BLOB_FILE vrelease`
+ CONFIG_REFCODE_BLOB_FILE vrelease verify`
vendor_download()
{
@@ -313,7 +313,8 @@ patch_release_roms()
cd "tmp/romdir/bin/"* || $err "patch roms: !cd tmp/romdir/bin/*"
# NOTE: For compatibility with older rom releases, defer to sha1
- [ "$nukemode" = "nuke" ] || sha512sum --status -c vendorhashes || \
+ [ "$verify" != "y" ] || [ "$nukemode" = "nuke" ] || \
+ sha512sum --status -c vendorhashes || \
sha1sum --status -c vendorhashes || sha512sum --status -c \
blobhashes || sha1sum --status -c blobhashes || \
$err "patch_release_roms: ROMs did not match expected hashes"
@@ -357,6 +358,7 @@ patch_rom()
inject()
{
[ $# -lt 3 ] && $err "$@, $rom: usage: inject name path type (offset)"
+ [ "$2" = "/dev/null" ] && return 0; verify="y"
eval `setvars "" cbfsname _dest _t _offset`
cbfsname="$1"; _dest="${2##*../}"; _t="$3"