aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Cunningham <cc@localhost>2021-12-03 11:12:28 -0700
committerChristian Cunningham <cc@localhost>2021-12-03 11:12:28 -0700
commit2cba0207a444fefcb886173e7a252e11a1871c2f (patch)
treecab86bf69ab568d8f34e086c1ce30bb1caa6e830 /src
parent0d37ddacb2f2e787ea1aa1878e0e5e39253f507b (diff)
Added Makefile Versioning
Diffstat (limited to 'src')
-rw-r--r--src/kernel.S6
-rw-r--r--src/lib.c14
2 files changed, 15 insertions, 5 deletions
diff --git a/src/kernel.S b/src/kernel.S
index 4877c4a..452de10 100644
--- a/src/kernel.S
+++ b/src/kernel.S
@@ -7,17 +7,13 @@ kernel_main:
bl enable_irq
bl enable_fiq
bl chk_irq_stat
- ldr r0, =os_info
- bl uart_string
+ bl postinit
kernel_main.loop:
bl io_halt
b kernel_main.loop
pop {lr}
.section ".data"
-.globl os_info
-os_info:
- .asciz "\033[93mInitialized the Real Time Operating System\033[0m\n\033[96mName\033[0m: \033[94mTarvaOS\033[0m\n\033[96mVersion\033[0m: \033[95m0.0a\033[0m\n\nQEMU\n====\n Exit : Ctrl-A x\n Monitor : Ctrl-A c\n\n"
.globl cntfrq
cntfrq:
.word 0,0,0,0
diff --git a/src/lib.c b/src/lib.c
index eb3833b..15f5c80 100644
--- a/src/lib.c
+++ b/src/lib.c
@@ -14,6 +14,14 @@ void uart_10(unsigned long);
extern unsigned long cntfrq;
+static char* os_info_h = "\033[93mInitialized the Real Time Operating System\033[0m\n\033[96mName\033[0m: \033[94mTarvaOS\033[0m\n\033[96mVersion\033[0m: \033[95m";
+static char* os_info_t = "\033[0m\n\nQEMU\n====\n Exit : Ctrl-A x\n Monitor : Ctrl-A c\n\n";
+#ifndef VERSION
+static char* os_info_v = "?";
+#else
+static char* os_info_v = VERSION;
+#endif
+
static char* irq_on = " \033[92mEnabled\033[0m\n";
static char* irq_off = " \033[91mDisabled\033[0m\n";
@@ -134,6 +142,12 @@ void chk_irq_stat() {
uart_char(0x0a);
}
+void postinit() {
+ uart_string(os_info_h);
+ uart_string(os_info_v);
+ uart_string(os_info_t);
+}
+
void uart_10(unsigned long val) {
unsigned long t = val;
unsigned long c;