From ce5955088306c82f57af0409f0ba3044a82c099e Mon Sep 17 00:00:00 2001 From: "Schuyler St. Leger" Date: Thu, 31 Oct 2019 05:30:18 -0700 Subject: [PATCH] Print the git hash of the firmware on boot --- firmware/Makefile | 1 + firmware/main.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/firmware/Makefile b/firmware/Makefile index b1b6e46..846ce82 100644 --- a/firmware/Makefile +++ b/firmware/Makefile @@ -107,6 +107,7 @@ all: goodwatch.hex githash.h: echo "#define GITHASH" 0x`git rev-parse HEAD | head -c7` > githash.h + echo "#define GITHASH_STR \"`git rev-parse HEAD | head -c7`\"" >> githash.h buildtime.h: ../bin/buildtime.py >buildtime.h diff --git a/firmware/main.c b/firmware/main.c index ae25c4d..913ce88 100644 --- a/firmware/main.c +++ b/firmware/main.c @@ -64,6 +64,8 @@ int main(void) { //Initialize the various modules. dmesg_init(); + printf("Firmware git version %s\n", GITHASH_STR); + printf("RNG "); srand(true_rand()); // we do this as early as possible, because it messes with clocks