diff options
author | Jan Kiszka <jan.kiszka@siemens.com> | 2023-09-27 17:41:09 +0200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-10-09 15:24:31 -0400 |
commit | 47e7f128c40c9bf856e76bf125e44522c99f3511 (patch) | |
tree | 90eca00fea72d98d80197a566dba9e0d540e702b | |
parent | 17deab0edd2ba0a79a2b566c9a4e52e303bed362 (diff) | |
download | u-boot-47e7f128c40c9bf856e76bf125e44522c99f3511.tar.gz u-boot-47e7f128c40c9bf856e76bf125e44522c99f3511.tar.bz2 u-boot-47e7f128c40c9bf856e76bf125e44522c99f3511.zip |
tools: iot2050-sign-fw.sh: Make localization of tools dir more robust
When building in-tree, there is no source link.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
-rwxr-xr-x | tools/iot2050-sign-fw.sh | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tools/iot2050-sign-fw.sh b/tools/iot2050-sign-fw.sh index 6b426c854c..75ffd56082 100755 --- a/tools/iot2050-sign-fw.sh +++ b/tools/iot2050-sign-fw.sh @@ -5,6 +5,8 @@ if [ -z "$1" ]; then exit 1 fi +TOOLS_DIR=$(dirname $0) + TEMP_X509=$(mktemp XXXXXXXX.temp) REVISION=${2:-0} @@ -39,10 +41,10 @@ CERT_X509=$(mktemp XXXXXXXX.crt) openssl req -new -x509 -key $1 -nodes -outform DER -out $CERT_X509 -config $TEMP_X509 -sha512 cat $CERT_X509 tispl.bin > tispl.bin_signed -source/tools/binman/binman replace -i flash-pg1.bin -f tispl.bin_signed fit@180000 -source/tools/binman/binman replace -i flash-pg2.bin -f tispl.bin_signed fit@180000 +$TOOLS_DIR/binman/binman replace -i flash-pg1.bin -f tispl.bin_signed fit@180000 +$TOOLS_DIR/binman/binman replace -i flash-pg2.bin -f tispl.bin_signed fit@180000 rm $TEMP_X509 $CERT_X509 -source/tools/binman/binman sign -i flash-pg1.bin -k $1 -a sha256,rsa4096 fit@380000 -source/tools/binman/binman sign -i flash-pg2.bin -k $1 -a sha256,rsa4096 fit@380000 +$TOOLS_DIR/binman/binman sign -i flash-pg1.bin -k $1 -a sha256,rsa4096 fit@380000 +$TOOLS_DIR/binman/binman sign -i flash-pg2.bin -k $1 -a sha256,rsa4096 fit@380000 |