forked from keepkey/keepkey-firmware
-
Notifications
You must be signed in to change notification settings - Fork 6
/
docker_build_release.sh
executable file
·30 lines (25 loc) · 1.25 KB
/
docker_build_release.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash
echo "*********************************************************************"
echo "* You are about to build a release version of KeepKey firmware. The *"
echo "* resulting bootloader image will memory protect the flash on your *"
echo "* device, so please use it with extreme care. *"
echo "*********************************************************************"
# read -p "Are you sure you want to continue? " -n 1 -r
# echo # (optional) move to a new line
# if [[ $REPLY =~ ^[Yy]$ ]]
# then
IMAGETAG=keepkey/firmware
docker build -t $IMAGETAG .
docker run -t -v $(pwd):/root/keepkey-firmware --rm $IMAGETAG /bin/sh -c "\
cd /root/keepkey-firmware/libopencm3 && \
make clean && \
make && \
cd /root/keepkey-firmware && \
./b -mp && \
echo '*********************************************************************' && \
echo '* KeepKey Application Fingerprint *' && \
echo '*********************************************************************' && \
cat build/arm-none-gnu-eabi/release/bin/keepkey_main.bin | sha256sum && \
bootloader/firmware_sign.py -f build/arm-none-gnu-eabi/release/bin/keepkey_main.bin && \
cat build/arm-none-gnu-eabi/release/bin/keepkey_main.bin | sha256sum"
# fi