diff options
Diffstat (limited to 'include/vendor.sh')
-rw-r--r-- | include/vendor.sh | 38 |
1 files changed, 16 insertions, 22 deletions
diff --git a/include/vendor.sh b/include/vendor.sh index 89e352a7..fb49cca5 100644 --- a/include/vendor.sh +++ b/include/vendor.sh @@ -39,8 +39,8 @@ eval "`setvars "" has_hashes EC_hash DL_hash DL_url_bkup MRC_refcode_gbe vcfg \ E6400_VGA_romname SCH5545EC_DL_url_bkup SCH5545EC_DL_hash _dest mecleaner \ kbc1126_ec_dump MRC_refcode_cbtree _dl SCH5545EC_DL_url EC_url rom DL_url \ nukemode cbfstoolref FSPFD_hash _7ztest ME11bootguard ME11delta xromsize \ - ME11version ME11sku ME11pch _me _metmp mfs TBFW_url_bkup TBFW_url vfile \ - TBFW_hash TBFW_size hashfile xchanged EC_url_bkup cbdir`" + ME11version ME11sku ME11pch _me _metmp mfs TBFW_url_bkup TBFW_url cbdir \ + TBFW_hash TBFW_size hashfile EC_url_bkup`" download() { @@ -215,30 +215,16 @@ extract_fsp() setvfile() { - [ -n "$vcfg" ] && check_vcfg && for c in $cvchk; do - eval "[ \"\${$c}\" = \"/dev/null\" ] && continue" - eval "[ -z \"\${$c}\" ] && continue" - getvfile "$@" && return 0 + [ -n "$vcfg" ] && for c in $cvchk; do + vcmd="[ \"\${$c}\" != \"/dev/null\" ] && [ -n \"\${$c}\" ]" + eval "$vcmd && getvfile \"\$@\" && return 0" done && return 1; : } -check_vcfg() -{ - vfile="config/vendor/$vcfg/pkg.cfg" - [ -L "$vfile" ] && err "'$archive', '$board': $vfile is a symlink"; : - [ -f "$vfile" ] || err "'$archive', '$board': $vfile missing"; : -} - getvfile() { - # valid vcfg. proceed to download files - eval "`setcfg "$vfile"`" - - bootstrap - - [ $# -gt 0 ] && getfiles - [ $# -gt 0 ] && return 0 # download - + eval "`setcfg "config/vendor/$vcfg/pkg.cfg" 1`" + bootstrap && [ $# -gt 0 ] && getfiles && return 0 # download fx_ prep x_ find "$tmpromdir" -maxdepth 1 -type f -name "*.rom" ( check_vendor_hashes ) || err "$archive: Can't verify hashes"; : } @@ -252,7 +238,7 @@ bootstrap() rmodtool="elf/cbfstool/$tree/rmodtool" x_ ./mk -f coreboot "${cbdir##*/}" - mk -b uefitool biosutilities bios_extract + fx_ "x_ ./mk -b" printf "uefitool\nbiosutilities\nbios_extract\n" [ -d "${kbc1126_ec_dump%/*}" ] && x_ make -C "$cbdir/util/kbc1126" [ -n "$MRC_refcode_cbtree" ] && \ cbfstoolref="elf/cbfstool/$MRC_refcode_cbtree/cbfstool" && \ @@ -291,6 +277,14 @@ prep() x_ rm -f "$_xrom" } +mksha512sum() +{ + ( + [ "${1%/*}" != "$1" ] && x_ cd "${1%/*}" + sha512sum ./"${1##*/}" >> "$2" || err "!sha512sum \"$1\" > \"$2\"" + ) || err "failed to create tarball checksum" +} + add_vfiles() { rom="$1" |