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

T430s port #723

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions blobs/t430s/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
**Make sure that the binary files are backed up some where.**

Use the bdv file to get the pin layout and the location of the SOIC-8 chip on your board.
[Open Board View](https://github.com/OpenBoardView/OpenBoardView/releases) is a tool to read bdv files.

If you do not want to use the extract.sh script for blob extraction, you can also extract the blobs with _dd_:
```
$ dd if=eprom_read_1.bin of=gbe.bin skip=8 count=16
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is done per ifdtool, you can look at x220 and t420 extract scripts. To maximize space of BIOS region, you can look at #877

$ dd if=eprom_read_1.bin of=me.bin skip=24 count=10216
```
69 changes: 69 additions & 0 deletions blobs/t430s/extract.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
#!/bin/bash

function printusage {
echo "Usage: $0 -f <romdump> -m <me_cleaner> -i <ifdtool>"
exit 0
}

BLOBDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
MECLEAN="$BLOBDIR/me_cleaner/me_cleaner.py"
IFDTOOL="$BLOBDIR/ifdtool/ifdtool"

if [ "$#" -eq 0 ] || [ "$1" == "-h" ] || [ "$1" == "--help" ];
then printusage; fi

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

if [ ! -f "$FILE" ]; then
echo "romdump required but not found. Aborting."
exit 1;
fi

if [ ! -f "$MECLEAN" ]; then
echo "me_cleaner.py required but not found. Aborting."
exit 1;
fi
MECLEAN=$(realpath $MECLEAN)

if [ ! -f "$IFDTOOL" ]; then
echo "ifdtool required but not found. Aborting."
exit 1;
fi
IFDTOOL=$(realpath $IFDTOOL)

echo "FILE: $FILE"
echo "ME: $MECLEAN"
echo "IFD: $IFDTOOL"

bioscopy=$(mktemp)
extractdir=$(mktemp -d)

cp "$FILE" $bioscopy

cd "$extractdir"
$IFDTOOL -x $bioscopy
cp "$extractdir/flashregion_3_gbe.bin" "$BLOBDIR/gbe.bin"
$MECLEAN -O "$BLOBDIR/me.bin" -r -t "$extractdir/flashregion_2_intel_me.bin"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep. Please look at #877

$IFDTOOL -n "$BLOBDIR/layout.txt" $bioscopy
$IFDTOOL -x $bioscopy.new
cp "$extractdir/flashregion_0_flashdescriptor.bin" "$BLOBDIR/ifd.bin"

rm "$bioscopy"
rm "$bioscopy.new"
rm -r "$extractdir"
4 changes: 4 additions & 0 deletions blobs/t430s/layout.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
00000000:00000fff fd
00500000:00ffffff bios
00003000:004fffff me
00001000:00002fff gbe
Loading