Skip to content

Commit

Permalink
Makefile: use sha256 file for macbook spi driver
Browse files Browse the repository at this point in the history
  • Loading branch information
fepitre committed Apr 25, 2022
1 parent e5a1c6f commit d375fb9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ SPI_REVISION := f85d028a41fbc928048c8ad248735501e76a2ce9
SPI_SRC_URL := $(SPI_BASE_URL)/$(SPI_REVISION).tar.gz
SPI_SRC_FILE := macbook12-spi-driver-$(SPI_REVISION).tar.gz
SPI_SRC_TARFILE := macbook12-spi-driver-$(SPI_REVISION).tar
SPI_HASH_SHA256 := 92bb7cbeb8df5a57d57ffffc193f621d20b336eb57af0aa81ce30404225c7425

URL := $(SRC_BASEURL)/$(SRC_FILE)
URL_SIGN := $(SRC_BASEURL)/$(SIGN_FILE)
Expand Down Expand Up @@ -97,9 +96,10 @@ $(SRC_TARFILE): $(SRC_FILE)$(UNTRUSTED_SUFF) $(HASH_FILE)
rm -f $<
endif

$(SPI_SRC_TARFILE): $(SPI_SRC_TARFILE)$(UNTRUSTED_SUFF)
$(file > spi.sha256,$(SPI_HASH_SHA256) $(SPI_SRC_TARFILE)$(UNTRUSTED_SUFF))
sha256sum -c spi.sha256 && mv $< $@ && rm spi.sha256
$(SPI_SRC_TARFILE): $(SPI_SRC_TARFILE)$(UNTRUSTED_SUFF) $(SPI_SRC_TARFILE).sha256
@sha256sum --status --strict -c <(printf "$(file <$(SPI_SRC_TARFILE).sha256) -\n") <$(SPI_SRC_TARFILE)$(UNTRUSTED_SUFF) || \
{ echo "Wrong SHA256 checksum on $(SPI_SRC_TARFILE)$(UNTRUSTED_SUFF)!"; exit 1; }
@mv $< $@

$(SRC_FILE)$(UNTRUSTED_SUFF):
@$(FETCH_CMD) $@ -- $(URL)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
92bb7cbeb8df5a57d57ffffc193f621d20b336eb57af0aa81ce30404225c7425

0 comments on commit d375fb9

Please sign in to comment.