Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add google parrot config #966

Draft
wants to merge 15 commits into
base: master
Choose a base branch
from
49 changes: 49 additions & 0 deletions blobs/parrot/download_clean_me.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
function printusage {
echo "Usage: $0 -m <me_cleaner>(optional)"
}

BLOBDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

if [ "$#" -eq 0 ]; then printusage; fi

while getopts ":m:" opt; do
case $opt in
m)
if [ -x "$OPTARG" ]; then
MECLEAN="$OPTARG"
fi
;;
esac
done

FINAL_ME_BIN_SHA256SUM="e985feb4a2879a99fb792f2d425c17a68ee07ba8bc0fd39a7f9eb65d8c6d5f11 $BLOBDIR/me.bin"
ME_SHA256SUM="1790fabc16afc36ab1bcfd52e10b805855d5e2a4eb96ea78781ffb60a0941928 me.bin"
ME8_5M_PRODUCTION_SHA256SUM="821c6fa16e62e15bc902ce2e958ffb61f63349a471685bed0dc78ce721a01bfa app/ME8_5M_Production.bin"
gompa marked this conversation as resolved.
Show resolved Hide resolved


if [ -z "$MECLEAN" ]; then
MECLEAN=`command -v $BLOBDIR/../../build/coreboot-*/util/me_cleaner/me_cleaner.py 2>&1|head -n1`
if [ -z "$MECLEAN" ]; then
echo "me_cleaner.py required but not found or specified with -m. Aborting."
exit 1;
fi
fi

echo "### Creating temp dir"
extractdir=$(mktemp -d)
cd "$extractdir"

echo "### Downloading: https://github.com/coreboot/blobs/raw/master/mainboard/google/parrot/me.bin..."
gompa marked this conversation as resolved.
Show resolved Hide resolved
wget https://github.com/coreboot/blobs/raw/master/mainboard/google/parrot/me.bin || ( echo "ERROR: wget not found" && exit 1 )
echo "### Verifying expected hash of me.bin"
echo "$ME_SHA256SUM" | sha256sum --check || ( echo "Failed sha256sum verification on downloaded binary..." && exit 1 )

echo "###Applying me_cleaner to neuter+deactivate+maximize reduction of ME on $bioscopy, outputting minimized ME under $BLOBDIR/me.bin... "
$MECLEAN -r -t -O "$BLOBDIR/me.bin" me.bin
echo "### Verifying expected hash of me.bin"
echo "$FINAL_ME_BIN_SHA256SUM" | sha256sum --check || ( echo "Failed sha256sum verification on final binary..." && exit 1 )


echo "###Cleaning up..."
cd -
rm -r "$extractdir"
Binary file removed blobs/parrot/me_shrinked.bin
Binary file not shown.
2 changes: 1 addition & 1 deletion config/coreboot-parrot.config
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ CONFIG_BOARD_GOOGLE_PARROT=y
CONFIG_CBFS_SIZE=0x780000
CONFIG_BOARD_GOOGLE_PARROT=y
CONFIG_IFD_BIN_PATH="../../blobs/parrot/ifd_shrinked.bin"
CONFIG_ME_BIN_PATH="../../blobs/parrot/me_shrinked.bin"
CONFIG_ME_BIN_PATH="../../blobs/parrot/me.bin"
CONFIG_NATIVE_RAMINIT_IGNORE_MAX_MEM_FUSES=y
CONFIG_NO_POST=y
CONFIG_TPM_RDRESP_NEED_DELAY=y
Expand Down