diff --git a/buildpush.sh b/buildpush.sh index c0b6a0406..606791f90 100755 --- a/buildpush.sh +++ b/buildpush.sh @@ -57,6 +57,8 @@ set -- "${POSITIONAL[@]}" DESTDIR=code/precursors +touch services/log-server/src/main.rs # bump the build time in the log server + cargo xtask hw-image ../betrusted-soc/build/software/soc.svd # only copy if changed, othrewise it seems to trigger extra build effort... diff --git a/services/log-server/Cargo.toml b/services/log-server/Cargo.toml index ba434ac9c..e2c178cde 100644 --- a/services/log-server/Cargo.toml +++ b/services/log-server/Cargo.toml @@ -9,6 +9,9 @@ description = "Log output program" xous = { path = "../../xous-rs" } log = "0.4" +[build-dependencies] +vergen = "3" + [target.'cfg(not(any(windows,unix)))'.dependencies] utralib = { path = "../../utralib"} diff --git a/services/log-server/build.rs b/services/log-server/build.rs index 43c3deb4f..f9dd19b2f 100644 --- a/services/log-server/build.rs +++ b/services/log-server/build.rs @@ -1,9 +1,14 @@ // NOTE: Adapted from cortex-m/build.rs use std::env; +extern crate vergen; +use vergen::{ConstantsFlags, generate_cargo_keys}; + fn main() { let target = env::var("TARGET").unwrap(); + generate_cargo_keys(ConstantsFlags::SHA | ConstantsFlags::BUILD_TIMESTAMP).unwrap(); + let target_os = target.split('-').nth(2).unwrap_or("none"); // If we're not running on a desktop-class operating system, emit the "baremetal" diff --git a/services/log-server/src/main.rs b/services/log-server/src/main.rs index b863817b2..596bf9267 100644 --- a/services/log-server/src/main.rs +++ b/services/log-server/src/main.rs @@ -226,7 +226,10 @@ fn handle_scalar( fn reader_thread(mut output: implementation::OutputWriter) { writeln!(output, "LOG: Xous Logging Server starting up...").unwrap(); - writeln!(output, "LOG: Starting log server...").unwrap(); + writeln!(output, "LOG: ****************************************************************").unwrap(); + writeln!(output, "LOG: *** Welcome to Xous {:40} ***", env!("VERGEN_SHA")).unwrap(); + writeln!(output, "LOG: *** Built: {:49} ***", env!("VERGEN_BUILD_TIMESTAMP")).unwrap(); + writeln!(output, "LOG: ****************************************************************").unwrap(); let server_addr = xous::create_server_with_address(b"xous-log-server ").unwrap(); writeln!(output, "LOG: Server listening on address {:?}", server_addr).unwrap();