blob: 3906433e8db3d0caa7f8f738e04b62338c9fbfcc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#!/bin/bash
if [ "$#" -ne 1 ]; then
echo "Usage: appsign.sh *build dir*"
exit 1
fi
# Build location
BUILD=$1
# Generate the MD5 hash
echo -n `md5sum --binary $BUILD/application.bin | awk '{ print $1 }'` > __md5hash.bin
# Concatenate it with the application binary
cat $BUILD/application.bin __md5hash.bin > $BUILD/mcuimg.bin
RET=$?
# Remove the tmp files
rm -f __md5hash.bin
# Remove the unsigned binary
rm -f $BUILD/application.bin
exit $RET
|