Skip to content

Commit

Permalink
Store boot firmware binaries in CAS (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlCutter authored Nov 1, 2023
1 parent 765afe8 commit a387210
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
10 changes: 6 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ check_log:

## log_boot adds the manifest.json file created during the build to the dev FT log.
log_boot: LOG_STORAGE_DIR=$(DEV_LOG_DIR)/log
log_boot: LOG_ARTEFACT_DIR=$(DEV_LOG_DIR)/boot/$(GIT_SEMVER_TAG)
log_boot: LOG_ARTEFACT_DIR=$(DEV_LOG_DIR)
log_boot: ARTEFACT_HASH=$(shell sha256sum ${CURDIR}/${APP}.imx | cut -f1 -d" ")
log_boot: check_log
@if [ ! -f ${LOG_STORAGE_DIR}/checkpoint ]; then \
make log_initialise LOG_STORAGE_DIR="${LOG_STORAGE_DIR}" ; \
Expand All @@ -109,7 +110,7 @@ log_boot: check_log
--private_key=${LOG_PRIVATE_KEY} \
--public_key=${LOG_PUBLIC_KEY}
@mkdir -p ${LOG_ARTEFACT_DIR}
cp ${CURDIR}/${APP}.imx ${LOG_ARTEFACT_DIR}
cp ${CURDIR}/${APP}.imx ${LOG_ARTEFACT_DIR}/${ARTEFACT_HASH}


## log_recovery creates a manifest for a defined version of the armory-ums image, and stores it
Expand All @@ -118,8 +119,9 @@ log_boot: check_log
log_recovery: ARMORY_UMS_RELEASE=v20231018
log_recovery: ARMORY_UMS_GIT_TAG="0.0.0-incompatible+${ARMORY_UMS_RELEASE}" # Workaround for semver format requirement.
log_recovery: LOG_STORAGE_DIR=$(DEV_LOG_DIR)/log
log_recovery: LOG_ARTEFACT_DIR=$(DEV_LOG_DIR)/recovery/$(ARMORY_UMS_GIT_TAG)
log_recovery: LOG_ARTEFACT_DIR=$(DEV_LOG_DIR)
log_recovery: TAMAGO_SEMVER=$(shell ${TAMAGO} version | sed 's/.*go\([0-9]\.[0-9]*\.[0-9]*\).*/\1/')
log_recovery: ARTEFACT_HASH=$(shell sha256sum ${CURDIR}/armory-ums.imx | cut -f1 -d" ")
log_recovery: check_log
@if [ "${RECOVERY_PRIVATE_KEY}" == "" ]; then \
@echo "You need to set RECOVERY_PRIVATE_KEY variable"; \
Expand Down Expand Up @@ -155,7 +157,7 @@ log_recovery: check_log
--private_key=${LOG_PRIVATE_KEY} \
--public_key=${LOG_PUBLIC_KEY}
@mkdir -p ${LOG_ARTEFACT_DIR}
cp ${CURDIR}/armory-ums.imx ${LOG_ARTEFACT_DIR}
cp ${CURDIR}/armory-ums.imx ${LOG_ARTEFACT_DIR}/${ARTEFACT_HASH}


#### utilities ####
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/transparency-dev/armored-witness-boot
go 1.20

require (
github.com/transparency-dev/armored-witness-common v0.0.0-20231027110430-3802c9e3e15d
github.com/transparency-dev/armored-witness-common v0.0.0-20231031160117-eefcf9dd7f27
github.com/usbarmory/armory-boot v0.0.0-20230922092524-e66d926bc36c
github.com/usbarmory/tamago v0.0.0-20230922151120-1f76695abebe
golang.org/x/mod v0.13.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
github.com/pierrec/lz4/v4 v4.1.14 h1:+fL8AQEZtz/ijeNnpduH0bROTu0O3NZAlPjQxGn8LwE=
github.com/pierrec/lz4/v4 v4.1.14/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4=
github.com/transparency-dev/armored-witness-applet v0.0.0-20230918140527-29dcafed830b h1:d8bLTgqLrvH1VJyNUTAzLyY/Ux13s7QHb19vEcTum7E=
github.com/transparency-dev/armored-witness-common v0.0.0-20231027110430-3802c9e3e15d h1:76yBTOSuqGXpKe7qjF1Yjzf4MOhXYryeVObzUkpKHf0=
github.com/transparency-dev/armored-witness-common v0.0.0-20231027110430-3802c9e3e15d/go.mod h1:6M39UQVYzzFdzXGrJFjRC+G9D5f0icxOVkcX/yaWZss=
github.com/transparency-dev/armored-witness-common v0.0.0-20231031160117-eefcf9dd7f27 h1:p8mmHwCvTYbuB52ph9knjwWkQmGNZ+3BZJgsw9xIQq0=
github.com/transparency-dev/armored-witness-common v0.0.0-20231031160117-eefcf9dd7f27/go.mod h1:6M39UQVYzzFdzXGrJFjRC+G9D5f0icxOVkcX/yaWZss=
github.com/transparency-dev/formats v0.0.0-20230920083814-0f75b1d4e813 h1:PHklaeYyhPsbhWt+MnKpBvJrsJGkPEaU1JutMj4wNqM=
github.com/transparency-dev/formats v0.0.0-20230920083814-0f75b1d4e813/go.mod h1:J2NdDb6IhKIvF6MwCvKikz9/QStRylEtS2mv+En+jBg=
github.com/transparency-dev/merkle v0.0.2 h1:Q9nBoQcZcgPamMkGn7ghV8XiTZ/kRxn1yCG81+twTK4=
Expand Down

0 comments on commit a387210

Please sign in to comment.