Skip to content

Commit 3e31d39

Browse files
committed
fixup! add m900 hotp and maximized into circle ci
Signed-off-by: Thierry Laurion <insurgo@riseup.net>
1 parent 1ad23f9 commit 3e31d39

2 files changed

Lines changed: 13 additions & 34 deletions

File tree

.circleci/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -529,14 +529,14 @@ workflows:
529529
target: EOL_m900_tower-hotp-maximized
530530
subcommand: ""
531531
requires:
532-
- EOL_t480-hotp-maximized
532+
- EOL_t480-hotp-maximized [seed:coreboot-25.09]
533533

534534
- build:
535535
name: EOL_m900_tower-maximized
536536
target: EOL_m900_tower-maximized
537537
subcommand: ""
538538
requires:
539-
- EOL_t480-hotp-maximized
539+
- EOL_t480-hotp-maximized [seed:coreboot-25.09]
540540

541541
- build:
542542
name: EOL_optiplex-7010_9010-hotp-maximized

blobs/m900/m900_download_clean_deguard_me.sh

Lines changed: 11 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/usr/bin/env bash
2+
source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/../lib.sh"
23

34
# These variables are all for the deguard tool.
45
# They would need to be changed if using the tool for other devices with different ME version...
@@ -9,7 +10,7 @@ ME_pch="H"
910

1011

1112
# Integrity checks for the vendor provided ME blob...
12-
DL_HASH="de26085e1fbfaaa0302ec73dba411a5fd25fe13ae07e69a2287754ada6a7a196"
13+
ME_DOWNLOAD_HASH="de26085e1fbfaaa0302ec73dba411a5fd25fe13ae07e69a2287754ada6a7a196"
1314

1415
# ...and the cleaned and deguarded version from that blob.
1516
DEGUARDED_ME_BIN_HASH="9c3eff6be017b36c819a0df3c1f6537bb26b6f3d5780787f60b91cedc789f0f0"
@@ -23,28 +24,6 @@ Download Intel ME firmware from ASRock, neutralize and shrink keeping the MFS.
2324
"
2425
}
2526

26-
function chk_sha256sum() {
27-
sha256_hash="$1"
28-
filename="$2"
29-
echo "$sha256_hash" "$filename" "$(pwd)"
30-
sha256sum "$filename"
31-
if ! echo "${sha256_hash} ${filename}" | sha256sum --check; then
32-
echo "ERROR: SHA256 checksum for ${filename} doesn't match."
33-
exit 1
34-
fi
35-
}
36-
37-
function chk_exists_and_matches() {
38-
if [[ -f "$1" ]]; then
39-
if echo "${2} ${1}" | sha256sum --check; then
40-
echo "SKIPPING: SHA256 checksum for $1 matches."
41-
[[ "$3" = ME ]] && me_exists="y"
42-
return 0
43-
fi
44-
echo "$1 exists but checksum doesn't match. Continuing..."
45-
fi
46-
}
47-
4827
function download_and_clean() {
4928
me_cleaner="$(realpath "${1}")"
5029
me_output="$(realpath "${2}")"
@@ -57,7 +36,7 @@ function download_and_clean() {
5736
me_installer_filename="H110M-DGS(7.30)ROM.zip"
5837
user_agent="Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Firefox/91.0"
5938
curl -A "$user_agent" -s -O "https://download.asrock.com/BIOS/1151/${me_installer_filename}"
60-
chk_sha256sum "$DL_HASH" "$me_installer_filename"
39+
chk_sha256sum "$ME_DOWNLOAD_HASH" "$me_installer_filename"
6140

6241
# Unpack the ME blob.
6342
unzip "$me_installer_filename" || exit
@@ -160,13 +139,13 @@ if [[ "${BASH_SOURCE[0]}" == "$0" ]]; then
160139
fi
161140

162141
parse_params "$@"
163-
chk_exists_and_matches "$me_deguarded" "$DEGUARDED_ME_BIN_HASH" ME
164142

165-
if [[ -z "$me_exists" ]]; then
166-
download_and_clean "$me_cleaner" "$me_cleaned"
167-
deguard "$me_cleaned" "$me_deguarded"
168-
rm -f "$me_cleaned"
169-
fi
170-
171-
chk_sha256sum "$DEGUARDED_ME_BIN_HASH" "$me_deguarded"
143+
check_outputs "${DEGUARDED_ME_BIN_HASH} ${me_deguarded}" && { echo "All outputs match. Nothing to do."; exit 0; }
144+
145+
echo "Writing cleaned and deguarded ME to ${me_deguarded}"
146+
download_and_clean "$me_cleaner" "$me_cleaned"
147+
deguard "$me_cleaned" "$me_deguarded"
148+
rm -f "$me_cleaned"
149+
150+
check_outputs "${DEGUARDED_ME_BIN_HASH} ${me_deguarded}" || exit 1
172151
fi

0 commit comments

Comments
 (0)