summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/get.sh9
-rw-r--r--include/init.sh5
-rw-r--r--include/inject.sh1
-rw-r--r--include/vendor.sh40
4 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/init.sh b/include/init.sh
index abd06862..cde489dd 100644
--- a/include/init.sh
+++ b/include/init.sh
@@ -5,8 +5,9 @@
# Copyright (c) 2020-2025 Leah Rowe <leah@libreboot.org>
# Copyright (c) 2025 Alper Nebi Yasak <alpernebiyasak@gmail.com>
-export LC_COLLATE=C
-export LC_ALL=C
+export LANG=C.UTF-8
+export LC_COLLATE=C.UTF-8
+export LC_ALL=C.UTF-8
projectname="libreboot"
projectsite="https://libreboot.org/"
diff --git a/include/inject.sh b/include/inject.sh
index ee3df6af..6a1b0768 100644
--- a/include/inject.sh
+++ b/include/inject.sh
@@ -40,7 +40,6 @@ inject()
archive="$1";
new_mac="xx:xx:xx:xx:xx:xx"
- new_mac=""
nuke=""
xchanged=""
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" \