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

xx20 blobs fix #912

Merged
merged 4 commits into from
Dec 3, 2020
Merged
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
64 changes: 56 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
name: Install dependencies
command: |
apt update
apt install -y build-essential zlib1g-dev uuid-dev libdigest-sha-perl libelf-dev bc bzip2 bison flex git gnupg iasl m4 nasm patch python wget gnat cpio ccache pkg-config cmake libusb-1.0-0-dev autoconf texinfo ncurses-dev doxygen graphviz udev libudev1 libudev-dev automake libtool rsync innoextract
apt install -y build-essential zlib1g-dev uuid-dev libdigest-sha-perl libelf-dev bc bzip2 bison flex git gnupg iasl m4 nasm patch python python2 python3 wget gnat cpio ccache pkg-config cmake libusb-1.0-0-dev autoconf texinfo ncurses-dev doxygen graphviz udev libudev1 libudev-dev automake libtool rsync innoextract
- checkout

- run:
Expand Down Expand Up @@ -76,7 +76,7 @@ jobs:
tar zcvf build/kgpe-d16_workstation/logs.tar.gz build/log/*
- store-artifacts:
path: build/kgpe-d16_workstation

- run:
name: kgpe-d16_workstation-usb_keyboard
command: |
Expand Down Expand Up @@ -136,7 +136,7 @@ jobs:
rm -rf build/librem_l1um/* build/log/* && make CPUS=4 V=1 BOARD=librem_l1um || touch /tmp/failed_build
no_output_timeout: 3h
- run:
name: Output build failing logs
name: Output build failing logs
command: |
if [[ -f /tmp/failed_build ]]; then find ./build/ -name "*.log" -type f -mmin -1|while read log; do echo ""; echo '==>' "$log" '<=='; echo ""; cat $log;done; exit 1;else echo "Not failing. Continuing..."; fi \
- run:
Expand Down Expand Up @@ -190,6 +190,54 @@ jobs:
- store-artifacts:
path: build/librem_mini_v2

- run:
name: Download and neuter xx20 ME (keep generated GBE and extracted IFD in tree)
command: |
./blobs/xx20/download_parse_me.sh
- run:
name: x220-maximized
command: |
rm -rf build/x220-maximized/* build/log/* && make CPUS=4 V=1 BOARD=x220-maximized || touch /tmp/failed_build
no_output_timeout: 3h
- run:
name: Output build failing logs
command: |
if [[ -f /tmp/failed_build ]]; then find ./build/ -name "*.log" -type f -mmin -1|while read log; do echo ""; echo '==>' "$log" '<=='; echo ""; cat $log;done; exit 1;else echo "Not failing. Continuing..."; fi \
- run:
name: Output x220-maximized hashes
command: |
cat build/x220-maximized/hashes.txt \
- run:
name: Archiving build logs for x220-maximized
command: |
tar zcvf build/x220-maximized/logs.tar.gz ./build/log/*
- store-artifacts:
path: build/x220-maximized

- run:
name: Download and neuter xx20 ME (keep generated GBE and extracted IFD in tree)
command: |
./blobs/xx20/download_parse_me.sh
- run:
name: t420-maximized
command: |
rm -rf build/t420-maximized/* build/log/* && make CPUS=4 V=1 BOARD=t420-maximized || touch /tmp/failed_build
no_output_timeout: 3h
- run:
name: Output build failing logs
command: |
if [[ -f /tmp/failed_build ]]; then find ./build/ -name "*.log" -type f -mmin -1|while read log; do echo ""; echo '==>' "$log" '<=='; echo ""; cat $log;done; exit 1;else echo "Not failing. Continuing..."; fi
- run:
name: Output t420-maximized hashes
command: |
cat build/t420-maximized/hashes.txt \
- run:
name: Archiving build logs for t420-maximized
command: |
tar zcvf build/t420-maximized/logs.tar.gz ./build/log/*
- store-artifacts:
path: build/t420-maximized

- run:
name: x230-flash
command: |
Expand Down Expand Up @@ -311,7 +359,7 @@ jobs:
path: build/x230-nkstorecli

- run:
name: Download and neuter xx30 ME (keep generated GBE and extracted IFD in tree)
name: Download and neuter xx30 ME (keep generated GBE and extracted IFD in tree)
command: |
./blobs/xx30/download_clean_me.sh
- run:
Expand All @@ -335,7 +383,7 @@ jobs:
path: build/x230-maximized

- run:
name: Download and neuter xx30 ME (keep generated GBE and extracted IFD in tree)
name: Download and neuter xx30 ME (keep generated GBE and extracted IFD in tree)
command: |
./blobs/xx30/download_clean_me.sh
- run:
Expand All @@ -359,7 +407,7 @@ jobs:
path: build/t430-hotp-maximized

- run:
name: Download and neuter xx30 ME (keep generated GBE and extracted IFD in tree)
name: Download and neuter xx30 ME (keep generated GBE and extracted IFD in tree)
command: |
./blobs/xx30/download_clean_me.sh
- run:
Expand All @@ -383,7 +431,7 @@ jobs:
path: build/x230-maximized

- run:
name: Download and neuter xx30 ME (keep generated GBE and extracted IFD in tree)
name: Download and neuter xx30 ME (keep generated GBE and extracted IFD in tree)
command: |
./blobs/xx30/download_clean_me.sh
- run:
Expand All @@ -408,7 +456,7 @@ jobs:


- run:
name: Download and neuter xx30 ME (keep generated GBE and extracted IFD in tree)
name: Download and neuter xx30 ME (keep generated GBE and extracted IFD in tree)
command: |
./blobs/xx30/download_clean_me.sh
- run:
Expand Down
35 changes: 35 additions & 0 deletions blobs/xx20/download_parse_me.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/bin/bash

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

FINAL_ME_BIN_SHA256SUM="1eef6716aa61dd844d58eca15a85faa1bf5f82715defd30bd3373e79ca1a3339 $BLOBDIR/me.bin"
ME_EXE_SHA256SUM="48f18d49f3c7c79fa549a980f14688bc27c18645f64d9b6827a15ef5c547d210 83rf46ww.exe"
ME7_5M_UPD_PRODUCTION_SHA256SUM="760b0776b99ba94f56121d67c1f1226c77f48bd3b0799e1357a51842c79d3d36 app/ME7_5M_UPD_Production.bin"


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

echo "### Downloading https://download.lenovo.com/ibmdl/pub/pc/pccbbs/mobiles/83rf46ww.exe..."
wget https://download.lenovo.com/ibmdl/pub/pc/pccbbs/mobiles/83rf46ww.exe || ( echo "ERROR: wget not found" && exit 1 )
echo "### Verifying expected hash of 83rf46ww.exe"
echo "$ME_EXE_SHA256SUM" | sha256sum --check || ( echo "Failed sha256sum verification on downloaded binary..." && exit 1 )


echo "### Extracting 83rf46ww.exe..."
innoextract -I app/ME7_5M_UPD_Production.bin 83rf46ww.exe || ( echo "Failed calling innoextract. Tool installed on host?" && exit 1)
echo "### Verifying expected hash of app/ME7_5M_UPD_Production.bin"
echo "$ME7_5M_UPD_PRODUCTION_SHA256SUM" | sha256sum --check || ( echo "Failed sha256sum verification on extracted binary..." && exit 1 )


echo "###Generating neuter+deactivate+maximize reduction of ME on $bioscopy, outputting minimized ME under $BLOBDIR/me.bin... "
python3 "$BLOBDIR/me7_update_parser.py" -O "$BLOBDIR/me.bin" app/ME7_5M_UPD_Production.bin || ( echo "Failed to generate ME binary..." && exit 1 )

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 added blobs/xx20/gbe.bin
Binary file not shown.
3 changes: 3 additions & 0 deletions blobs/xx20/hashes.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
9f72818e23290fb661e7899c953de2eb4cea96ff067b36348b3d061fd13366e5 gbe.bin
907dfd580b4a680712bb4ee526f266c37a455196541d85702986532728f1eee9 ifd.bin
1eef6716aa61dd844d58eca15a85faa1bf5f82715defd30bd3373e79ca1a3339 me.bin
Binary file added blobs/xx20/ifd.bin
Binary file not shown.
4 changes: 4 additions & 0 deletions blobs/xx20/layout.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
00000000:00000fff fd
00018000:007fffff bios
00003000:00017fff me
00001000:00002fff gbe
Loading