From c6df9666af32a65319a6ddf5ef2a123cc153501c Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Sat, 29 Jun 2024 00:23:26 +0100 Subject: 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 --- include/vendor.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'include/vendor.sh') 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" -- cgit v1.2.1