mirror of
https://github.com/linuxboot/heads.git
synced 2025-03-11 23:13:54 +00:00
- Add TRACE function tracing output under etc/functions, depending on CONFIG_ENABLE_FUNCTION_TRACING_OUTPUT enabled in board configs - Replace current DEBUG to TRACE calls in code, reserving DEBUG calls for more verbose debugging later on (output of variables etc) - add 'export CONFIG_ENABLE_FUNCTION_TRACING_OUTPUT=y' in qemu-coreboot(fb)whiptail-tpm1(-hotp) boards to see it in action
25 lines
377 B
Bash
Executable File
25 lines
377 B
Bash
Executable File
#!/bin/sh
|
|
# get a file and extend a TPM PCR
|
|
. /etc/functions
|
|
|
|
die() {
|
|
TRACE "Under /bin/wget-measure.sh:die"
|
|
echo >&2 "$@"
|
|
exit 1
|
|
}
|
|
|
|
INDEX="$1"
|
|
URL="$2"
|
|
|
|
if [ -z "$INDEX" -o -z "$URL" ]; then
|
|
die "Usage: $0 pcr-index url"
|
|
fi
|
|
|
|
|
|
wget "$URL" || die "$URL: failed"
|
|
|
|
FILE="`basename "$URL"`"
|
|
tpm extend -ix "$INDEX" -if "$FILE" || die "$FILE: tpm extend failed"
|
|
|
|
|