summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/get.sh9
-rw-r--r--include/inject.sh6
-rw-r--r--include/vendor.sh40
3 files changed, 43 insertions, 12 deletions
diff --git a/include/get.sh b/include/get.sh
index 39161a4a..3e25ea3f 100644
--- a/include/get.sh
+++ b/include/get.sh
@@ -272,7 +272,14 @@ try_fetch_file()
try_curl()
{
- _ua="Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Firefox/91.0"
+ _ua=""
+
+ case "$2" in
+ https://www.supermicro.com/*)
+ _ua="curl/8.6.0";;
+ *)
+ _ua="Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Firefox/91.0";;
+ esac
( x_ curl --location --retry 3 -A "$_ua" "$2" -o "$1" ) \
|| ( x_ wget --tries 3 -U "$_ua" "$2" -O "$1" ) \
diff --git a/include/inject.sh b/include/inject.sh
index 6a1b0768..783e06ed 100644
--- a/include/inject.sh
+++ b/include/inject.sh
@@ -6,7 +6,7 @@
cbcfgsdir="config/coreboot"
tmpromdel="$XBMK_CACHE/DO_NOT_FLASH"
-nvm="util/nvmutil/nvm"
+nvmutil="util/nvmutil/nvmutil"
ifdtool="elf/coreboot/default/ifdtool"
checkvars="CONFIG_GBE_BIN_PATH"
@@ -200,13 +200,13 @@ modify_mac()
x_ make -C util/nvmutil clean
x_ make -C util/nvmutil
- x_ "$nvm" "$xbtmp/gbe" setmac "$new_mac"
+ x_ "$nvmutil" "$xbtmp/gbe" setmac "$new_mac"
fi
fx_ newmac x_ find "$tmpromdir" -maxdepth 1 -type f -name "*.rom"
printf "\nThe following GbE NVM data will be written:\n"
- x_ "$nvm" "$xbtmp/gbe" dump | grep -v "bytes read from file" || :
+ x_ "$nvmutil" "$xbtmp/gbe" dump | grep -v "bytes read from file" || :
}
newmac()
diff --git a/include/vendor.sh b/include/vendor.sh
index 509cea8e..8076d9ab 100644
--- a/include/vendor.sh
+++ b/include/vendor.sh
@@ -80,7 +80,9 @@ ME11pch=""
ME11sku=""
ME11version=""
ME_bin_hash=""
+MEcheck=""
MEclean=""
+MEshrink=""
MRC_bin_hash=""
MRC_refcode_cbtree=""
MRC_refcode_gbe=""
@@ -278,9 +280,16 @@ extract_intel_me()
x_ rm -f "$_metmp" "$xbtmp/a"
x_ rm -Rf "$_7ztest"
- if [ "$ME11bootguard" = "y" ]; then
- mfs="--whitelist MFS"
+ # maintain compatibility with older configs
+ # because in the past, shrink was assumed
+ if [ -z "$MEshrink" ]; then
+ MEshrink="y"
+ fi
+ if [ "$MEshrink" != "y" ] && [ "$MEshrink" != "n" ]; then
+ err "MEshrink set badly on '$board' vendor config"
+ fi
+ if [ "$ME11bootguard" = "y" ]; then
if [ -z "$ME11delta" ] || [ -z "$ME11version" ] || \
[ -z "$ME11sku" ] || [ -z "$ME11pch" ]; then
err "$board: ME11delta/ME11version/ME11sku/ME11pch" \
@@ -323,14 +332,29 @@ find_me()
_r="-r" # re-locate modules
_trunc="-t" # -t: truncate the ME size
- if [ -n "$mfs" ] || [ "$MEclean" = "n" ]; then
- _r=""
+ if [ "$ME11bootguard" = "y" ]; then
+ mfs="--whitelist MFS"
fi
-
if [ "$MEclean" = "n" ]; then
- _keep="-k"
- _pass="-p"
- _trunc=""
+ MEshrink="n"
+
+ _keep="-k" # keep ME modules, don't delete anything
+ mfs="" # no MFS whitelist needed, due to -r:
+ fi
+ if [ "$MEclean" = "n" ] || [ "$MEshrink" != "y" ]; then
+ # MEclean can still be y, this just means don't shrink,
+ # so deleted modules would become padded space. this
+ # could also be used alongside --whitelist, if
+ # MEclean is otherwise enabled.
+
+ _r="" # don't re-locate ME modules
+ _trunc="" # don't shrink the me.bin file size
+ fi
+ if [ "$MEcheck" = "n" ]; then
+ _pass="-p" # skip fptr check
+ fi
+ if [ -n "$mfs" ]; then
+ _r="" # cannot re-locate modules if using --whitelist MFS
fi
if "$mecleaner" $mfs $_r $_keep $_pass $_trunc -O "$xbtmp/a" \