diff --git a/Makefile b/Makefile index 218c1b3..9c8b844 100644 --- a/Makefile +++ b/Makefile @@ -10,6 +10,7 @@ # o use make's built-in rules and variables # (this increases performance and avoids hard-to-debug behaviour); # o print "Entering directory ..."; + ARCH ?= aarch64 MAKEFLAGS += -rR --no-print-directory @@ -204,6 +205,11 @@ KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \ -Wno-builtin-declaration-mismatch -Wno-main -nostdinc \ -I$(srctree)/lib/unic +# Try to get the version from Git has +GIT_VERSION_TAG ?= $(shell git rev-parse --short HEAD 2>/dev/null) +BUILD_DATE ?= $(shell date "+%Y-%m-%d %H:%M:%S" 2>/dev/null) +KBUILD_CFLAGS += -DVER_TAG="\"($(GIT_VERSION_TAG)) - date $(BUILD_DATE)\"" + KBUILD_AFLAGS_KERNEL := KBUILD_CFLAGS_KERNEL := KBUILD_AFLAGS := -D__ASSEMBLY__ diff --git a/main/main.c b/main/main.c index 52dfa60..b87bb3e 100644 --- a/main/main.c +++ b/main/main.c @@ -39,11 +39,11 @@ void main(void* dt, void* kernel, void* ramdisk) printk(-1, "|____/|___| /__|_______ \\____(____ /\\____ |\\___ >__|\n"); printk(-1, " \\/ \\/ \\/ \\/ \\/\n"); - printk(-1, "Passed board initialization!\n"); - printk(-1, "Welcome to uniLoader!\n"); + printk(-1, "passed board initialization\n"); + printk(-1, "welcome to uniLoader %s\n", VER_TAG); /* Copy kernel to memory and boot */ - printk(-1, "Booting linux...\n"); + printk(-1, "booting linux...\n"); #ifdef __aarch64__ memcpy((void*)CONFIG_PAYLOAD_ENTRY, kernel, (unsigned long) &kernel_size);