diff --git a/firmware/ec/Makefile b/firmware/ec/Makefile index 5ea08c597a..a4a76c890d 100644 --- a/firmware/ec/Makefile +++ b/firmware/ec/Makefile @@ -84,7 +84,11 @@ LINT_FLAGS = -i -style=file -fallback-style=none .PRECIOUS: %/compiler.opt %/linker.cmd -all: oc_connect1 +all: oc_connect1 hash + +hash: + cd ../utilities/checksums; ./hashes.sh $(shell pwd)/$(OUT) -ec + oc_connect1: $(OUT)/OpenCellular.bin $(OUT)/%/compiler.opt $(OUT)/%/linker.cmd : %.cfg diff --git a/firmware/host/Makefile b/firmware/host/Makefile index 1ee021bf86..b8d4060377 100644 --- a/firmware/host/Makefile +++ b/firmware/host/Makefile @@ -18,7 +18,7 @@ default: all: ocmw_uart ocmw_usb ocmw_eth occli ocmw_eth_stub ocware_stub hash hash: - cd ../utilities/checksums; ./hosthash.sh $(shell pwd)/$(output_dir) + cd ../utilities/checksums; ./hashes.sh $(shell pwd)/$(output_dir) -host .PHONY: occli diff --git a/firmware/utilities/checksums/hashes.sh b/firmware/utilities/checksums/hashes.sh new file mode 100755 index 0000000000..0b0fa5bea4 --- /dev/null +++ b/firmware/utilities/checksums/hashes.sh @@ -0,0 +1,15 @@ +#!/bin/sh -e +# +# Description +# This script records the md5 hashes of host build objects +# +BIN_FILES=$(find $1 -executable -type f) +if [ "$2" = "-host" ]; then + MD5_FILE="hmd5sums.txt" +fi + +if [ "$2" = "-ec" ]; then + MD5_FILE="ecmd5sums.txt" +fi + +md5sum $BIN_FILES > $MD5_FILE diff --git a/firmware/utilities/checksums/hosthash.sh b/firmware/utilities/checksums/hosthash.sh deleted file mode 100755 index 8a11afc4ea..0000000000 --- a/firmware/utilities/checksums/hosthash.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh -e -# -# Description -# This script records the md5 hashes of host build objects -# -BIN_FILES=$(find $1 -executable -type f) -HOST_MD5_FILE="hmd5sums.txt" -md5sum $BIN_FILES > $HOST_MD5_FILE