Commit 68ad6479 authored by Alessandro Rubini's avatar Alessandro Rubini

all archs: print commit hash at startup

Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent e733ca9d
......@@ -27,12 +27,16 @@ OBJDUMP = $(CROSS_COMPILE)objdump
# Instead of repeating "ppsi" over and over, bless it TARGET
TARGET = ppsi
# we should use linux/scripts/setlocalversion instead...
VERSION = $(shell git describe --always --dirty)
# The main target is the big object file.
all: $(TARGET).o
# CFLAGS to use. Both this Makefile (later) and app-makefile may grow CFLAGS
CFLAGS = $(USER_CFLAGS)
CFLAGS += -Wall -O2 -ggdb -Iinclude -fno-common
CFLAGS += -DPPSI_VERSION=\"$(VERSION)\"
# to avoid ifdef as much as possible, I use the kernel trick for OBJ variables
OBJ-y := fsm.o diag.o
......
......@@ -39,6 +39,8 @@ int main(int argc, char **argv)
setbuf(stdout, NULL);
pp_printf("PPSi. Commit %s, built on " __DATE__ "\n", PPSI_VERSION);
ppg = &ppg_static;
ppg->defaultDS = &defaultDS;
ppg->currentDS = &currentDS;
......
......@@ -67,7 +67,8 @@ int wrc_ptp_init()
uart_init_hw();
uart_init_sw();
pp_printf("PPSi for WRPC. Compiled on " __DATE__ "\n");
pp_printf("PPSi for WRPC. Commit %s, built on " __DATE__ "\n",
PPSI_VERSION);
return 0;
}
......
......@@ -46,6 +46,9 @@ int main(int argc, char **argv)
setbuf(stdout, NULL);
pp_printf("PPSi. Commit %s, built on " __DATE__ "\n",
PPSI_VERSION);
hal_ch = minipc_client_create(WRSW_HAL_SERVER_ADDR,
MINIPC_FLAG_VERBOSE);
if (!hal_ch) { /* FIXME should we retry with minipc_client_create? */
......
......@@ -39,7 +39,8 @@ int ppsi_main(int argc, char **argv)
struct pp_instance *ppi = &ppi_static; /* no malloc, one instance */
struct bare_timex t;
pp_printf("ppsi starting. Built on %s\n", __DATE__);
pp_printf("PPSi, bare kernel. Commit %s, built on " __DATE__ "\n",
PPSI_VERSION);
ppi->glbs = ppg;
ppg->defaultDS = &defaultDS;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment