mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-22 20:58:22 +00:00
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>
This commit is contained in:
parent
17deab0edd
commit
47e7f128c4
1 changed files with 6 additions and 4 deletions
|
@ -5,6 +5,8 @@ if [ -z "$1" ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
TOOLS_DIR=$(dirname $0)
|
||||||
|
|
||||||
TEMP_X509=$(mktemp XXXXXXXX.temp)
|
TEMP_X509=$(mktemp XXXXXXXX.temp)
|
||||||
|
|
||||||
REVISION=${2:-0}
|
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
|
openssl req -new -x509 -key $1 -nodes -outform DER -out $CERT_X509 -config $TEMP_X509 -sha512
|
||||||
cat $CERT_X509 tispl.bin > tispl.bin_signed
|
cat $CERT_X509 tispl.bin > tispl.bin_signed
|
||||||
source/tools/binman/binman replace -i flash-pg1.bin -f tispl.bin_signed fit@180000
|
$TOOLS_DIR/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-pg2.bin -f tispl.bin_signed fit@180000
|
||||||
|
|
||||||
rm $TEMP_X509 $CERT_X509
|
rm $TEMP_X509 $CERT_X509
|
||||||
|
|
||||||
source/tools/binman/binman sign -i flash-pg1.bin -k $1 -a sha256,rsa4096 fit@380000
|
$TOOLS_DIR/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-pg2.bin -k $1 -a sha256,rsa4096 fit@380000
|
||||||
|
|
Loading…
Add table
Reference in a new issue