mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-18 08:52:45 +00:00
add build timestamping/versioning to the Xous log output
This commit is contained in:
parent
2eafe825b8
commit
0a3c50f820
4 changed files with 14 additions and 1 deletions
|
|
@ -57,6 +57,8 @@ set -- "${POSITIONAL[@]}"
|
||||||
|
|
||||||
DESTDIR=code/precursors
|
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
|
cargo xtask hw-image ../betrusted-soc/build/software/soc.svd
|
||||||
|
|
||||||
# only copy if changed, othrewise it seems to trigger extra build effort...
|
# only copy if changed, othrewise it seems to trigger extra build effort...
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,9 @@ description = "Log output program"
|
||||||
xous = { path = "../../xous-rs" }
|
xous = { path = "../../xous-rs" }
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
|
|
||||||
|
[build-dependencies]
|
||||||
|
vergen = "3"
|
||||||
|
|
||||||
[target.'cfg(not(any(windows,unix)))'.dependencies]
|
[target.'cfg(not(any(windows,unix)))'.dependencies]
|
||||||
utralib = { path = "../../utralib"}
|
utralib = { path = "../../utralib"}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,14 @@
|
||||||
// NOTE: Adapted from cortex-m/build.rs
|
// NOTE: Adapted from cortex-m/build.rs
|
||||||
use std::env;
|
use std::env;
|
||||||
|
|
||||||
|
extern crate vergen;
|
||||||
|
use vergen::{ConstantsFlags, generate_cargo_keys};
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let target = env::var("TARGET").unwrap();
|
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");
|
let target_os = target.split('-').nth(2).unwrap_or("none");
|
||||||
|
|
||||||
// If we're not running on a desktop-class operating system, emit the "baremetal"
|
// If we're not running on a desktop-class operating system, emit the "baremetal"
|
||||||
|
|
|
||||||
|
|
@ -226,7 +226,10 @@ fn handle_scalar(
|
||||||
fn reader_thread(mut output: implementation::OutputWriter) {
|
fn reader_thread(mut output: implementation::OutputWriter) {
|
||||||
writeln!(output, "LOG: Xous Logging Server starting up...").unwrap();
|
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();
|
let server_addr = xous::create_server_with_address(b"xous-log-server ").unwrap();
|
||||||
writeln!(output, "LOG: Server listening on address {:?}", server_addr).unwrap();
|
writeln!(output, "LOG: Server listening on address {:?}", server_addr).unwrap();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue