aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2016-06-29 12:54:17 -0400
committerRob Austein <sra@hactrn.net>2016-06-29 12:54:17 -0400
commit13143a84e45f06728db7f6a0722098eb01b3a236 (patch)
tree65ccc09e0214398cb207e7662f7734a9f1a594a4 /Makefile
parentc07e57d9bd3f5fad8eb36dcda5144a0a2b6224e9 (diff)
Add tamper.hex to firmware tarball; start adding support scripts; more minor build process cleanup.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile21
1 files changed, 11 insertions, 10 deletions
diff --git a/Makefile b/Makefile
index 0ff5e25..4d3900b 100644
--- a/Makefile
+++ b/Makefile
@@ -28,11 +28,7 @@ REPO_UPLOAD_URI := rsync://apt.cryptech.is/alpha/
FIRMWARE_TARBALL := source/cryptech-alpha-firmware.tar.gz
BITSTREAM := build/core/platform/alpha/build/alpha_fmc.bit
ELVES := build/sw/stm32/projects/bootloader/bootloader.elf build/sw/stm32/projects/hsm/hsm.elf
-FIRMWARE_BINARY := ${ELVES} ${ELVES:.elf=.bin}
-FIRMWARE_ALL := ${BITSTREAM} ${FIRMWARE_BINARY}
-
-RTL_SOURCE := $(shell find source/core -name .git -prune -o -type f -print)
-SW_SOURCE := $(shell find source/sw source/user -name .git -prune -o -type f -print)
+TAMPER := build/user/ln5/tamper/tamper.hex
# Command to generate a new changelog containing one entry.
# Does nothing if the changelog already exists.
@@ -61,13 +57,12 @@ firmware: shadow ${FIRMWARE_TARBALL}
shadow:
./build-shadow-tree.py
-${FIRMWARE_TARBALL}: ${BITSTREAM} $(sort ${ELVES} ${ELVES:.elf=.bin})
- ./build-firmware-package.py $(basename $@) $^
- gzip -9f $(basename $@)
+${FIRMWARE_TARBALL}: ${BITSTREAM} $(sort ${ELVES} ${ELVES:.elf=.bin}) ${TAMPER}
+ ./build-firmware-package.py $@ $^
bitstream: ${BITSTREAM}
-${BITSTREAM}: ${RTL_SOURCE}
+${BITSTREAM}: $(shell find source/core -name .git -prune -o -type f -print)
${MAKE} -C build/core/platform/alpha/build
${ELVES:.elf=.bin}: shadow elves
@@ -75,7 +70,13 @@ ${ELVES:.elf=.bin}: shadow elves
elves:
${MAKE} -C build/sw/stm32 distclean bootloader hsm
+${TAMPER}: tamper
+
+tamper:
+ ${MAKE} -C $(dir ${TAMPER})
+
dsc:
+ rm -f ${PACKAGE_NAME}_*.dsc ${PACKAGE_NAME}_*.tar.xz ${PACKAGE_NAME}_*_source.build ${PACKAGE_NAME}_*_source.changes
cd source; ${DCH}
cd source; debuild -S -uc -us
@@ -95,4 +96,4 @@ upload:
${RSYNC} --ignore-existing ${REPO_BASE}/ ${REPO_UPLOAD_URI}
${RSYNC} --delete --delete-delay ${REPO_BASE}/ ${REPO_UPLOAD_URI}
-.PHONY: all init clean firmware shadow bitstream elves dsc pbuilder homebrew upload enchilada sandblast
+.PHONY: all init clean firmware shadow bitstream elves tamper dsc pbuilder homebrew upload enchilada sandblast