summaryrefslogtreecommitdiff
path: root/include/vendor.sh
diff options
context:
space:
mode:
Diffstat (limited to 'include/vendor.sh')
-rw-r--r--include/vendor.sh40
1 files changed, 32 insertions, 8 deletions
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" \