From 0f3cc3aa55bcc6476d721f9fbb8dfe8559d85ff7 Mon Sep 17 00:00:00 2001 From: Rob Austein Date: Mon, 27 Jun 2016 16:26:25 -0400 Subject: First cut at consolidated alpha releng. Undoubtedly doesn't work yet, and still needs doc, but perhaps now ready for testing on build machine. --- firmware/.gitignore | 2 -- firmware/.gitmodules | 54 ------------------------------------- firmware/Makefile | 35 ------------------------ firmware/README.md | 19 ------------- firmware/build-package.py | 34 ----------------------- firmware/core/cipher/aes | 1 - firmware/core/cipher/chacha | 1 - firmware/core/comm/fmc | 1 - firmware/core/comm/uart | 1 - firmware/core/hash/sha1 | 1 - firmware/core/hash/sha256 | 1 - firmware/core/hash/sha512 | 1 - firmware/core/math/modexpa7 | 1 - firmware/core/platform/alpha | 1 - firmware/core/rng/avalanche_entropy | 1 - firmware/core/rng/rosc_entropy | 1 - firmware/core/rng/trng | 1 - firmware/core/rng/vndecorrelator | 1 - firmware/core/util/mkmif | 1 - firmware/sw/libhal | 1 - firmware/sw/stm32 | 1 - firmware/sw/thirdparty/libtfm | 1 - firmware/user/ft/libcli | 1 - 23 files changed, 162 deletions(-) delete mode 100644 firmware/.gitignore delete mode 100644 firmware/.gitmodules delete mode 100644 firmware/Makefile delete mode 100644 firmware/README.md delete mode 100755 firmware/build-package.py delete mode 160000 firmware/core/cipher/aes delete mode 160000 firmware/core/cipher/chacha delete mode 160000 firmware/core/comm/fmc delete mode 160000 firmware/core/comm/uart delete mode 160000 firmware/core/hash/sha1 delete mode 160000 firmware/core/hash/sha256 delete mode 160000 firmware/core/hash/sha512 delete mode 160000 firmware/core/math/modexpa7 delete mode 160000 firmware/core/platform/alpha delete mode 160000 firmware/core/rng/avalanche_entropy delete mode 160000 firmware/core/rng/rosc_entropy delete mode 160000 firmware/core/rng/trng delete mode 160000 firmware/core/rng/vndecorrelator delete mode 160000 firmware/core/util/mkmif delete mode 160000 firmware/sw/libhal delete mode 160000 firmware/sw/stm32 delete mode 160000 firmware/sw/thirdparty/libtfm delete mode 160000 firmware/user/ft/libcli (limited to 'firmware') diff --git a/firmware/.gitignore b/firmware/.gitignore deleted file mode 100644 index f1a0492..0000000 --- a/firmware/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -package.tar.gz -screenlog.0 diff --git a/firmware/.gitmodules b/firmware/.gitmodules deleted file mode 100644 index 77a2f38..0000000 --- a/firmware/.gitmodules +++ /dev/null @@ -1,54 +0,0 @@ -[submodule "core/cipher/aes"] - path = core/cipher/aes - url = https://git.cryptech.is/core/cipher/aes.git -[submodule "core/cipher/chacha"] - path = core/cipher/chacha - url = https://git.cryptech.is/core/cipher/chacha.git -[submodule "core/comm/fmc"] - path = core/comm/fmc - url = https://git.cryptech.is/core/comm/fmc.git -[submodule "core/comm/uart"] - path = core/comm/uart - url = https://git.cryptech.is/core/comm/uart.git -[submodule "core/hash/sha1"] - path = core/hash/sha1 - url = https://git.cryptech.is/core/hash/sha1.git -[submodule "core/hash/sha256"] - path = core/hash/sha256 - url = https://git.cryptech.is/core/hash/sha256.git -[submodule "core/hash/sha512"] - path = core/hash/sha512 - url = https://git.cryptech.is/core/hash/sha512.git -[submodule "core/math/modexpa7"] - path = core/math/modexpa7 - url = https://git.cryptech.is/core/math/modexpa7.git -[submodule "core/platform/alpha"] - path = core/platform/alpha - url = https://git.cryptech.is/core/platform/alpha.git -[submodule "core/rng/avalanche_entropy"] - path = core/rng/avalanche_entropy - url = https://git.cryptech.is/core/rng/avalanche_entropy.git -[submodule "core/rng/rosc_entropy"] - path = core/rng/rosc_entropy - url = https://git.cryptech.is/core/rng/rosc_entropy.git -[submodule "core/rng/trng"] - path = core/rng/trng - url = https://git.cryptech.is/core/rng/trng.git -[submodule "core/rng/vndecorrelator"] - path = core/rng/vndecorrelator - url = https://git.cryptech.is/core/rng/vndecorrelator.git -[submodule "core/util/mkmif"] - path = core/util/mkmif - url = https://git.cryptech.is/core/util/mkmif.git -[submodule "sw/stm32"] - path = sw/stm32 - url = https://git.cryptech.is/sw/stm32.git -[submodule "sw/libhal"] - path = sw/libhal - url = https://git.cryptech.is/sw/libhal.git -[submodule "sw/thirdparty/libtfm"] - path = sw/thirdparty/libtfm - url = https://git.cryptech.is/sw/thirdparty/libtfm.git -[submodule "user/ft/libcli"] - path = user/ft/libcli - url = https://git.cryptech.is/user/ft/libcli.git diff --git a/firmware/Makefile b/firmware/Makefile deleted file mode 100644 index fc98e1d..0000000 --- a/firmware/Makefile +++ /dev/null @@ -1,35 +0,0 @@ -# Preliminary makefile for releng/alpha/firmware, just to test the -# basic build sequence before we start messing with packaging scripts, -# version numbers, and other forms of entertainment. Expect changes. - -export GNUPGHOME := /home/aptbot/gnupg - -TARBALL := package.tar.gz -BITSTREAM := core/platform/alpha/build/alpha_fmc.bit -BINARIES := sw/stm32/projects/bootloader/bootloader.bin sw/stm32/projects/hsm/hsm.bin -FIRMWARE := ${BITSTREAM} ${BINARIES} ${BINARIES:.bin=.elf} -RTLSOURCE := $(shell find core -name .git -prune -o -path core/platform/alpha/build -prune -o -type f -print) - -all: bitstream elves package - -bitstream: ${BITSTREAM} - -${BITSTREAM}: ${RTLSOURCE} - cd core/platform/alpha/build; ${MAKE} - -${BINARIES}: elves - -elves: - cd sw/stm32; ${MAKE} bootloader hsm - -package: ${TARBALL} - -${TARBALL}: ${FIRMWARE} - ./build-package.py $(basename $@) $^ - gzip -9f $(basename $@) - -clean: - git clean -dfx - git submodule foreach git clean -dfx - -.PHONY: all bitstream elves package clean diff --git a/firmware/README.md b/firmware/README.md deleted file mode 100644 index ebf4015..0000000 --- a/firmware/README.md +++ /dev/null @@ -1,19 +0,0 @@ -Preliminary release engineering super-repository for building firmware -for the Cryptech "Alpha" board. - -Primary tasks here are to build a bitstream for the FPGA and the -"bootstrap" and "hsm" images for the Alpha's CPU. - -Eventually there will be a lot of packaging and versioning glorp here, -but let's start with basic build and clean targets. - -Current repository structure is, um, complicated. On the RTL side, we -have a tree of simple subrepositories, each representing one RTL core. - -On the software side, we have a subrepository which has several -subrepositories of its own: current thinking is that this should -probably be replaced by separate repositories and Makefile VPATH -magic, but this is what we have today so it's what we build with -today. - -This README is probably obsolete by the time you're reading it. diff --git a/firmware/build-package.py b/firmware/build-package.py deleted file mode 100755 index 0df116b..0000000 --- a/firmware/build-package.py +++ /dev/null @@ -1,34 +0,0 @@ -#!/usr/bin/env python - -import subprocess -import tempfile -import argparse -import hashlib -import tarfile -import json -import os - -parser = argparse.ArgumentParser() -parser.add_argument("tarfile", type = argparse.FileType("wb"), help = "tarball to create") -parser.add_argument("firmware", nargs = "+", help = "firmware files to stuff into tarball") -args = parser.parse_args() - -tar = tarfile.TarFile(mode = "w", fileobj = args.tarfile) -head = subprocess.check_output(("git", "rev-parse", "HEAD")).strip() -time = subprocess.check_output(("git", "show", "-s", "--format=%ct", "HEAD")).strip() -commits = [line.split() for line in subprocess.check_output(("git", "submodule", "status")).splitlines()] -sha256 = {} - -for fn in args.firmware: - with open(fn, "rb") as f: - sha256[os.path.basename(fn)] = hashlib.sha256(f.read()).hexdigest() - tar.add(fn, os.path.basename(fn)) - -with tempfile.NamedTemporaryFile() as f: - gpg = subprocess.Popen(("gpg", "--clearsign", "--personal-digest-preferences", "SHA256", "--no-permission-warning"), - stdin = subprocess.PIPE, stdout = f) - json.dump(dict(head = head, time = time, commits = commits, sha256 = sha256), gpg.stdin, indent = 2) - gpg.stdin.close() - if gpg.wait(): - raise subprocess.CalledProcessError(gpg.returncode, "gpg") - tar.add(f.name, "MANIFEST") diff --git a/firmware/core/cipher/aes b/firmware/core/cipher/aes deleted file mode 160000 index 9157592..0000000 --- a/firmware/core/cipher/aes +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 915759285c179cf99be3c17ad401c79e4b8be054 diff --git a/firmware/core/cipher/chacha b/firmware/core/cipher/chacha deleted file mode 160000 index 549b75a..0000000 --- a/firmware/core/cipher/chacha +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 549b75a635817ce263c368c9b8b5b0b07f90ec21 diff --git a/firmware/core/comm/fmc b/firmware/core/comm/fmc deleted file mode 160000 index 61c16de..0000000 --- a/firmware/core/comm/fmc +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 61c16de8beb8deaadd2ffedfabfb3ce96e8699f0 diff --git a/firmware/core/comm/uart b/firmware/core/comm/uart deleted file mode 160000 index 0d3acd1..0000000 --- a/firmware/core/comm/uart +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 0d3acd1815da8fcbd2b30f4fe1ff514f87b25228 diff --git a/firmware/core/hash/sha1 b/firmware/core/hash/sha1 deleted file mode 160000 index ae915a1..0000000 --- a/firmware/core/hash/sha1 +++ /dev/null @@ -1 +0,0 @@ -Subproject commit ae915a1ed47a807ec880c2f18053e4f8eda6bd93 diff --git a/firmware/core/hash/sha256 b/firmware/core/hash/sha256 deleted file mode 160000 index c894f78..0000000 --- a/firmware/core/hash/sha256 +++ /dev/null @@ -1 +0,0 @@ -Subproject commit c894f78a95a01351f277c3d36bcf6dced08798e2 diff --git a/firmware/core/hash/sha512 b/firmware/core/hash/sha512 deleted file mode 160000 index 88e0d83..0000000 --- a/firmware/core/hash/sha512 +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 88e0d83768004b6bab2d83edf7eae2841678b51c diff --git a/firmware/core/math/modexpa7 b/firmware/core/math/modexpa7 deleted file mode 160000 index 4612bc2..0000000 --- a/firmware/core/math/modexpa7 +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 4612bc24a8b43c14580d6be06542b1fa9a6e615a diff --git a/firmware/core/platform/alpha b/firmware/core/platform/alpha deleted file mode 160000 index fc8be80..0000000 --- a/firmware/core/platform/alpha +++ /dev/null @@ -1 +0,0 @@ -Subproject commit fc8be8024560bb77221758b0351c3de7b4ea6e93 diff --git a/firmware/core/rng/avalanche_entropy b/firmware/core/rng/avalanche_entropy deleted file mode 160000 index 5742813..0000000 --- a/firmware/core/rng/avalanche_entropy +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 5742813ab43fec9fa90d970f086f1e266875b8f3 diff --git a/firmware/core/rng/rosc_entropy b/firmware/core/rng/rosc_entropy deleted file mode 160000 index 48e3c11..0000000 --- a/firmware/core/rng/rosc_entropy +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 48e3c117ae6944775010031b1691446220944b62 diff --git a/firmware/core/rng/trng b/firmware/core/rng/trng deleted file mode 160000 index 953909d..0000000 --- a/firmware/core/rng/trng +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 953909d18796c1caea35263eb902b1dd7021d92d diff --git a/firmware/core/rng/vndecorrelator b/firmware/core/rng/vndecorrelator deleted file mode 160000 index 49e388c..0000000 --- a/firmware/core/rng/vndecorrelator +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 49e388c3dadcaabe1e4e66a37fcd52b2f125c1dc diff --git a/firmware/core/util/mkmif b/firmware/core/util/mkmif deleted file mode 160000 index fd1dd73..0000000 --- a/firmware/core/util/mkmif +++ /dev/null @@ -1 +0,0 @@ -Subproject commit fd1dd73410ba6ca3d082ff61e4b39d6e8c2de35e diff --git a/firmware/sw/libhal b/firmware/sw/libhal deleted file mode 160000 index 709a71c..0000000 --- a/firmware/sw/libhal +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 709a71c0030225ba08cddf5227a1c67c2dbb4176 diff --git a/firmware/sw/stm32 b/firmware/sw/stm32 deleted file mode 160000 index 0d25f92..0000000 --- a/firmware/sw/stm32 +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 0d25f920c9024a3a6f994b8f17b9b28ffa6e0930 diff --git a/firmware/sw/thirdparty/libtfm b/firmware/sw/thirdparty/libtfm deleted file mode 160000 index 269fc4e..0000000 --- a/firmware/sw/thirdparty/libtfm +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 269fc4e58f616a2cf1c318f494ec18a52991da8c diff --git a/firmware/user/ft/libcli b/firmware/user/ft/libcli deleted file mode 160000 index 54c6b86..0000000 --- a/firmware/user/ft/libcli +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 54c6b8649b1a13e69a908c96e8d4d19cf8d72845 -- cgit v1.2.3