diff --git a/buildpush.sh b/buildpush.sh index 606791f90..dbfa5651f 100755 --- a/buildpush.sh +++ b/buildpush.sh @@ -57,7 +57,10 @@ set -- "${POSITIONAL[@]}" DESTDIR=code/precursors -touch services/log-server/src/main.rs # bump the build time in the log server +# this didn't work. Timestamping is actually kinda broken, because +# you end up capturing just the time that you managed to trigger a +# full rebuild, and not just an incremental rebuild. :-/ +#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 diff --git a/services/log-server/build.rs b/services/log-server/build.rs index f9dd19b2f..5fd27838d 100644 --- a/services/log-server/build.rs +++ b/services/log-server/build.rs @@ -7,8 +7,6 @@ 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" @@ -18,5 +16,9 @@ fn main() { println!("cargo:rustc-cfg=baremetal"); } + generate_cargo_keys(ConstantsFlags::SHA /*| ConstantsFlags::BUILD_TIMESTAMP*/).unwrap(); + // BUILD_TIMESTAMP doesn't work -- it doesn't update because of the below line + // removing the below line causes a lengthy full-rebuild just to capture a timestamp. + // so, we're removing the timestamp. println!("cargo:rerun-if-changed=build.rs"); } diff --git a/services/log-server/src/main.rs b/services/log-server/src/main.rs index 596bf9267..48217ca55 100644 --- a/services/log-server/src/main.rs +++ b/services/log-server/src/main.rs @@ -228,7 +228,10 @@ fn reader_thread(mut output: implementation::OutputWriter) { 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(); + // time stamp isn't actually the time stamp of the build, unfortunately. It's the time stamp of the + // last time you managed to force a rebuild that also causes log-server to be rebuilt, not necessarily + // capturing the build time of the very most recent change! + // 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();