summaryrefslogtreecommitdiff
path: root/lib/sbi/sbi_init.c
diff options
context:
space:
mode:
authorWei Fu <wefu@redhat.com>2021-09-30 13:11:20 +0300
committerAnup Patel <anup@brainfault.org>2021-10-20 12:40:52 +0300
commit422eda499cd6b69c0ca9f4cb06b3aceef17a3b27 (patch)
tree129d2f1b1d2d6ca462cfce58c2a1b8e5b33d60b4 /lib/sbi/sbi_init.c
parent67cbbcb100d321ec61f6424392562834083e9c98 (diff)
downloadopensbi-422eda499cd6b69c0ca9f4cb06b3aceef17a3b27.tar.xz
Makefile: Add build time and compiler info string
When we are doing opensbi development, we want to know the build time and compiler info for debug purpose. To enable this message, please add "BUILD_INFO=y", like: ``` make BUILD_INFO=y ``` NOTE: Using `BUILD_INFO=y` without specifying SOURCE_DATE_EPOCH will violate "reproducible builds". So it's ONLY for development and debug purpose, and should NOT be used in a product which follows "reproducible builds". Signed-off-by: Wei Fu <wefu@redhat.com> Reviewed-by: Anup Patel <anup.patel@wdc.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Diffstat (limited to 'lib/sbi/sbi_init.c')
-rw-r--r--lib/sbi/sbi_init.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/sbi/sbi_init.c b/lib/sbi/sbi_init.c
index 843659e..b1c7cf0 100644
--- a/lib/sbi/sbi_init.c
+++ b/lib/sbi/sbi_init.c
@@ -48,6 +48,14 @@ static void sbi_boot_print_banner(struct sbi_scratch *scratch)
OPENSBI_VERSION_MINOR);
#endif
+#ifdef OPENSBI_BUILD_TIME_STAMP
+ sbi_printf("Build time: %s\n", OPENSBI_BUILD_TIME_STAMP);
+#endif
+
+#ifdef OPENSBI_BUILD_COMPILER_VERSION
+ sbi_printf("Build compiler: %s\n", OPENSBI_BUILD_COMPILER_VERSION);
+#endif
+
sbi_printf(BANNER);
}