OS build now includes version information.
This commit is contained in:
parent
04768924e8
commit
d7122f76c6
@ -4,6 +4,8 @@
|
||||
|
||||
import tty, gdt, interrupts, serial
|
||||
|
||||
const version {.strdefine.} = "UNKNOWN"
|
||||
|
||||
type
|
||||
MemoryPointer{.unchecked.} = ptr array[0, char]
|
||||
|
||||
@ -20,12 +22,18 @@ proc memset*(dest: ByteAddress, value: char, count: int){.exportc.} =
|
||||
|
||||
proc kernelMain() {.exportc: "kernel_main"}=
|
||||
serial.init()
|
||||
serial.write("Version:")
|
||||
serial.write(version)
|
||||
serial.write("\L")
|
||||
serial.write("Booting OS\L")
|
||||
gdt.gdtInstall()
|
||||
serial.write("GDT installed\L")
|
||||
interrupts.idtInstall()
|
||||
serial.write("IDT installed\L")
|
||||
terminalInitialize()
|
||||
terminalWrite("Version:")
|
||||
terminalWrite(version)
|
||||
terminalWrite("\L")
|
||||
terminalWrite("Hello World!\L")
|
||||
terminalWrite("MAX_INT:")
|
||||
terminalWrite(high(int))
|
||||
|
@ -1,8 +1,9 @@
|
||||
import nake
|
||||
import os
|
||||
import os, osproc, strutils
|
||||
|
||||
const
|
||||
standardOptions = """--skipCfg kernel.nim"""
|
||||
let
|
||||
standardOptions = """--skipCfg -d:version:"""" & execProcess("git rev-parse --abbrev-ref HEAD").strip() &
|
||||
"|" & execProcess("git rev-parse HEAD").strip() & """" kernel.nim"""
|
||||
outputFile = "myos.bin"
|
||||
|
||||
task "clean", "Removes build files.":
|
||||
|
Loading…
Reference in New Issue
Block a user